mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-04 20:52:59 +08:00
tiny fix
Former-commit-id: 0048a2021e94d068f7c6054df0b9569ae4912eb1
This commit is contained in:
parent
8b6c178249
commit
31c618f1f7
@ -475,8 +475,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
|
|||||||
#### Use Huggingface Accelerate
|
#### Use Huggingface Accelerate
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
accelerate config # configure the environment
|
accelerate launch --config_file config.yaml src/train_bash.py # arguments (same as above)
|
||||||
accelerate launch src/train_bash.py # arguments (same as above)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<details><summary>Example config for LoRA training</summary>
|
<details><summary>Example config for LoRA training</summary>
|
||||||
|
@ -474,8 +474,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
|
|||||||
#### 使用 Huggingface Accelerate
|
#### 使用 Huggingface Accelerate
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
accelerate config # 首先配置分布式环境
|
accelerate launch --config_file config.yaml src/train_bash.py # 参数同上
|
||||||
accelerate launch src/train_bash.py # 参数同上
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<details><summary>LoRA 训练的 Accelerate 配置示例</summary>
|
<details><summary>LoRA 训练的 Accelerate 配置示例</summary>
|
||||||
|
@ -671,48 +671,48 @@ register_model_group(
|
|||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-0.5B-Chat-GPTQ-Int8",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-0.5B-Chat-GPTQ-Int8",
|
||||||
},
|
},
|
||||||
"Qwen1.5-0.5B-int4-Chat": {
|
"Qwen1.5-0.5B-int4-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-0.5B-Chat-GPTQ-Int4",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-0.5B-Chat-AWQ",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-0.5B-Chat-GPTQ-Int4",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-0.5B-Chat-AWQ",
|
||||||
},
|
},
|
||||||
"Qwen1.5-1.8B-int8-Chat": {
|
"Qwen1.5-1.8B-int8-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-1.8B-Chat-GPTQ-Int8",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-1.8B-Chat-GPTQ-Int8",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-1.8B-Chat-GPTQ-Int8",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-1.8B-Chat-GPTQ-Int8",
|
||||||
},
|
},
|
||||||
"Qwen1.5-1.8B-int4-Chat": {
|
"Qwen1.5-1.8B-int4-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-1.8B-Chat-GPTQ-Int4",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-1.8B-Chat-AWQ",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-1.8B-Chat-GPTQ-Int4",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-1.8B-Chat-AWQ",
|
||||||
},
|
},
|
||||||
"Qwen1.5-4B-int8-Chat": {
|
"Qwen1.5-4B-int8-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-4B-Chat-GPTQ-Int8",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-4B-Chat-GPTQ-Int8",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-4B-Chat-GPTQ-Int8",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-4B-Chat-GPTQ-Int8",
|
||||||
},
|
},
|
||||||
"Qwen1.5-4B-int4-Chat": {
|
"Qwen1.5-4B-int4-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-4B-Chat-GPTQ-Int4",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-4B-Chat-AWQ",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-4B-Chat-GPTQ-Int4",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-4B-Chat-AWQ",
|
||||||
},
|
},
|
||||||
"Qwen1.5-7B-int8-Chat": {
|
"Qwen1.5-7B-int8-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-7B-Chat-GPTQ-Int8",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-7B-Chat-GPTQ-Int8",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-7B-Chat-GPTQ-Int8",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-7B-Chat-GPTQ-Int8",
|
||||||
},
|
},
|
||||||
"Qwen1.5-7B-int4-Chat": {
|
"Qwen1.5-7B-int4-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-7B-Chat-GPTQ-Int4",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-7B-Chat-AWQ",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-7B-Chat-GPTQ-Int4",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-7B-Chat-AWQ",
|
||||||
},
|
},
|
||||||
"Qwen1.5-14B-int8-Chat": {
|
"Qwen1.5-14B-int8-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-14B-Chat-GPTQ-Int8",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-14B-Chat-GPTQ-Int8",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-14B-Chat-GPTQ-Int8",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-14B-Chat-GPTQ-Int8",
|
||||||
},
|
},
|
||||||
"Qwen1.5-14B-int4-Chat": {
|
"Qwen1.5-14B-int4-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-14B-Chat-GPTQ-Int4",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-14B-Chat-AWQ",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-14B-Chat-GPTQ-Int4",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-14B-Chat-AWQ",
|
||||||
},
|
},
|
||||||
"Qwen1.5-72B-int8-Chat": {
|
"Qwen1.5-72B-int8-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-72B-Chat-GPTQ-Int8",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-72B-Chat-GPTQ-Int8",
|
||||||
},
|
},
|
||||||
"Qwen1.5-72B-int4-Chat": {
|
"Qwen1.5-72B-int4-Chat": {
|
||||||
DownloadSource.DEFAULT: "Qwen/Qwen1.5-72B-Chat-GPTQ-Int4",
|
DownloadSource.DEFAULT: "Qwen/Qwen1.5-72B-Chat-AWQ",
|
||||||
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-72B-Chat-GPTQ-Int4",
|
DownloadSource.MODELSCOPE: "qwen/Qwen1.5-72B-Chat-AWQ",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
template="qwen",
|
template="qwen",
|
||||||
|
@ -11,7 +11,7 @@ if TYPE_CHECKING:
|
|||||||
from transformers.tokenization_utils import PreTrainedTokenizer
|
from transformers.tokenization_utils import PreTrainedTokenizer
|
||||||
|
|
||||||
if is_jieba_available():
|
if is_jieba_available():
|
||||||
import jieba
|
import jieba # type: ignore
|
||||||
|
|
||||||
if is_nltk_available():
|
if is_nltk_available():
|
||||||
from nltk.translate.bleu_score import SmoothingFunction, sentence_bleu
|
from nltk.translate.bleu_score import SmoothingFunction, sentence_bleu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user