Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,51 @@
|
|
1 |
---
|
2 |
license: other
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: other
|
3 |
---
|
4 |
+
|
5 |
+
# Koala: A Dialogue Model for Academic Research
|
6 |
+
This repo contains the weights of the Koala 7B model produced at Berkeley. It is the result of combining the diffs from https://huggingface.co/young-geng/koala with the original Llama 7B model.
|
7 |
+
|
8 |
+
This version has then been converted to HF format.
|
9 |
+
|
10 |
+
The following commands were run to produce this repo:
|
11 |
+
```
|
12 |
+
git clone https://github.com/young-geng/EasyLM
|
13 |
+
|
14 |
+
git clone https://huggingface.co/TheBloke/llama-13b
|
15 |
+
|
16 |
+
mkdir koala_diffs && cd koala_diffs && wget https://huggingface.co/young-geng/koala/resolve/main/koala_13b_diff_v2
|
17 |
+
|
18 |
+
cd EasyLM
|
19 |
+
|
20 |
+
PYTHON_PATH="${PWD}:$PYTHONPATH" python \
|
21 |
+
-m EasyLM.models.llama.convert_torch_to_easylm \
|
22 |
+
--checkpoint_dir=/content/llama-13b \
|
23 |
+
--output_file=/content/llama-13b-LM \
|
24 |
+
--streaming=True
|
25 |
+
|
26 |
+
PYTHON_PATH="${PWD}:$PYTHONPATH" python \
|
27 |
+
-m EasyLM.scripts.diff_checkpoint --recover_diff=True \
|
28 |
+
--load_base_checkpoint='params::/content/llama-13b-LM' \
|
29 |
+
--load_target_checkpoint='params::/content/koala_diffs/koala_13b_diff_v2' \
|
30 |
+
--output_file=/content/koala_13b.diff.weights \
|
31 |
+
--streaming=True
|
32 |
+
|
33 |
+
PYTHON_PATH="${PWD}:$PYTHONPATH" python \
|
34 |
+
-m EasyLM.models.llama.convert_easylm_to_hf --model_size=7b \
|
35 |
+
--output_dir=/content/koala-13B-HF \
|
36 |
+
--load_checkpoint='params::/content/koala_13b.diff.weights' \
|
37 |
+
--tokenizer_path=/content/llama-13b/tokenizer.model
|
38 |
+
```
|
39 |
+
|
40 |
+
Check out the following links to learn more about the Berkeley Koala model.
|
41 |
+
* [Blog post](https://bair.berkeley.edu/blog/2023/04/03/koala/)
|
42 |
+
* [Online demo](https://koala.lmsys.org/)
|
43 |
+
* [EasyLM: training and serving framework on GitHub](https://github.com/young-geng/EasyLM)
|
44 |
+
* [Documentation for running Koala locally](https://github.com/young-geng/EasyLM/blob/main/docs/koala.md)
|
45 |
+
|
46 |
+
## License
|
47 |
+
The model weights are intended for academic research only, subject to the
|
48 |
+
[model License of LLaMA](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md),
|
49 |
+
[Terms of Use of the data generated by OpenAI](https://openai.com/policies/terms-of-use),
|
50 |
+
and [Privacy Practices of ShareGPT](https://chrome.google.com/webstore/detail/sharegpt-share-your-chatg/daiacboceoaocpibfodeljbdfacokfjb).
|
51 |
+
Any other usage of the model weights, including but not limited to commercial usage, is strictly prohibited.
|