Junxiong Wang
commited on
Commit
•
7005c37
1
Parent(s):
45743e3
add models
Browse files- .DS_Store +0 -0
- .gitattributes +1 -0
- README.md +75 -3
- all_results.json +22 -0
- config.json +27 -0
- configs.yaml +13 -0
- eval_results.json +16 -0
- generation_config.json +6 -0
- mamba_config.json +22 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +35 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +48 -0
- train_results.json +9 -0
- trainer_state.json +0 -0
- training_args.bin +3 -0
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
.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 |
+
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,3 +1,75 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: JunxiongWang/mamba_0_75_sft
|
3 |
+
tags:
|
4 |
+
- alignment-handbook
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- HuggingFaceH4/ultrafeedback_binarized
|
8 |
+
model-index:
|
9 |
+
- name: mamba_0_75_dpo_ep3
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
Please check [here](https://github.com/jxiw/MambaInLlama/tree/main) for details.
|
14 |
+
|
15 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
16 |
+
should probably proofread and complete it, then remove this comment. -->
|
17 |
+
|
18 |
+
# mamba_0_75_dpo_ep3
|
19 |
+
|
20 |
+
This model is a fine-tuned version of [JunxiongWang/mamba_0_75_sft](https://huggingface.co/JunxiongWang/mamba_0_75_sft) on the HuggingFaceH4/ultrafeedback_binarized dataset.
|
21 |
+
It achieves the following results on the evaluation set:
|
22 |
+
- Loss: 0.7077
|
23 |
+
- Rewards/chosen: -4.3611
|
24 |
+
- Rewards/rejected: -7.0013
|
25 |
+
- Rewards/accuracies: 0.7812
|
26 |
+
- Rewards/margins: 2.6403
|
27 |
+
- Logps/rejected: -333.1784
|
28 |
+
- Logps/chosen: -302.4903
|
29 |
+
- Logits/rejected: -2.8351
|
30 |
+
- Logits/chosen: -2.8752
|
31 |
+
|
32 |
+
## Model description
|
33 |
+
|
34 |
+
More information needed
|
35 |
+
|
36 |
+
## Intended uses & limitations
|
37 |
+
|
38 |
+
More information needed
|
39 |
+
|
40 |
+
## Training and evaluation data
|
41 |
+
|
42 |
+
More information needed
|
43 |
+
|
44 |
+
## Training procedure
|
45 |
+
|
46 |
+
### Training hyperparameters
|
47 |
+
|
48 |
+
The following hyperparameters were used during training:
|
49 |
+
- learning_rate: 5e-07
|
50 |
+
- train_batch_size: 4
|
51 |
+
- eval_batch_size: 8
|
52 |
+
- seed: 42
|
53 |
+
- distributed_type: multi-GPU
|
54 |
+
- num_devices: 8
|
55 |
+
- total_train_batch_size: 32
|
56 |
+
- total_eval_batch_size: 64
|
57 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
58 |
+
- lr_scheduler_type: cosine
|
59 |
+
- lr_scheduler_warmup_ratio: 0.1
|
60 |
+
- num_epochs: 3
|
61 |
+
|
62 |
+
### Training results
|
63 |
+
|
64 |
+
| Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
|
65 |
+
|:-------------:|:------:|:----:|:---------------:|:--------------:|:----------------:|:------------------:|:---------------:|:--------------:|:------------:|:---------------:|:-------------:|
|
66 |
+
| 0.1188 | 1.0466 | 2000 | 0.5385 | -1.3137 | -2.8323 | 0.7852 | 1.5186 | -291.4879 | -272.0161 | -2.9057 | -2.9472 |
|
67 |
+
| 0.0093 | 2.0931 | 4000 | 0.7077 | -4.3611 | -7.0013 | 0.7812 | 2.6403 | -333.1784 | -302.4903 | -2.8351 | -2.8752 |
|
68 |
+
|
69 |
+
|
70 |
+
### Framework versions
|
71 |
+
|
72 |
+
- Transformers 4.41.2
|
73 |
+
- Pytorch 2.1.0+cu118
|
74 |
+
- Datasets 2.20.0
|
75 |
+
- Tokenizers 0.19.1
|
all_results.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_logits/chosen": -2.7800703048706055,
|
4 |
+
"eval_logits/rejected": -2.7443556785583496,
|
5 |
+
"eval_logps/chosen": -320.7950439453125,
|
6 |
+
"eval_logps/rejected": -359.7069091796875,
|
7 |
+
"eval_loss": 0.8304514288902283,
|
8 |
+
"eval_rewards/accuracies": 0.77734375,
|
9 |
+
"eval_rewards/chosen": -6.191556453704834,
|
10 |
+
"eval_rewards/margins": 3.4626402854919434,
|
11 |
+
"eval_rewards/rejected": -9.654197692871094,
|
12 |
+
"eval_runtime": 96.3492,
|
13 |
+
"eval_samples": 2000,
|
14 |
+
"eval_samples_per_second": 20.758,
|
15 |
+
"eval_steps_per_second": 0.332,
|
16 |
+
"total_flos": 0.0,
|
17 |
+
"train_loss": 0.22357279954321543,
|
18 |
+
"train_runtime": 32339.7878,
|
19 |
+
"train_samples": 61134,
|
20 |
+
"train_samples_per_second": 5.671,
|
21 |
+
"train_steps_per_second": 0.177
|
22 |
+
}
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "HuggingFaceH4/zephyr-7b-beta",
|
3 |
+
"architectures": [
|
4 |
+
"MistralForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 1,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"hidden_size": 4096,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 14336,
|
13 |
+
"max_position_embeddings": 32768,
|
14 |
+
"model_type": "mistral",
|
15 |
+
"num_attention_heads": 32,
|
16 |
+
"num_hidden_layers": 32,
|
17 |
+
"num_key_value_heads": 8,
|
18 |
+
"pad_token_id": 2,
|
19 |
+
"rms_norm_eps": 1e-05,
|
20 |
+
"rope_theta": 10000.0,
|
21 |
+
"sliding_window": 4096,
|
22 |
+
"tie_word_embeddings": false,
|
23 |
+
"torch_dtype": "bfloat16",
|
24 |
+
"transformers_version": "4.41.2",
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 32000
|
27 |
+
}
|
configs.yaml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
mamba_0_75_dpo_ep3:
|
2 |
+
prompt_template: "zephyr-7b-alpha/prompt.txt"
|
3 |
+
fn_completions: "huggingface_local_completions"
|
4 |
+
completions_kwargs:
|
5 |
+
model_name: "JunxiongWang/mamba_0_75_dpo_ep3"
|
6 |
+
model_kwargs:
|
7 |
+
torch_dtype: 'bfloat16'
|
8 |
+
max_new_tokens: 2048
|
9 |
+
temperature: 0.7
|
10 |
+
top_p: 1.0
|
11 |
+
do_sample: True
|
12 |
+
pretty_name: "Mamba 0 75 From Zephyr 7B Beta"
|
13 |
+
link: "https://huggingface.co/JunxiongWang/mamba_0_75_dpo_ep3"
|
eval_results.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_logits/chosen": -2.7800703048706055,
|
4 |
+
"eval_logits/rejected": -2.7443556785583496,
|
5 |
+
"eval_logps/chosen": -320.7950439453125,
|
6 |
+
"eval_logps/rejected": -359.7069091796875,
|
7 |
+
"eval_loss": 0.8304514288902283,
|
8 |
+
"eval_rewards/accuracies": 0.77734375,
|
9 |
+
"eval_rewards/chosen": -6.191556453704834,
|
10 |
+
"eval_rewards/margins": 3.4626402854919434,
|
11 |
+
"eval_rewards/rejected": -9.654197692871094,
|
12 |
+
"eval_runtime": 96.3492,
|
13 |
+
"eval_samples": 2000,
|
14 |
+
"eval_samples_per_second": 20.758,
|
15 |
+
"eval_steps_per_second": 0.332
|
16 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 1,
|
4 |
+
"eos_token_id": 2,
|
5 |
+
"transformers_version": "4.41.2"
|
6 |
+
}
|
mamba_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"d_model": 4096,
|
3 |
+
"ssm_cfg": {
|
4 |
+
"expand": 1
|
5 |
+
},
|
6 |
+
"rms_norm_eps": 1e-05,
|
7 |
+
"vocab_size": null,
|
8 |
+
"d_xb": 1024,
|
9 |
+
"intermediate_size": 14336,
|
10 |
+
"hidden_act": "silu",
|
11 |
+
"n_layer": 32,
|
12 |
+
"attn_layers": [
|
13 |
+
3,
|
14 |
+
7,
|
15 |
+
11,
|
16 |
+
15,
|
17 |
+
19,
|
18 |
+
23,
|
19 |
+
27,
|
20 |
+
31
|
21 |
+
]
|
22 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8880c3f0f20f60615ca0d55326779dd436096a6b2b8165adcb4c9542cad28b12
|
3 |
+
size 30788071930
|
special_tokens_map.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<unk>",
|
4 |
+
"<s>",
|
5 |
+
"</s>"
|
6 |
+
],
|
7 |
+
"bos_token": {
|
8 |
+
"content": "<s>",
|
9 |
+
"lstrip": false,
|
10 |
+
"normalized": false,
|
11 |
+
"rstrip": false,
|
12 |
+
"single_word": false
|
13 |
+
},
|
14 |
+
"eos_token": {
|
15 |
+
"content": "</s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"pad_token": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false
|
27 |
+
},
|
28 |
+
"unk_token": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": false,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false
|
34 |
+
}
|
35 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
}
|
29 |
+
},
|
30 |
+
"additional_special_tokens": [
|
31 |
+
"<unk>",
|
32 |
+
"<s>",
|
33 |
+
"</s>"
|
34 |
+
],
|
35 |
+
"bos_token": "<s>",
|
36 |
+
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
37 |
+
"clean_up_tokenization_spaces": false,
|
38 |
+
"eos_token": "</s>",
|
39 |
+
"legacy": true,
|
40 |
+
"model_max_length": 2048,
|
41 |
+
"pad_token": "</s>",
|
42 |
+
"sp_model_kwargs": {},
|
43 |
+
"spaces_between_special_tokens": false,
|
44 |
+
"tokenizer_class": "LlamaTokenizer",
|
45 |
+
"truncation_side": "left",
|
46 |
+
"unk_token": "<unk>",
|
47 |
+
"use_default_system_prompt": true
|
48 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"total_flos": 0.0,
|
4 |
+
"train_loss": 0.22357279954321543,
|
5 |
+
"train_runtime": 32339.7878,
|
6 |
+
"train_samples": 61134,
|
7 |
+
"train_samples_per_second": 5.671,
|
8 |
+
"train_steps_per_second": 0.177
|
9 |
+
}
|
trainer_state.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:598ea8ca5c7311f3e74ebc898ca9dfa89a2f429b5c6805e06a9522118eb14ab7
|
3 |
+
size 6328
|