Skip to content

Commit

Permalink
Merge pull request #148 from seruva19/dev
Browse files Browse the repository at this point in the history
update notebooks
  • Loading branch information
seruva19 authored Oct 12, 2023
2 parents 62d5adb + cb7b1e0 commit 928fb6b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion notebooks/kubin-colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"!pip install -r requirements.txt\n",
"\n",
"if use_flash_attention:\n",
" !pip install https://github.com/seruva19/flash-attn-wheels/releases/download/1.0.1/flash_attn-1.0.1+cu118torch2.0.0-cp310-cp310-linux_x86_64.whl\n",
" !pip install /content/kubin/wheels/flash_attn-1.0.1+cu118torch2.0.0-cp310-cp310-linux_x86_64.whl\n",
"\n",
"if use_xformers:\n",
" !pip install xformers==0.0.20\n",
Expand Down
11 changes: 3 additions & 8 deletions notebooks/kubin-kaggle.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"metadata": {},
"outputs": [],
"source": [
"use_dev = False\n",
"use_flash_attention = False"
"use_dev = False"
]
},
{
Expand All @@ -22,7 +21,7 @@
"print (gpu[0])\n",
"\n",
"import torch\n",
"print(torch._version_)\n",
"print(torch.__version__)\n",
"\n",
"!nvidia-smi"
]
Expand All @@ -38,10 +37,7 @@
"!git clone -b {\"dev\" if use_dev else \"main\"} https://github.com/seruva19/kubin.git \n",
"%cd /kaggle/working/kubin\n",
"\n",
"!pip install -r requirements.txt\n",
"\n",
"if use_flash_attention:\n",
" !pip install https://github.com/seruva19/flash-attn-wheels/releases/download/1.0.1/flash_attn-1.0.1+cu113torch1.13.0-cp37-cp37m-linux_x86_64.whl"
"!pip install -r requirements.txt"
]
},
{
Expand All @@ -51,7 +47,6 @@
"outputs": [],
"source": [
"args = '--cache-dir=\"/kaggle/working/kubin/models\" --output-dir=\"/kaggle/working/kubin/output\" --share=\"gradio\"'\n",
"if use_flash_attention: args += \" --flash-attention='use'\"\n",
"\n",
"!python src/kubin.py $args"
]
Expand Down
9 changes: 2 additions & 7 deletions notebooks/kubin-paperspace.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"source": [
"use_dev = False\n",
"\n",
"use_flash_attention = False\n",
"use_diffusers = True\n",
"use_xformers = False\n",
"\n",
Expand Down Expand Up @@ -50,10 +49,7 @@
" !pip install xformers==0.0.16\n",
" !pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116\n",
" !pip install triton==2.0.0\n",
" !python -m xformers.info\n",
" \n",
"if use_flash_attention:\n",
" !pip install https://github.com/seruva19/flash-attn-wheels/releases/download/1.0.1/flash_attn-1.0.1+cu116torch1.12.1-cp39-cp39-linux_x86_64.whl"
" !python -m xformers.info"
]
},
{
Expand All @@ -77,8 +73,7 @@
" --server-port=7860 \\\n",
" --share=\"gradio\" \\\n",
" --pipeline={\"diffusers\" if use_diffusers else \"native\"} \\\n",
" --optimize={\"xformers\" if use_xformers else \"\"} \\\n",
" {\"--flash-attention='use'\" if use_flash_attention else \"\"}"
" --optimize={\"xformers\" if use_xformers else \"\"}"
]
}
],
Expand Down
Binary file not shown.

0 comments on commit 928fb6b

Please sign in to comment.