Skip to content

Commit

Permalink
13B 4bit πŸ₯³
Browse files Browse the repository at this point in the history
  • Loading branch information
camenduru authored Oct 14, 2023
1 parent 0e38eb4 commit 5887ade
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 2 deletions.
84 changes: 84 additions & 0 deletions LLaVA_13b_4bit_colab.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github"
},
"source": [
"[![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_4bit_colab.ipynb)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "VjYy0F2gZIPR"
},
"outputs": [],
"source": [
"%cd /content\n",
"!git clone -b 5GB https://github.com/camenduru/LLaVA\n",
"%cd /content/LLaVA\n",
"\n",
"!pip install -e ."
]
},
{
"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', 'liuhaotian/llava-v1.5-13b-shard3gb',\n",
" '--load-4bit'\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"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

| 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_4bit_colab.ipynb) | πŸŒ‹ LLaVA_13b_4bit_colab 13B (4bit)
[![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 5887ade

Please sign in to comment.