Ba2han commited on
Commit
16cc824
·
verified ·
1 Parent(s): fe76fe7

Training in progress, step 474

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,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Ba2han/model-muontest-wsd-p2
3
+ library_name: transformers
4
+ model_name: model-muonsft-p2
5
+ tags:
6
+ - generated_from_trainer
7
+ - unsloth
8
+ - trl
9
+ - sft
10
+ licence: license
11
+ ---
12
+
13
+ # Model Card for model-muonsft-p2
14
+
15
+ This model is a fine-tuned version of [Ba2han/model-muontest-wsd-p2](https://huggingface.co/Ba2han/model-muontest-wsd-p2).
16
+ It has been trained using [TRL](https://github.com/huggingface/trl).
17
+
18
+ ## Quick start
19
+
20
+ ```python
21
+ from transformers import pipeline
22
+
23
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
24
+ generator = pipeline("text-generation", model="Ba2han/model-muonsft-p2", device="cuda")
25
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
26
+ print(output["generated_text"])
27
+ ```
28
+
29
+ ## Training procedure
30
+
31
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/batuhan409/huggingface/runs/rza6hw39)
32
+
33
+
34
+ This model was trained with SFT.
35
+
36
+ ### Framework versions
37
+
38
+ - TRL: 0.24.0
39
+ - Transformers: 5.0.0rc0
40
+ - Pytorch: 2.9.0+cu128
41
+ - Datasets: 4.3.0
42
+ - Tokenizers: 0.22.2
43
+
44
+ ## Citations
45
+
46
+
47
+
48
+ Cite TRL as:
49
+
50
+ ```bibtex
51
+ @misc{vonwerra2022trl,
52
+ title = {{TRL: Transformer Reinforcement Learning}},
53
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
54
+ year = 2020,
55
+ journal = {GitHub repository},
56
+ publisher = {GitHub},
57
+ howpublished = {\url{https://github.com/huggingface/trl}}
58
+ }
59
+ ```
adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "LlamaForCausalLM",
7
+ "parent_library": "transformers.models.llama.modeling_llama",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "Ba2han/model-muontest-wsd-p2",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 64,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": null,
29
+ "peft_type": "LORA",
30
+ "peft_version": "0.18.0",
31
+ "qalora_group_size": 16,
32
+ "r": 64,
33
+ "rank_pattern": {},
34
+ "revision": null,
35
+ "target_modules": [
36
+ "k_proj",
37
+ "q_proj",
38
+ "o_proj",
39
+ "up_proj",
40
+ "down_proj",
41
+ "gate_proj",
42
+ "v_proj"
43
+ ],
44
+ "target_parameters": null,
45
+ "task_type": "CAUSAL_LM",
46
+ "trainable_token_indices": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false
50
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6416b19d662d7b065eea09cf1c815ad3189cf89a506ddea7d4b667b6bacc694b
3
+ size 195125192
chat_template.jinja ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- bos_token }}
2
+ {%- if custom_tools is defined %}
3
+ {%- set tools = custom_tools %}
4
+ {%- endif %}
5
+ {%- if not tools_in_user_message is defined %}
6
+ {%- set tools_in_user_message = true %}
7
+ {%- endif %}
8
+ {%- if not date_string is defined %}
9
+ {%- if strftime_now is defined %}
10
+ {%- set date_string = strftime_now("%d %b %Y") %}
11
+ {%- else %}
12
+ {%- set date_string = "26 Jul 2024" %}
13
+ {%- endif %}
14
+ {%- endif %}
15
+ {%- if not tools is defined %}
16
+ {%- set tools = none %}
17
+ {%- endif %}
18
+
19
+ {#- This block extracts the system message, so we can slot it into the right place. #}
20
+ {%- if messages[0]['role'] == 'system' %}
21
+ {%- set system_message = messages[0]['content']|trim %}
22
+ {%- set messages = messages[1:] %}
23
+ {%- else %}
24
+ {%- set system_message = "" %}
25
+ {%- endif %}
26
+
27
+ {#- System message #}
28
+ {{- "<|start_header_id|>system<|end_header_id|>
29
+
30
+ " }}
31
+ {%- if tools is not none %}
32
+ {{- "Environment: ipython
33
+ " }}
34
+ {%- endif %}
35
+ {{- "Cutting Knowledge Date: December 2023
36
+ " }}
37
+ {{- "Today Date: " + date_string + "
38
+
39
+ " }}
40
+ {%- if tools is not none and not tools_in_user_message %}
41
+ {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
42
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
43
+ {{- "Do not use variables.
44
+
45
+ " }}
46
+ {%- for t in tools %}
47
+ {{- t | tojson(indent=4) }}
48
+ {{- "
49
+
50
+ " }}
51
+ {%- endfor %}
52
+ {%- endif %}
53
+ {{- system_message }}
54
+ {{- "<|eot_id|>" }}
55
+
56
+ {#- Custom tools are passed in a user message with some extra guidance #}
57
+ {%- if tools_in_user_message and not tools is none %}
58
+ {#- Extract the first user message so we can plug it in here #}
59
+ {%- if messages | length != 0 %}
60
+ {%- set first_user_message = messages[0]['content']|trim %}
61
+ {%- set messages = messages[1:] %}
62
+ {%- else %}
63
+ {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
64
+ {%- endif %}
65
+ {{- '<|start_header_id|>user<|end_header_id|>
66
+
67
+ ' -}}
68
+ {{- "Given the following functions, please respond with a JSON for a function call " }}
69
+ {{- "with its proper arguments that best answers the given prompt.
70
+
71
+ " }}
72
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
73
+ {{- "Do not use variables.
74
+
75
+ " }}
76
+ {%- for t in tools %}
77
+ {{- t | tojson(indent=4) }}
78
+ {{- "
79
+
80
+ " }}
81
+ {%- endfor %}
82
+ {{- first_user_message + "<|eot_id|>"}}
83
+ {%- endif %}
84
+
85
+ {%- for message in messages %}
86
+ {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
87
+ {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>
88
+
89
+ '+ message['content'] | trim + '<|eot_id|>' }}
90
+ {%- elif 'tool_calls' in message %}
91
+ {%- if not message.tool_calls|length == 1 %}
92
+ {{- raise_exception("This model only supports single tool-calls at once!") }}
93
+ {%- endif %}
94
+ {%- set tool_call = message.tool_calls[0].function %}
95
+ {{- '<|start_header_id|>assistant<|end_header_id|>
96
+
97
+ ' -}}
98
+ {{- '{"name": "' + tool_call.name + '", ' }}
99
+ {{- '"parameters": ' }}
100
+ {{- tool_call.arguments | tojson }}
101
+ {{- "}" }}
102
+ {{- "<|eot_id|>" }}
103
+ {%- elif message.role == "tool" or message.role == "ipython" %}
104
+ {{- "<|start_header_id|>ipython<|end_header_id|>
105
+
106
+ " }}
107
+ {%- if message.content is mapping or message.content is iterable %}
108
+ {{- message.content | tojson }}
109
+ {%- else %}
110
+ {{- message.content }}
111
+ {%- endif %}
112
+ {{- "<|eot_id|>" }}
113
+ {%- endif %}
114
+ {%- endfor %}
115
+ {%- if add_generation_prompt %}
116
+ {{- '<|start_header_id|>assistant<|end_header_id|>
117
+
118
+ ' }}
119
+ {%- endif %}
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
tokenizer_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": null,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|begin_of_text|>",
5
+ "clean_up_tokenization_spaces": true,
6
+ "eos_token": "<|end_of_text|>",
7
+ "extra_special_tokens": [],
8
+ "is_local": false,
9
+ "model_input_names": [
10
+ "input_ids",
11
+ "attention_mask"
12
+ ],
13
+ "model_max_length": 131072,
14
+ "model_specific_special_tokens": {},
15
+ "pad_token": "<|finetune_right_pad_id|>",
16
+ "padding_side": "right",
17
+ "tokenizer_class": "TokenizersBackend",
18
+ "unk_token": null
19
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42822cb03c4a073e60c32f8cfcf1cf9b83ee8a1d1a136c53659b4710cc7ceb72
3
+ size 5649