|
2 | 2 | Vicuna is an open-source LLAMA-based LLM that has a performance close to ChatGPT.
|
3 | 3 | We currently use the v0 version of Vicuna-13B.
|
4 | 4 |
|
5 |
| -To prepare Vicuna’s weight, first download Vicuna’s **delta** weight from [https://huggingface.co/lmsys/vicuna-13b-delta-v0](https://huggingface.co/lmsys/vicuna-13b-delta-v0). In case you have git-lfs installed (https://git-lfs.com), this can be done by |
| 5 | +To prepare Vicuna’s weight, first download Vicuna’s **delta** weight from [https://huggingface.co/lmsys/vicuna-13b-delta-v0](https://huggingface.co/lmsys/vicuna-13b-delta-v0). |
| 6 | +In case you have git-lfs installed (https://git-lfs.com), this can be done by |
6 | 7 |
|
7 | 8 | ```
|
8 | 9 | git lfs install
|
9 |
| -git clone https://huggingface.co/lmsys/vicuna-13b-delta-v0 |
| 10 | +git clone https://huggingface.co/lmsys/vicuna-13b-delta-v0 # more powerful, need at least 24G gpu memory |
| 11 | +# or |
| 12 | +git clone https://huggingface.co/lmsys/vicuna-7b-delta-v0 # smaller, need 12G gpu memory |
10 | 13 | ```
|
11 | 14 |
|
12 | 15 | Note that this is not directly the working weight, but the difference between the working weight and the original weight of LLAMA-13B. (Due to LLAMA’s rules, we cannot distribute the weight of LLAMA.)
|
13 | 16 |
|
14 |
| -Then, you need to obtain the original LLAMA-13B weights in the HuggingFace format either following the instruction provided by HuggingFace [here](https://huggingface.co/docs/transformers/main/model_doc/llama) or from the Internet. |
| 17 | +Then, you need to obtain the original LLAMA-7B or LLAMA-13B weights in the HuggingFace format |
| 18 | +either following the instruction provided by HuggingFace |
| 19 | +[here](https://huggingface.co/docs/transformers/main/model_doc/llama) or from the Internet. |
15 | 20 |
|
16 | 21 | When these two weights are ready, we can use tools from Vicuna’s team to create the real working weight.
|
17 | 22 | First, Install their library that is compatible with v0 Vicuna by
|
|
23 | 28 | Then, run the following command to create the final working weight
|
24 | 29 |
|
25 | 30 | ```
|
26 |
| -python -m fastchat.model.apply_delta --base /path/to/llama-13b-hf/ --target /path/to/save/working/vicuna/weight/ --delta /path/to/vicuna-13b-delta-v0/ |
| 31 | +python -m fastchat.model.apply_delta --base /path/to/llama-13bOR7b-hf/ --target /path/to/save/working/vicuna/weight/ --delta /path/to/vicuna-13bOR7b-delta-v0/ |
27 | 32 | ```
|
28 | 33 |
|
29 | 34 | Now you are good to go!
|
|
0 commit comments