Skip to content

Commit 6ba5876

Browse files
Add Vicuna example folder. (skypilot-org#1826)
* Vicuna examples. * Updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates
1 parent 91be9f2 commit 6ba5876

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
Run jobs on any cloud, easily and cost effectively
2626
</h3>
2727

28+
----
29+
:fire: :dromedary_camel: *News (March, 2023)* :dromedary_camel: :fire:
30+
31+
- **[Vicuna LLM chatbot](https://vicuna.lmsys.org/) trained** [**using SkyPilot**](./examples/vicuna-llm/) **for $300 on spot instances!**
32+
- *Serve* your own LLaMA LLM chatbot (not finetuned) on any cloud: [**example**](./examples/llama-llm-chatbots/), [**repo**](https://github.com/skypilot-org/sky-llama)
33+
----
34+
2835
SkyPilot is a framework for easily and cost effectively running ML workloads[^1] on any cloud.
2936

3037
SkyPilot abstracts away the cloud infra burden:

examples/vicuna-llm/README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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

Comments
 (0)