|
| 1 | +# Vicuna: An LLM Chatbot Impressing GPT-4 with 90% ChatGPT Quality |
| 2 | + |
| 3 | +<img src="https://vicuna.lmsys.org/favicon.jpeg" width="25%" alt="Vicuna LLM"/> |
| 4 | + |
| 5 | +Vicuna is an LLM chatbot with impressive quality. It is trained using SkyPilot on [cloud spot instances](https://skypilot.readthedocs.io/en/latest/examples/spot-jobs.html), with a cost of ~$300. |
| 6 | + |
| 7 | +* [Blog post](https://vicuna.lmsys.org/) |
| 8 | +* [Demo](https://chat.lmsys.org/) |
| 9 | +* [Repo](https://github.com/lm-sys/FastChat) |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | +Install the latest SkyPilot: |
| 13 | +```bash |
| 14 | +pip install git+https://github.com/skypilot-org/skypilot.git |
| 15 | +sky check |
| 16 | +``` |
| 17 | +Clone the Vicuna repo to get the [SkyPilot YAMLs](https://github.com/lm-sys/FastChat/tree/main/scripts) for finetuning: |
| 18 | +```bash |
| 19 | +git clone https://github.com/lm-sys/FastChat.git |
| 20 | +cd FastChat |
| 21 | +``` |
| 22 | + |
| 23 | +## Training Vicuna with SkyPilot |
| 24 | +Currently, training requires GPUs with 80GB memory. See `sky show-gpus --all` for supported GPUs. |
| 25 | + |
| 26 | +**To train on 8 A100 GPUs (80GB memory) using spot instances**: |
| 27 | +```bash |
| 28 | +# Launch it on managed spot to save 3x cost |
| 29 | +sky spot launch -n vicuna scripts/train-vicuna.yaml --env WANDB_API_KEY |
| 30 | + |
| 31 | +# Train a 7B model instead of the default 13B |
| 32 | +sky spot launch -n vicuna-7b scripts/train-vicuna.yaml --env WANDB_API_KEY --env MODEL_SIZE=7 |
| 33 | + |
| 34 | +# Use *unmanaged* spot instances (i.e., preemptions won't get auto-recovered). |
| 35 | +# Unmanaged spot saves the cost of a small controller VM. We recommend using managed spot as above. |
| 36 | +sky launch -n vicunab scripts/train-vicuna.yaml --env WANDB_API_KEY |
| 37 | +``` |
| 38 | +Currently, such `A100-80GB:8` spot instances are only available on GCP. |
| 39 | + |
| 40 | +**To use on-demand `A100-80GB:8` instances**, which are currently available on Lambda Cloud, Azure, and GCP: |
| 41 | +```bash |
| 42 | +sky launch -c vicuna -s scripts/train-vicuna.yaml --env WANDB_API_KEY --no-use-spot |
| 43 | +``` |
| 44 | + |
| 45 | + |
| 46 | +## Q&A |
| 47 | + |
| 48 | +Q: I see some bucket permission errors `sky.exceptions.StorageBucketGetError` when running the above: |
| 49 | +``` |
| 50 | +... |
| 51 | +sky.exceptions.StorageBucketGetError: Failed to connect to an existing bucket 'model-weights'. |
| 52 | +Please check if: |
| 53 | + 1. the bucket name is taken and/or |
| 54 | + 2. the bucket permissions are not setup correctly. To debug, consider using gsutil ls gs://model-weights. |
| 55 | +``` |
| 56 | + |
| 57 | +A: The YAML files hard-coded names for existing buckets which are not public. Replace those bucket names (see `# Change to your own bucket`) with some unique names, and rerun the commands. New private buckets will be automatically created under your cloud account. |
0 commit comments