BootsofLagrangian commited on
Commit
faabf5d
·
verified ·
1 Parent(s): 3a4172b

Upload folder using huggingface_hub

Browse files
.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,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen2-1.5B
4
+ tags:
5
+ - generated_from_trainer
6
+ - sft
7
+ - ultrafeedback
8
+ datasets:
9
+ - activeDap/sft-hh-data
10
+ language:
11
+ - en
12
+ library_name: transformers
13
+ ---
14
+
15
+ # Qwen2-1.5B Fine-tuned on sft-hh-data
16
+
17
+ This model is a fine-tuned version of [Qwen/Qwen2-1.5B](https://huggingface.co/Qwen/Qwen2-1.5B) on the [activeDap/sft-hh-data](https://huggingface.co/datasets/activeDap/sft-hh-data) dataset.
18
+
19
+ ## Training Results
20
+
21
+ ![Training Loss](loss_plot.png)
22
+
23
+ ### Training Statistics
24
+
25
+ | Metric | Value |
26
+ |--------|-------|
27
+ | Total Steps | 19 |
28
+ | Final Training Loss | 2.1474 |
29
+ | Min Training Loss | 2.1474 |
30
+ | Training Runtime | 6.76 seconds |
31
+ | Samples/Second | 176.04 |
32
+
33
+ ## Training Configuration
34
+
35
+ | Parameter | Value |
36
+ |-----------|-------|
37
+ | Base Model | Qwen/Qwen2-1.5B |
38
+ | Dataset | activeDap/sft-hh-data |
39
+ | Number of Epochs | 1.0 |
40
+ | Per Device Batch Size | 16 |
41
+ | Gradient Accumulation Steps | 1 |
42
+ | Total Batch Size | 64 (4 GPUs) |
43
+ | Learning Rate | 2e-05 |
44
+ | LR Scheduler | cosine |
45
+ | Warmup Ratio | 0.1 |
46
+ | Max Sequence Length | 512 |
47
+ | Optimizer | adamw_torch_fused |
48
+ | Mixed Precision | BF16 |
49
+
50
+ ## Usage
51
+
52
+ ```python
53
+ from transformers import AutoModelForCausalLM, AutoTokenizer
54
+
55
+ model_name = "activeDap/Qwen2-1.5B_sft-hh-data"
56
+
57
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
58
+ model = AutoModelForCausalLM.from_pretrained(model_name)
59
+
60
+ # Format input with prompt template
61
+ prompt = "What is machine learning?\nAssistant:"
62
+ inputs = tokenizer(prompt, return_tensors="pt")
63
+
64
+ # Generate response
65
+ outputs = model.generate(**inputs, max_new_tokens=100)
66
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
67
+ print(response)
68
+ ```
69
+
70
+ ## Training Framework
71
+
72
+ - **Library:** Transformers + TRL
73
+ - **Training Type:** Supervised Fine-Tuning (SFT)
74
+ - **Format:** Prompt-completion with Assistant-only loss
75
+
76
+ ## Citation
77
+
78
+ If you use this model, please cite the original base model and dataset:
79
+
80
+ ```bibtex
81
+ @misc{ultrafeedback2023,
82
+ title={UltraFeedback: Boosting Language Models with High-quality Feedback},
83
+ author={Ganqu Cui and Lifan Yuan and Ning Ding and others},
84
+ year={2023},
85
+ eprint={2310.01377},
86
+ archivePrefix={arXiv}
87
+ }
88
+ ```
added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
all_results.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 4894845378232320.0,
3
+ "train_loss": 2.0850013933683695,
4
+ "train_runtime": 6.7598,
5
+ "train_samples_per_second": 176.041,
6
+ "train_steps_per_second": 2.811
7
+ }
chat_template.jinja ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
2
+ You are a helpful assistant<|im_end|>
3
+ ' }}{% endif %}{{'<|im_start|>' + message['role'] + '
4
+ ' + message['content'] + '<|im_end|>' + '
5
+ '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
6
+ ' }}{% endif %}
config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "dtype": "bfloat16",
7
+ "eos_token_id": 151643,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 1536,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 8960,
12
+ "layer_types": [
13
+ "full_attention",
14
+ "full_attention",
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention"
41
+ ],
42
+ "max_position_embeddings": 131072,
43
+ "max_window_layers": 28,
44
+ "model_type": "qwen2",
45
+ "num_attention_heads": 12,
46
+ "num_hidden_layers": 28,
47
+ "num_key_value_heads": 2,
48
+ "pad_token_id": 151643,
49
+ "rms_norm_eps": 1e-06,
50
+ "rope_scaling": null,
51
+ "rope_theta": 1000000.0,
52
+ "sliding_window": null,
53
+ "tie_word_embeddings": true,
54
+ "transformers_version": "4.57.1",
55
+ "use_cache": false,
56
+ "use_sliding_window": false,
57
+ "vocab_size": 151936
58
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token_id": [
3
+ 151643
4
+ ],
5
+ "max_new_tokens": 2048,
6
+ "pad_token_id": 151643,
7
+ "transformers_version": "4.57.1"
8
+ }
loss_plot.png ADDED
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7065790fbf7d1cf112350178725ef761874f1d96b82876ec5443ccf1ca318de3
3
+ size 3087467144
special_tokens_map.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|endoftext|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": {
14
+ "content": "<|endoftext|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ }
20
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcfe42da0a4497e8b2b172c1f9f4ec423a46dc12907f4349c55025f670422ba9
3
+ size 11418266
tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "<|endoftext|>",
36
+ "errors": "replace",
37
+ "extra_special_tokens": {},
38
+ "model_max_length": 32768,
39
+ "pad_token": "<|endoftext|>",
40
+ "split_special_tokens": false,
41
+ "tokenizer_class": "Qwen2Tokenizer",
42
+ "unk_token": null
43
+ }
train_results.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 4894845378232320.0,
3
+ "train_loss": 2.0850013933683695,
4
+ "train_runtime": 6.7598,
5
+ "train_samples_per_second": 176.041,
6
+ "train_steps_per_second": 2.811
7
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1af1b8942fc351632345b0990c05c8e05a248f0a25c0925e6c0932599bb2772d
3
+ size 6161
vocab.json ADDED
The diff for this file is too large to render. See raw diff