Junxiong Wang
commited on
Commit
•
808b3f3
1
Parent(s):
dddfe0d
add models
Browse files- .gitattributes +1 -0
- README.md +62 -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 +30 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +35 -0
- tokenizer.json +0 -0
- tokenizer_config.json +48 -0
- train_results.json +9 -0
- trainer_state.json +0 -0
- training_args.bin +3 -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 |
+
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,3 +1,62 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: JunxiongWang/mamba_0_5_sft
|
3 |
+
tags:
|
4 |
+
- mamba
|
5 |
+
- alignment-handbook
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- HuggingFaceH4/ultrafeedback_binarized
|
9 |
+
model-index:
|
10 |
+
- name: mamba_0_5_dpo_ep1
|
11 |
+
results: []
|
12 |
+
---
|
13 |
+
|
14 |
+
Please check [here](https://github.com/jxiw/MambaInLlama/tree/main) for details.
|
15 |
+
|
16 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
17 |
+
should probably proofread and complete it, then remove this comment. -->
|
18 |
+
|
19 |
+
# mamba_0_5_dpo_ep1
|
20 |
+
|
21 |
+
This model is a fine-tuned version of [JunxiongWang/mamba_0_5_sft](https://huggingface.co/JunxiongWang/mamba_0_5_sft) on the HuggingFaceH4/ultrafeedback_binarized dataset.
|
22 |
+
|
23 |
+
## Model description
|
24 |
+
|
25 |
+
More information needed
|
26 |
+
|
27 |
+
## Intended uses & limitations
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Training and evaluation data
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training procedure
|
36 |
+
|
37 |
+
### Training hyperparameters
|
38 |
+
|
39 |
+
The following hyperparameters were used during training:
|
40 |
+
- learning_rate: 5e-07
|
41 |
+
- train_batch_size: 4
|
42 |
+
- eval_batch_size: 8
|
43 |
+
- seed: 42
|
44 |
+
- distributed_type: multi-GPU
|
45 |
+
- num_devices: 8
|
46 |
+
- total_train_batch_size: 32
|
47 |
+
- total_eval_batch_size: 64
|
48 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
49 |
+
- lr_scheduler_type: cosine
|
50 |
+
- lr_scheduler_warmup_ratio: 0.1
|
51 |
+
- num_epochs: 1
|
52 |
+
|
53 |
+
### Training results
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
### Framework versions
|
58 |
+
|
59 |
+
- Transformers 4.41.2
|
60 |
+
- Pytorch 2.1.0+cu118
|
61 |
+
- Datasets 2.20.0
|
62 |
+
- Tokenizers 0.19.1
|
all_results.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"eval_logits/chosen": -2.2767388820648193,
|
4 |
+
"eval_logits/rejected": -2.215937614440918,
|
5 |
+
"eval_logps/chosen": -364.837646484375,
|
6 |
+
"eval_logps/rejected": -464.28753662109375,
|
7 |
+
"eval_loss": 0.5073517560958862,
|
8 |
+
"eval_rewards/accuracies": 0.765625,
|
9 |
+
"eval_rewards/chosen": -1.1322153806686401,
|
10 |
+
"eval_rewards/margins": 0.9668433666229248,
|
11 |
+
"eval_rewards/rejected": -2.0990586280822754,
|
12 |
+
"eval_runtime": 95.8711,
|
13 |
+
"eval_samples": 2000,
|
14 |
+
"eval_samples_per_second": 20.861,
|
15 |
+
"eval_steps_per_second": 0.334,
|
16 |
+
"total_flos": 0.0,
|
17 |
+
"train_loss": 0.5515718292903051,
|
18 |
+
"train_runtime": 10135.9715,
|
19 |
+
"train_samples": 61134,
|
20 |
+
"train_samples_per_second": 6.031,
|
21 |
+
"train_steps_per_second": 0.189
|
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_5_dpo_ep1:
|
2 |
+
prompt_template: "zephyr-7b-alpha/prompt.txt"
|
3 |
+
fn_completions: "huggingface_local_completions"
|
4 |
+
completions_kwargs:
|
5 |
+
model_name: "JunxiongWang/mamba_0_5_dpo_ep1"
|
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 5 From Zephyr 7B Beta"
|
13 |
+
link: "https://huggingface.co/JunxiongWang/mamba_0_5_dpo_ep1"
|
eval_results.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"eval_logits/chosen": -2.2767388820648193,
|
4 |
+
"eval_logits/rejected": -2.215937614440918,
|
5 |
+
"eval_logps/chosen": -364.837646484375,
|
6 |
+
"eval_logps/rejected": -464.28753662109375,
|
7 |
+
"eval_loss": 0.5073517560958862,
|
8 |
+
"eval_rewards/accuracies": 0.765625,
|
9 |
+
"eval_rewards/chosen": -1.1322153806686401,
|
10 |
+
"eval_rewards/margins": 0.9668433666229248,
|
11 |
+
"eval_rewards/rejected": -2.0990586280822754,
|
12 |
+
"eval_runtime": 95.8711,
|
13 |
+
"eval_samples": 2000,
|
14 |
+
"eval_samples_per_second": 20.861,
|
15 |
+
"eval_steps_per_second": 0.334
|
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,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
1,
|
14 |
+
3,
|
15 |
+
5,
|
16 |
+
7,
|
17 |
+
9,
|
18 |
+
11,
|
19 |
+
13,
|
20 |
+
15,
|
21 |
+
17,
|
22 |
+
19,
|
23 |
+
21,
|
24 |
+
23,
|
25 |
+
25,
|
26 |
+
27,
|
27 |
+
29,
|
28 |
+
31
|
29 |
+
]
|
30 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3a29977d5a646c1145d25d8a2ebe4307f0f8e77b33e379852740b101de83621e
|
3 |
+
size 30181056602
|
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_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": 1.0,
|
3 |
+
"total_flos": 0.0,
|
4 |
+
"train_loss": 0.5515718292903051,
|
5 |
+
"train_runtime": 10135.9715,
|
6 |
+
"train_samples": 61134,
|
7 |
+
"train_samples_per_second": 6.031,
|
8 |
+
"train_steps_per_second": 0.189
|
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:0754a487021ff242e3b5c7ac8a1368a7b3c515e7896187b965c016064b05d33b
|
3 |
+
size 6328
|