butyuhao commited on
Commit
9cc88f2
1 Parent(s): f77c71b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -1,3 +1,20 @@
1
  ---
2
  license: agpl-3.0
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: agpl-3.0
3
+ language:
4
+ - zh
5
+ - en
6
  ---
7
+ # 使用方法
8
+ 本模型使用educhat-sft-002-data-osm数据,从原始LLAMA权重训练得到,由于LLaMA限制,发布的权重只能包含差异部分,使用前请先按照以下流程转换权重。
9
+ ## Step1:将原始LLaMA权重转换为huggingface版本。
10
+ 首先下载LLaMA原始权重,然后使用[权重转换脚本](https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/convert_llama_weights_to_hf.py)转换权重。
11
+ ```python
12
+ python src/transformers/models/llama/convert_llama_weights_to_hf.py \
13
+ --input_dir /path/to/downloaded/llama/weights --model_size 7B --output_dir /output/LLaMA_hf
14
+ ```
15
+ ## Step2:使用[解密脚本](https://github.com/icalk-nlp/EduChat/blob/main/decrypt.py)将原始LLaMA权重(base weight)加回到增量权重(delta weight)上。
16
+ ```python
17
+ python ./decrypt.py --base /path/to/LLAMA_hf --target ./educhat-base-002-7b-decrypt --delta /path/to/educhat-base-002-7b
18
+ ```
19
+ # 使用示例
20
+ 转换权重后,使用示例请参考:https://github.com/icalk-nlp/EduChat#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B