Skip to content

Commit

Permalink
not yet
Browse files Browse the repository at this point in the history
  • Loading branch information
camenduru authored Oct 12, 2023
1 parent 7d95dab commit 605907f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 47 deletions.
49 changes: 3 additions & 46 deletions LLaVA_13b_8bit_colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,58 +18,15 @@
"outputs": [],
"source": [
"%cd /content\n",
"!git clone -b 5GB https://github.com/camenduru/LLaVA\n",
"%cd /content/LLaVA\n",
"!git clone -b dev https://github.com/camenduru/LLaVA-hf\n",
"%cd /content/LLaVA-hf\n",
"\n",
"!pip install ninja\n",
"!pip install flash-attn --no-build-isolation\n",
"\n",
"!pip install -e .\n",
"\n",
"# !python -m llava.serve.cli \\\n",
"# --model-path 4bit/llava-v1.5-7b-5GB \\\n",
"# --image-file \"https://llava-vl.github.io/static/images/view.jpg\" \\\n",
"# --load-8bit"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import threading\n",
"import subprocess\n",
"threading.Thread(target=lambda: subprocess.run(['python3', '-m', 'llava.serve.controller', '--host', '0.0.0.0', '--port', '10000'], check=True), daemon=True).start()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import threading\n",
"import subprocess\n",
"command = [\n",
" 'python3', '-m', 'llava.serve.model_worker',\n",
" '--host', '0.0.0.0',\n",
" '--controller', 'http://localhost:10000',\n",
" '--port', '40000',\n",
" '--worker', 'http://localhost:40000',\n",
" '--model-path', '4bit/llava-v1.5-13b-5GB',\n",
" '--load-8bit'\n",
"]\n",
"threading.Thread(target=lambda: subprocess.run(command, check=True, shell=False), daemon=True).start()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!python3 -m llava.serve.gradio_web_server --controller http://localhost:10000 --model-list-mode reload --share"
"!python3 app.py --share"
]
}
],
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

| Colab | Info
| --- | --- |
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/LLaVA-colab/blob/main/LLaVA_13b_8bit_colab.ipynb) | πŸŒ‹ LLaVA_13b_8bit_colab 13B (8bit)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/LLaVA-colab/blob/main/LLaVA_7b_8bit_colab.ipynb) | πŸŒ‹ LLaVA_7b_8bit_colab 7B (8bit)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/LLaVA-colab/blob/main/LLaVA_7b_colab.ipynb) | πŸŒ‹ LLaVA_7b_colab 7B (16bit) (Pro High-RAM 😐 22GB RAM 14GB VRAM)

<!-- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/LLaVA-colab/blob/main/LLaVA_13b_8bit_colab.ipynb) | πŸŒ‹ LLaVA_13b_8bit_colab 13B (8bit) -->

## ⚠ Tutorial

https://www.youtube.com/watch?v=o7zQAa0NPds
Expand Down

0 comments on commit 605907f

Please sign in to comment.