igorktech commited on
Commit
e12281e
·
verified ·
1 Parent(s): 6f1d9d1

Training in progress, step 200

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: igorktech/gemma-3n-e2b-it-language-pruned-v2
3
+ library_name: transformers
4
+ model_name: Custom
5
+ tags:
6
+ - generated_from_trainer
7
+ - sft
8
+ - trl
9
+ - unsloth
10
+ licence: license
11
+ ---
12
+
13
+ # Model Card for Custom
14
+
15
+ This model is a fine-tuned version of [igorktech/gemma-3n-e2b-it-language-pruned-v2](https://huggingface.co/igorktech/gemma-3n-e2b-it-language-pruned-v2).
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="igorktech/Custom", 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/igorktech01/huggingface/runs/qhc20kr6)
32
+
33
+
34
+ This model was trained with SFT.
35
+
36
+ ### Framework versions
37
+
38
+ - TRL: 0.21.0
39
+ - Transformers: 4.55.0
40
+ - Pytorch: 2.6.0
41
+ - Datasets: 3.6.0
42
+ - Tokenizers: 0.21.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,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "igorktech/gemma-3n-e2b-it-language-pruned-v2",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 64,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 64,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": "(?:.*?(?:language|text).*?(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense).*?(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj|correction_coefs|prediction_coefs|modality_router|linear_left|linear_right|per_layer_input_gate|per_layer_projection|0|1|2).*?)|(?:\\bmodel\\.layers\\.[\\d]{1,}\\.(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense)\\.(?:(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj|correction_coefs|prediction_coefs|modality_router|linear_left|linear_right|per_layer_input_gate|per_layer_projection|0|1|2)))",
28
+ "task_type": "CAUSAL_LM",
29
+ "trainable_token_indices": null,
30
+ "use_dora": false,
31
+ "use_qalora": false,
32
+ "use_rslora": false
33
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20d46d7e9402d845ad7553f4f4ec7ee8f5e690282066eb4a0882ea9fdbc980e5
3
+ size 236755440
chat_template.jinja ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{ bos_token }}
2
+ {%- if messages[0]['role'] == 'system' -%}
3
+ {%- if messages[0]['content'] is string -%}
4
+ {%- set first_user_prefix = messages[0]['content'] + '
5
+
6
+ ' -%}
7
+ {%- else -%}
8
+ {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
9
+
10
+ ' -%}
11
+ {%- endif -%}
12
+ {%- set loop_messages = messages[1:] -%}
13
+ {%- else -%}
14
+ {%- set first_user_prefix = '' -%}
15
+ {%- set loop_messages = messages -%}
16
+ {%- endif -%}
17
+
18
+ {# Inject tools definitions here if available #}
19
+ {%- if tools -%}
20
+ {#– Serialize all tools into one JSON blob, separated by newlines –#}
21
+ {%- set tools_json = tools | map('tojson') | join('
22
+ ') -%}
23
+ {#– Append the entire block to first_user_prefix in one go –#}
24
+ {%- set first_user_prefix = first_user_prefix
25
+ ~ "# Tools
26
+
27
+ "
28
+ ~ "You may call one or more functions to assist with the user query.
29
+
30
+ "
31
+ ~ "You are provided with function signatures within `<tools>` XML tags:
32
+ "
33
+ ~ "<tools>
34
+ "
35
+ ~ tools_json
36
+ ~ "
37
+ </tools>
38
+
39
+ "
40
+ ~ "For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
41
+ "
42
+ ~ "<tool_call>
43
+ "
44
+ ~ '{"name": <function-name>, "arguments": <args-json-object>}'
45
+ ~ "
46
+ </tool_call>
47
+
48
+ "
49
+ -%}
50
+ {%- endif -%}
51
+
52
+ {# Identify where to insert optional tool segments #}
53
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=loop_messages|length - 1) -%}
54
+ {%- for msg in loop_messages[::-1] -%}
55
+ {%- set idx = (loop_messages|length - 1) - loop.index0 -%}
56
+ {%- if ns.multi_step_tool and msg['role']=='user' and msg['content'] is string and not (msg['content'].startswith('<tool_response>') and msg['content'].endswith('</tool_response>')) -%}
57
+ {%- set ns.multi_step_tool = false -%}
58
+ {%- set ns.last_query_index = idx -%}
59
+ {%- endif -%}
60
+ {%- endfor -%}
61
+
62
+ {# Render each message turn #}
63
+ {%- for message in loop_messages -%}
64
+ {%- set role = "model" if message.role == 'assistant' else message.role -%}
65
+ {{ '<start_of_turn>' ~ role ~ "
66
+ " ~ (first_user_prefix if loop.first else "") -}}
67
+ {%- if message.content is string -%}
68
+ {%- set content = message.content -%}
69
+ {%- elif message.content is iterable -%}
70
+ {%- set content = '' -%}
71
+ {%- for item in message.content -%}
72
+ {%- if item.type == 'text' -%}
73
+ {%- set content = content + item.text -%}
74
+ {%- elif item.type == 'image' -%}
75
+ {%- set content = content + '<image_soft_token>' -%}
76
+ {%- elif item.type == 'audio' -%}
77
+ {%- set content = content + '<audio_soft_token>' -%}
78
+ {%- endif -%}
79
+ {%- endfor -%}
80
+ {%- else -%}
81
+ {{ raise_exception("Invalid content type: " ~ message.role) }}
82
+ {%- endif -%}
83
+
84
+ {# Render by role #}
85
+ {%- if message.role == 'tool' -%}
86
+ {{ '<tool_response>
87
+ ' + content + '
88
+ </tool_response>' }}
89
+ {%- elif message.role == 'assistant' -%}
90
+ {{ content }}
91
+ {# Append any tool_calls #}
92
+ {%- if message.tool_calls -%}
93
+ {%- for tool_call in message.tool_calls -%}
94
+ {%- if (loop.first and content) or (not loop.first) -%}
95
+ {{- '
96
+ ' }}
97
+ {%- endif -%}
98
+ {%- if tool_call.function -%}
99
+ {%- set tool_call = tool_call.function -%}
100
+ {%- endif -%}
101
+ {{- '<tool_call>
102
+ {"name": "' }}
103
+ {{- tool_call.name }}
104
+ {{- '", "arguments": ' }}
105
+ {%- if tool_call.arguments is string -%}
106
+ {{- tool_call.arguments }}
107
+ {%- else -%}
108
+ {{- tool_call.arguments | tojson }}
109
+ {%- endif -%}
110
+ {{- '}
111
+ </tool_call>' }}
112
+ {%- endfor -%}
113
+ {%- endif -%}
114
+ {%- else -%}
115
+ {{ content }}
116
+ {%- endif -%}
117
+ {{ '<end_of_turn>
118
+ ' }}
119
+
120
+ {%- endfor -%}
121
+
122
+ {%- if add_generation_prompt -%}
123
+ {{ '<start_of_turn>model
124
+ ' }}
125
+ {%- endif -%}
special_tokens_map.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_token": "<audio_soft_token>",
3
+ "boa_token": "<start_of_audio>",
4
+ "boi_token": "<start_of_image>",
5
+ "bos_token": {
6
+ "content": "<bos>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "eoa_token": "<end_of_audio>",
13
+ "eoi_token": "<end_of_image>",
14
+ "eos_token": {
15
+ "content": "<eos>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "image_token": "<image_soft_token>",
22
+ "pad_token": {
23
+ "content": "<pad>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false
28
+ },
29
+ "unk_token": {
30
+ "content": "<unk>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false
35
+ }
36
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6c35ee648c07754b44cd9e371c75d4caa05c4504910b7ad29b1847ee9d8ba5d
3
+ size 33442553
tokenizer_config.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:a42fca01906dffcf28cbfe9dcf32e6e3cbff4c0efa29b2b10d991a854baba88b
3
+ size 5752