初始化项目,由ModelHub XC社区提供模型
Model: THU-KEG/Llama3-Crab-SFT Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
53
README.md
Normal file
53
README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
language:
|
||||
- en
|
||||
metrics:
|
||||
- accuracy
|
||||
pipeline_tag: text-generation
|
||||
---
|
||||
|
||||
# Model Card for Llama3-Crab-SFT
|
||||
|
||||
<!-- Provide a quick summary of what the model is/does. -->
|
||||
|
||||
<p align="justify">
|
||||
Large language models (LLMs) struggle to follow instructions with complex constraints in format, length, etc. Following the conventional instruction-tuning practice, previous works conduct post-training on complex instruction-response pairs generated by feeding complex instructions to advanced LLMs. However, even advanced LLMs cannot follow complex instructions well, thus limiting the quality of generated data. In this work, we find that <b><i>existing datasets inherently contain implicit complex constraints</i></b> and propose a novel data generation technique, <b><i>constraint back-translation</i></b>. Specifically, we take the high-quality instruction-response pairs in existing datasets and only adopt advanced LLMs to add complex constraints already met by the responses to the instructions, which naturally reduces costs and data noise. In the experiments, we adopt Llama3-70B-Instruct to back-translate constraints and create a high-quality complex instruction-response dataset, named <b>CRAB</b>. We present that post-training on <font face="Verdana">CRAB</font> improves multiple backbone LLMs' complex instruction-following ability, evaluated on extensive instruction-following benchmarks. We further find that constraint back-translation also serves as a useful auxiliary training objective in post-training.
|
||||
|
||||
- 📖 Paper: [Constraint Back-translation Improves Complex Instruction Following of Large Language Models](https://arxiv.org/abs/2410.24175)
|
||||
</p>
|
||||
- 🦀 Github: [THU/Crab](https://github.com/THU-KEG/Crab)
|
||||
|
||||
### Model Performance
|
||||
|
||||
| Models | BaseModel | IFEval | FollowBench(HSR) | | | AVG |
|
||||
|--------------------|-----------|--------|------------------|-------|------|------|
|
||||
| | | AVG | L1-L2 | L3-L5 | AVG | |
|
||||
| GPT-3.5-turbo | GPT | 66.3 | 74.2 | 61 | 66.2 | 66.3 |
|
||||
| GPT-4 | GPT | 81.3 | 80.4 | 69.4 | 73.8 | 77.6 |
|
||||
| Vicuna-13b-V1.5 | Llama2 | 50.3 | 66.3 | 39.8 | 50.4 | 50.4 |
|
||||
| WizardLM-13B-V1.2 | Llama2 | 51.4 | 56.5 | 36.9 | 44.7 | 48 |
|
||||
| Conifer-13B | Llama2 | 50.2 | 57.1 | 40.3 | 47 | 48.6 |
|
||||
| Zephyr-7B-beta | Mistral | 45.4 | 54.8 | 38.2 | 44.8 | 45.1 |
|
||||
| Conifer-7B | Mistral | 53.9 | 51.9 | 40.2 | 44.9 | 49.4 |
|
||||
| Conifer-7B-DPO | Mistral | 55.7 | 57 | 45.4 | 50 | 52.9 |
|
||||
| Llama3 8B | Llama3 | 31.4 | 6.8 | 8.2 | 7.6 | 19.5 |
|
||||
| Llama3-crab | Llama3 | 46.9 | 51.2 | 26.7 | 36.5 | 41.7 |
|
||||
| Llama3-crab + DPO | Llama3 | 49.7 | 56.8 | 38.1 | 45.5 | 47.6 |
|
||||
| Mistral 7B | Mistral | 25.2 | 15.5 | 6.5 | 10.1 | 17.7 |
|
||||
| Mistral-crab | Mistral | 54.5 | 59.2 | 32.8 | 43.3 | 48.9 |
|
||||
| Mistral-crab + DPO | Mistral | 59.4 | 59.9 | 42.5 | 49.4 | 54.4 |
|
||||
|
||||
|
||||
|
||||
### Model Description
|
||||
|
||||
<!-- Provide a longer summary of what this model is. -->
|
||||
|
||||
|
||||
|
||||
- **Developed by:** Yunjia Qi, Hao Peng, Xiaozhi Wang, Bin Xu, Lei Hou, Juanzi Li
|
||||
- **Model type:** Text Generation
|
||||
- **Language(s) (NLP):** English
|
||||
- **Finetuned from model [optional]:** Llama3-8B
|
||||
|
||||
29
config.json
Normal file
29
config.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"_name_or_path": "/data3/MODELS/Meta-Llama-3-8B",
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 128000,
|
||||
"eos_token_id": 128001,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 14336,
|
||||
"max_position_embeddings": 8192,
|
||||
"mlp_bias": false,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 32,
|
||||
"num_key_value_heads": 8,
|
||||
"pretraining_tp": 1,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 500000.0,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.44.0",
|
||||
"use_cache": true,
|
||||
"vocab_size": 128257
|
||||
}
|
||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
||||
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||
6
generation_config.json
Normal file
6
generation_config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 128000,
|
||||
"eos_token_id": 128001,
|
||||
"transformers_version": "4.44.0"
|
||||
}
|
||||
3
pytorch_model-00001-of-00004.bin
Normal file
3
pytorch_model-00001-of-00004.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9b81a8001f179593aa2915b75d1cdc8674a95bdb45677809f3b606bd19c7c67d
|
||||
size 4976725019
|
||||
3
pytorch_model-00002-of-00004.bin
Normal file
3
pytorch_model-00002-of-00004.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:239df69fc3dea6a74c2882ee9ea867188afab6b58dee054855892424884a5348
|
||||
size 4999825759
|
||||
3
pytorch_model-00003-of-00004.bin
Normal file
3
pytorch_model-00003-of-00004.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:232095b3c051e09ef5e729a70d9653320c27e4a4d3c9c27f2428c6d93551455b
|
||||
size 4915938275
|
||||
3
pytorch_model-00004-of-00004.bin
Normal file
3
pytorch_model-00004-of-00004.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:616d655642078ab5a868e5c088529e4b26a930061b119f18947fe07b962377b3
|
||||
size 1168148590
|
||||
3
pytorch_model.bin.index.json
Normal file
3
pytorch_model.bin.index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bb48aec816a194d8a955390b29214d49ed955508acb8b0a31cdc6fe5a2baf942
|
||||
size 23950
|
||||
23
special_tokens_map.json
Normal file
23
special_tokens_map.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<|begin_of_text|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|end_of_text|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "<pad>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
410513
tokenizer.json
Normal file
410513
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
2070
tokenizer_config.json
Normal file
2070
tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user