Spaces:
Paused
Paused
Commit ·
7e16671
1
Parent(s): 2085d6e
flash attention upgraded for cuda 12.8
Browse filesFiles changed (2)
- app.py+21-10
- requirements.txt-1
23 unmodified lines242526272829303132333435363738394041424323 unmodified linesdef sh(cmd): subprocess.check_call(cmd, shell=True)flash_attention_wheel = hf_hub_download(repo_id="alexnasa/flash-attn-3",repo_type="model",filename="flash_attn_3-3.0.0b1-cp39-abi3-linux_x86_64.whl",)sh(f"pip install {flash_attention_wheel}")# tell Python to re-scan site-packages now that the egg-link existsimport importlib, site; site.addsitedir(site.getsitepackages()[0]); importlib.invalidate_caches()import torchprint(f'torch version:{torch.__version__}')import torch.nn as nn23 unmodified lines2425262728293031323334353637383940414243444546474849505152535423 unmodified linesdef sh(cmd): subprocess.check_call(cmd, shell=True)flash_attention_installed = Falsetry:print("Attempting to download and install FlashAttention wheel...")flash_attention_wheel = hf_hub_download(repo_id="alexnasa/flash-attn-3",repo_type="model",filename="128/flash_attn_3-3.0.0b1-cp39-abi3-linux_x86_64.whl",)sh(f"pip install {flash_attention_wheel}")# tell Python to re-scan site-packages now that the egg-link existsimport importlib, site; site.addsitedir(site.getsitepackages()[0]); importlib.invalidate_caches()flash_attention_installed = Trueprint("FlashAttention installed successfully.")except Exception as e:print(f"⚠️ Could not install FlashAttention: {e}")print("Continuing without FlashAttention...")import torchprint(f"Torch version: {torch.__version__}")print(f"FlashAttention available: {flash_attention_installed}")import torch.nn as nn
1234torch==2.7.1tqdmlibrosa==0.10.2.post1peft==0.15.1123tqdmlibrosa==0.10.2.post1peft==0.15.1
app.py+21-10
requirements.txt-1