Ba2han commited on
Commit
d6bf374
·
verified ·
1 Parent(s): 12ea27f

Training in progress, step 153

Browse files
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Ba2han/karga-dpo-test-2
3
+ library_name: transformers
4
+ model_name: model-translator-lfm-3
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - unsloth
9
+ - sft
10
+ licence: license
11
+ ---
12
+
13
+ # Model Card for model-translator-lfm-3
14
+
15
+ This model is a fine-tuned version of [Ba2han/karga-dpo-test-2](https://huggingface.co/Ba2han/karga-dpo-test-2).
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-translator-lfm-3", 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/7uw48ta3)
32
+
33
+
34
+ This model was trained with SFT.
35
+
36
+ ### Framework versions
37
+
38
+ - TRL: 0.24.0
39
+ - Transformers: 5.0.0.dev0
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
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {{- bos_token -}}{%- set system_prompt = "" -%}{%- set ns = namespace(system_prompt="") -%}{%- if messages[0]["role"] == "system" -%} {%- set ns.system_prompt = messages[0]["content"] -%} {%- set messages = messages[1:] -%}{%- endif -%}{%- if tools -%} {%- set ns.system_prompt = ns.system_prompt + ("
2
+ " if ns.system_prompt else "") + "List of tools: <|tool_list_start|>[" -%} {%- for tool in tools -%} {%- if tool is not string -%} {%- set tool = tool | tojson -%} {%- endif -%} {%- set ns.system_prompt = ns.system_prompt + tool -%} {%- if not loop.last -%} {%- set ns.system_prompt = ns.system_prompt + ", " -%} {%- endif -%} {%- endfor -%} {%- set ns.system_prompt = ns.system_prompt + "]<|tool_list_end|>" -%}{%- endif -%}{%- if ns.system_prompt -%} {{- "<|im_start|>system
3
+ " + ns.system_prompt + "<|im_end|>
4
+ " -}}{%- endif -%}{%- for message in messages -%} {{- "<|im_start|>" + message["role"] + "
5
+ " -}} {%- set content = message["content"] -%} {%- if content is not string -%} {%- set content = content | tojson -%} {%- endif -%} {%- if message["role"] == "tool" -%} {%- set content = "<|tool_response_start|>" + content + "<|tool_response_end|>" -%} {%- endif -%} {{- content + "<|im_end|>
6
+ " -}}{%- endfor -%}{%- if add_generation_prompt -%} {{- "<|im_start|>assistant
7
+ " -}}{%- endif -%}
config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Lfm2MoeForCausalLM"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_lfm2_moe.Lfm2MoeConfig",
7
+ "AutoModelForCausalLM": "modeling_lfm2_moe.Lfm2MoeForCausalLM"
8
+ },
9
+ "bos_token_id": null,
10
+ "conv_L_cache": 3,
11
+ "conv_bias": false,
12
+ "dtype": "bfloat16",
13
+ "eos_token_id": 7,
14
+ "hidden_size": 2048,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 7168,
17
+ "layer_types": [
18
+ "conv",
19
+ "conv",
20
+ "full_attention",
21
+ "conv",
22
+ "conv",
23
+ "conv",
24
+ "full_attention",
25
+ "conv",
26
+ "conv",
27
+ "conv",
28
+ "full_attention",
29
+ "conv",
30
+ "conv",
31
+ "conv",
32
+ "full_attention",
33
+ "conv",
34
+ "conv",
35
+ "conv",
36
+ "full_attention",
37
+ "conv",
38
+ "conv",
39
+ "full_attention",
40
+ "conv",
41
+ "conv"
42
+ ],
43
+ "max_position_embeddings": 128000,
44
+ "model_type": "lfm2_moe",
45
+ "moe_intermediate_size": 1792,
46
+ "norm_eps": 1e-05,
47
+ "norm_topk_prob": true,
48
+ "num_attention_heads": 32,
49
+ "num_dense_layers": 2,
50
+ "num_experts": 32,
51
+ "num_experts_per_tok": 4,
52
+ "num_hidden_layers": 24,
53
+ "num_key_value_heads": 8,
54
+ "pad_token_id": 0,
55
+ "rope_parameters": {
56
+ "rope_theta": 1000000.0,
57
+ "rope_type": "default"
58
+ },
59
+ "routed_scaling_factor": 1.0,
60
+ "transformers_version": "5.0.0.dev0",
61
+ "unsloth_version": "2026.1.2",
62
+ "use_cache": false,
63
+ "use_expert_bias": true,
64
+ "vocab_size": 65536
65
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": [
4
+ 7
5
+ ],
6
+ "max_length": 128000,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.0.0.dev0"
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8830687207fbed560a3affcce8e3196a40c71e559ec529ca0f56878e1ce6245
3
+ size 16680154224
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": null,
4
+ "clean_up_tokenization_spaces": false,
5
+ "eos_token": "<|im_end|>",
6
+ "is_local": false,
7
+ "legacy": false,
8
+ "model_input_names": [
9
+ "input_ids",
10
+ "attention_mask"
11
+ ],
12
+ "model_max_length": 1000000000000000019884624838656,
13
+ "model_specific_special_tokens": {},
14
+ "pad_token": "<|pad|>",
15
+ "padding_side": "right",
16
+ "sp_model_kwargs": {},
17
+ "spaces_between_special_tokens": false,
18
+ "tokenizer_class": "TokenizersBackend",
19
+ "unk_token": null,
20
+ "use_default_system_prompt": false,
21
+ "use_fast": true
22
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84db46bc1d895efda3830c69a8238f44b51a54d79b5702e5e808a2257f20dd40
3
+ size 5713