Upload 3 files
Browse files- .gitattributes +1 -0
- README.md +25 -0
- config.json +41 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- zh
|
| 5 |
+
- en
|
| 6 |
+
tasks:
|
| 7 |
+
- Large Language Models
|
| 8 |
+
model_features:
|
| 9 |
+
- 128k Context
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
[ERNIEKit](https://github.com/PaddlePaddle/ERNIE) is a training toolkit based on PaddlePaddle, specifically designed for the ERNIE series of open-source large models. It provides comprehensive support for scenarios such as instruction fine-tuning (SFT, LoRA) and alignment training (DPO), ensuring optimal performance.
|
| 13 |
+
|
| 14 |
+
Usage Examples:
|
| 15 |
+
|
| 16 |
+
```bash
|
| 17 |
+
# Download model
|
| 18 |
+
huggingface-cli download baidu/ERNIE-4.5-300B-A47B-Base-Paddle --local-dir baidu/ERNIE-4.5-300B-A47B-Base-Paddle
|
| 19 |
+
# SFT
|
| 20 |
+
erniekit train examples/configs/ERNIE-4.5-300B-A47B/sft/run_sft_wint8mix_lora_8k.yaml model_name_or_path=baidu/ERNIE-4.5-300B-A47B-Base-Paddle
|
| 21 |
+
# DPO
|
| 22 |
+
erniekit train examples/configs/ERNIE-4.5-300B-A47B/dpo/run_dpo_wint8mix_lora_8k.yaml model_name_or_path=baidu/ERNIE-4.5-300B-A47B-Base-Paddle
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
For more detailed examples, including SFT with LoRA, multi-GPU configurations, and advanced scripts, please refer to the examples folder within the [ERNIEKit](https://github.com/PaddlePaddle/ERNIE) repository.
|
config.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation": "eager",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Ernie4_5_MoeForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"auto_map": {
|
| 7 |
+
"AutoConfig": "configuration_ernie4_5_moe.Ernie4_5_MoeConfig",
|
| 8 |
+
"AutoModel": "modeling_ernie4_5_moe.Ernie4_5_Model",
|
| 9 |
+
"AutoModelForCausalLM": "modeling_ernie4_5_moe.Ernie4_5_MoeForCausalLM"
|
| 10 |
+
},
|
| 11 |
+
"bos_token_id": 1,
|
| 12 |
+
"eos_token_id": 2,
|
| 13 |
+
"hidden_act": "silu",
|
| 14 |
+
"hidden_size": 8192,
|
| 15 |
+
"intermediate_size": 28672,
|
| 16 |
+
"max_position_embeddings": 131072,
|
| 17 |
+
"model_type": "ernie4_5_moe",
|
| 18 |
+
"moe_capacity": [
|
| 19 |
+
64,
|
| 20 |
+
64,
|
| 21 |
+
64
|
| 22 |
+
],
|
| 23 |
+
"moe_gate": "topk",
|
| 24 |
+
"moe_intermediate_size": 3584,
|
| 25 |
+
"moe_k": 8,
|
| 26 |
+
"moe_layer_interval": 1,
|
| 27 |
+
"moe_layer_start_index": 3,
|
| 28 |
+
"moe_num_experts": 64,
|
| 29 |
+
"moe_use_aux_free": true,
|
| 30 |
+
"num_attention_heads": 64,
|
| 31 |
+
"num_hidden_layers": 54,
|
| 32 |
+
"num_key_value_heads": 8,
|
| 33 |
+
"pad_token_id": 0,
|
| 34 |
+
"rms_norm_eps": 1e-05,
|
| 35 |
+
"rope_theta": 500000,
|
| 36 |
+
"tie_word_embeddings": false,
|
| 37 |
+
"torch_dtype": "bfloat16",
|
| 38 |
+
"use_bias": false,
|
| 39 |
+
"use_cache": true,
|
| 40 |
+
"vocab_size": 103424
|
| 41 |
+
}
|