michaelchenkj commited on
Commit
b3169e3
·
verified ·
1 Parent(s): 1e2d689

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +30 -0
  2. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/chat_template.jinja +85 -0
  3. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/config.json +32 -0
  4. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/generation_config.json +11 -0
  5. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/model.safetensors +3 -0
  6. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/optimizer.pt +3 -0
  7. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_0.pth +3 -0
  8. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_1.pth +3 -0
  9. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_2.pth +3 -0
  10. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_3.pth +3 -0
  11. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/scheduler.pt +3 -0
  12. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/tokenizer.json +3 -0
  13. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/tokenizer_config.json +21 -0
  14. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/trainer_state.json +0 -0
  15. runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/training_args.bin +3 -0
  16. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1152/model.safetensors +1 -1
  17. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1152/optimizer.pt +1 -1
  18. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1152/trainer_state.json +0 -0
  19. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1440/model.safetensors +1 -1
  20. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1440/optimizer.pt +1 -1
  21. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1440/trainer_state.json +0 -0
  22. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/chat_template.jinja +85 -0
  23. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/config.json +32 -0
  24. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/generation_config.json +11 -0
  25. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/model.safetensors +3 -0
  26. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/optimizer.pt +3 -0
  27. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_0.pth +3 -0
  28. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_1.pth +3 -0
  29. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_2.pth +3 -0
  30. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_3.pth +3 -0
  31. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/scheduler.pt +3 -0
  32. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/tokenizer.json +3 -0
  33. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/tokenizer_config.json +21 -0
  34. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/trainer_state.json +0 -0
  35. runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/training_args.bin +3 -0
  36. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/chat_template.jinja +85 -0
  37. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/config.json +32 -0
  38. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/generation_config.json +11 -0
  39. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/model.safetensors +3 -0
  40. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/optimizer.pt +3 -0
  41. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_0.pth +3 -0
  42. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_1.pth +3 -0
  43. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_2.pth +3 -0
  44. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_3.pth +3 -0
  45. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/scheduler.pt +3 -0
  46. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/tokenizer.json +3 -0
  47. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/tokenizer_config.json +21 -0
  48. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/trainer_state.json +0 -0
  49. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/training_args.bin +3 -0
  50. runs/mask15-l2r50-i2-fulle-lm/checkpoint-2304/chat_template.jinja +85 -0
.gitattributes CHANGED
@@ -755,3 +755,33 @@ runs/mask5-l2r50-fulle-lm/checkpoint-8352/tokenizer.json filter=lfs diff=lfs mer
755
  runs/mask5-l2r50-fulle-lm/checkpoint-864/tokenizer.json filter=lfs diff=lfs merge=lfs -text
756
  runs/mask5-l2r50-fulle-lm/checkpoint-8640/tokenizer.json filter=lfs diff=lfs merge=lfs -text
757
  runs/mask5-l2r50-fulle-lm/checkpoint-8928/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
755
  runs/mask5-l2r50-fulle-lm/checkpoint-864/tokenizer.json filter=lfs diff=lfs merge=lfs -text
756
  runs/mask5-l2r50-fulle-lm/checkpoint-8640/tokenizer.json filter=lfs diff=lfs merge=lfs -text
757
  runs/mask5-l2r50-fulle-lm/checkpoint-8928/tokenizer.json filter=lfs diff=lfs merge=lfs -text
758
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/tokenizer.json filter=lfs diff=lfs merge=lfs -text
759
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/tokenizer.json filter=lfs diff=lfs merge=lfs -text
760
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/tokenizer.json filter=lfs diff=lfs merge=lfs -text
761
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-2304/tokenizer.json filter=lfs diff=lfs merge=lfs -text
762
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-2592/tokenizer.json filter=lfs diff=lfs merge=lfs -text
763
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-2880/tokenizer.json filter=lfs diff=lfs merge=lfs -text
764
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-3168/tokenizer.json filter=lfs diff=lfs merge=lfs -text
765
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-3456/tokenizer.json filter=lfs diff=lfs merge=lfs -text
766
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-3744/tokenizer.json filter=lfs diff=lfs merge=lfs -text
767
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-4032/tokenizer.json filter=lfs diff=lfs merge=lfs -text
768
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-4320/tokenizer.json filter=lfs diff=lfs merge=lfs -text
769
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-4608/tokenizer.json filter=lfs diff=lfs merge=lfs -text
770
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-4896/tokenizer.json filter=lfs diff=lfs merge=lfs -text
771
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-5184/tokenizer.json filter=lfs diff=lfs merge=lfs -text
772
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-5472/tokenizer.json filter=lfs diff=lfs merge=lfs -text
773
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-5760/tokenizer.json filter=lfs diff=lfs merge=lfs -text
774
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-6048/tokenizer.json filter=lfs diff=lfs merge=lfs -text
775
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-6336/tokenizer.json filter=lfs diff=lfs merge=lfs -text
776
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-6624/tokenizer.json filter=lfs diff=lfs merge=lfs -text
777
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-6912/tokenizer.json filter=lfs diff=lfs merge=lfs -text
778
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-7200/tokenizer.json filter=lfs diff=lfs merge=lfs -text
779
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-7488/tokenizer.json filter=lfs diff=lfs merge=lfs -text
780
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-7776/tokenizer.json filter=lfs diff=lfs merge=lfs -text
781
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-8064/tokenizer.json filter=lfs diff=lfs merge=lfs -text
782
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-8352/tokenizer.json filter=lfs diff=lfs merge=lfs -text
783
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-8640/tokenizer.json filter=lfs diff=lfs merge=lfs -text
784
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-8928/tokenizer.json filter=lfs diff=lfs merge=lfs -text
785
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-9216/tokenizer.json filter=lfs diff=lfs merge=lfs -text
786
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-9504/tokenizer.json filter=lfs diff=lfs merge=lfs -text
787
+ runs/mask15-l2r50-i2-fulle-lm/checkpoint-9792/tokenizer.json filter=lfs diff=lfs merge=lfs -text
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/chat_template.jinja ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
27
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
28
+ {%- elif message.role == "assistant" %}
29
+ {%- set content = message.content %}
30
+ {%- set reasoning_content = '' %}
31
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
32
+ {%- set reasoning_content = message.reasoning_content %}
33
+ {%- else %}
34
+ {%- if '</think>' in message.content %}
35
+ {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
36
+ {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+ {%- if loop.index0 > ns.last_query_index %}
40
+ {%- if loop.last or (not loop.last and reasoning_content) %}
41
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
42
+ {%- else %}
43
+ {{- '<|im_start|>' + message.role + '\n' + content }}
44
+ {%- endif %}
45
+ {%- else %}
46
+ {{- '<|im_start|>' + message.role + '\n' + content }}
47
+ {%- endif %}
48
+ {%- if message.tool_calls %}
49
+ {%- for tool_call in message.tool_calls %}
50
+ {%- if (loop.first and content) or (not loop.first) %}
51
+ {{- '\n' }}
52
+ {%- endif %}
53
+ {%- if tool_call.function %}
54
+ {%- set tool_call = tool_call.function %}
55
+ {%- endif %}
56
+ {{- '<tool_call>\n{"name": "' }}
57
+ {{- tool_call.name }}
58
+ {{- '", "arguments": ' }}
59
+ {%- if tool_call.arguments is string %}
60
+ {{- tool_call.arguments }}
61
+ {%- else %}
62
+ {{- tool_call.arguments | tojson }}
63
+ {%- endif %}
64
+ {{- '}\n</tool_call>' }}
65
+ {%- endfor %}
66
+ {%- endif %}
67
+ {{- '<|im_end|>\n' }}
68
+ {%- elif message.role == "tool" %}
69
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
70
+ {{- '<|im_start|>user' }}
71
+ {%- endif %}
72
+ {{- '\n<tool_response>\n' }}
73
+ {{- message.content }}
74
+ {{- '\n</tool_response>' }}
75
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
76
+ {{- '<|im_end|>\n' }}
77
+ {%- endif %}
78
+ {%- endif %}
79
+ {%- endfor %}
80
+ {%- if add_generation_prompt %}
81
+ {{- '<|im_start|>assistant\n' }}
82
+ {%- if enable_thinking is defined and enable_thinking is false %}
83
+ {{- '<think>\n\n</think>\n\n' }}
84
+ {%- endif %}
85
+ {%- endif %}
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "dtype": "float32",
9
+ "eos_token_id": 151645,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 512,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1536,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 4,
19
+ "num_hidden_layers": 20,
20
+ "num_key_value_heads": 4,
21
+ "pad_token_id": 151645,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-06,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.5.0",
30
+ "use_cache": false,
31
+ "vocab_size": 151674
32
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": [
4
+ 151645
5
+ ],
6
+ "output_attentions": false,
7
+ "output_hidden_states": false,
8
+ "pad_token_id": 151645,
9
+ "transformers_version": "5.5.0",
10
+ "use_cache": true
11
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f60f9a032cc0c2afaa21c341128b61fa814afd3a9cfcb309e9655609b29ba99
3
+ size 583362376
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b296d0fa560a6cce058eee25aaa86d6ba45899727c5c539d899077f6cf4e706
3
+ size 1166837626
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92b125bdeb3a9d13011c04d5c745ea7dca5eede33a4ec325a8cea8700cf40526
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3501d70c8ba215377f1dacd880303aadc301b1cb3803b0c7d126b157bc9e0c6d
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53427389b3c4b9c65f1f8236156e43edb2c0aa401e6a5d05443e7b1fafeeb303
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fac4666c874f9cd0e8ac0b7d52a2feb6a787ab120849d47936d32f203ba284e
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:382f5d43bf4270795579ec5ec62380276c99a156f2c669880121f6b6e7d6b332
3
+ size 1064
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60e99075d371ecbb9f1dde97363f612d45bf0bf88f1a2006d9bfcf1939333c14
3
+ size 11424648
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/tokenizer_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|l2r_pred|>",
10
+ "<|r2l_pred|>",
11
+ "<|next_1_pred|>",
12
+ "<|next_2_pred|>",
13
+ "<|mask|>"
14
+ ],
15
+ "is_local": false,
16
+ "model_max_length": 131072,
17
+ "pad_token": "<|im_end|>",
18
+ "split_special_tokens": false,
19
+ "tokenizer_class": "Qwen2Tokenizer",
20
+ "unk_token": null
21
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
runs/mask15-l2r50-i2-fulle-lm/checkpoint-10080/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40fb25263250c08c3479a6f0ac9fdf1f196e2a3b08a4eb10384786ff9b1903ef
3
+ size 4792
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1152/model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ffe1e08b4029f005c849c88b50a316524a347d2e07c34a943a74a14cad3689ae
3
  size 583362376
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:675add4a12722e17793b8d3ccc37828d793fe8df49e919ad62a4447f231c5735
3
  size 583362376
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1152/optimizer.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c4af92d4f36cd57db42725af078d57ed2acd8f24e0b3cffe329864d680577c40
3
  size 1166837626
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00a867b2c01b029e5b84e0c60c885da0af6f995e008db81ec955490df30b00ae
3
  size 1166837626
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1152/trainer_state.json CHANGED
The diff for this file is too large to render. See raw diff
 
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1440/model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7ab162fa96483f968ae7ded2cf2b482442f54e0da91166a0b597716364e7c064
3
  size 583362376
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8a889229cd5d0f79969a37b1cbae741db3ad769d74f48ef8b7e490e866a7936
3
  size 583362376
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1440/optimizer.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:80e0b92eff1988e3f1b7e6cc77dcc94de424b81f7d783bcaa3d266463e964d8f
3
  size 1166837626
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ecb8064dd8139bd1b4b48d39b21fba91e43d28855da0fffd86421888e5dbc437
3
  size 1166837626
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1440/trainer_state.json CHANGED
The diff for this file is too large to render. See raw diff
 
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/chat_template.jinja ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
27
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
28
+ {%- elif message.role == "assistant" %}
29
+ {%- set content = message.content %}
30
+ {%- set reasoning_content = '' %}
31
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
32
+ {%- set reasoning_content = message.reasoning_content %}
33
+ {%- else %}
34
+ {%- if '</think>' in message.content %}
35
+ {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
36
+ {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+ {%- if loop.index0 > ns.last_query_index %}
40
+ {%- if loop.last or (not loop.last and reasoning_content) %}
41
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
42
+ {%- else %}
43
+ {{- '<|im_start|>' + message.role + '\n' + content }}
44
+ {%- endif %}
45
+ {%- else %}
46
+ {{- '<|im_start|>' + message.role + '\n' + content }}
47
+ {%- endif %}
48
+ {%- if message.tool_calls %}
49
+ {%- for tool_call in message.tool_calls %}
50
+ {%- if (loop.first and content) or (not loop.first) %}
51
+ {{- '\n' }}
52
+ {%- endif %}
53
+ {%- if tool_call.function %}
54
+ {%- set tool_call = tool_call.function %}
55
+ {%- endif %}
56
+ {{- '<tool_call>\n{"name": "' }}
57
+ {{- tool_call.name }}
58
+ {{- '", "arguments": ' }}
59
+ {%- if tool_call.arguments is string %}
60
+ {{- tool_call.arguments }}
61
+ {%- else %}
62
+ {{- tool_call.arguments | tojson }}
63
+ {%- endif %}
64
+ {{- '}\n</tool_call>' }}
65
+ {%- endfor %}
66
+ {%- endif %}
67
+ {{- '<|im_end|>\n' }}
68
+ {%- elif message.role == "tool" %}
69
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
70
+ {{- '<|im_start|>user' }}
71
+ {%- endif %}
72
+ {{- '\n<tool_response>\n' }}
73
+ {{- message.content }}
74
+ {{- '\n</tool_response>' }}
75
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
76
+ {{- '<|im_end|>\n' }}
77
+ {%- endif %}
78
+ {%- endif %}
79
+ {%- endfor %}
80
+ {%- if add_generation_prompt %}
81
+ {{- '<|im_start|>assistant\n' }}
82
+ {%- if enable_thinking is defined and enable_thinking is false %}
83
+ {{- '<think>\n\n</think>\n\n' }}
84
+ {%- endif %}
85
+ {%- endif %}
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "dtype": "float32",
9
+ "eos_token_id": 151645,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 512,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1536,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 4,
19
+ "num_hidden_layers": 20,
20
+ "num_key_value_heads": 4,
21
+ "pad_token_id": 151645,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-06,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.5.0",
30
+ "use_cache": false,
31
+ "vocab_size": 151674
32
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": [
4
+ 151645
5
+ ],
6
+ "output_attentions": false,
7
+ "output_hidden_states": false,
8
+ "pad_token_id": 151645,
9
+ "transformers_version": "5.5.0",
10
+ "use_cache": true
11
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5ac1943ccc370bc0a3a28f3893d2b8ab2ac88cadf8116f2bef86fe3bda657f7
3
+ size 583362376
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81af4b5ca75f38d31715a85c91ff60915a37be7734c5c558ba16136f0b522f9e
3
+ size 1166837626
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fa6666015a0472dc2506d82087e7bf4ef935f6dbfae79569a3e13b8ed1e9b5c
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:321eb5fe2f0088768aaa8bfd51c716dff8493a1b3b0a43dd5315817b439c8b33
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76e9a98fb54704c77cb3a16c355efff7af706e3f19acea98d5f53d5be704061d
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2663f8b38e65aa69d44d5fad66a018f47a57d69f48a7166f5ed4a4bee1f8d14b
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6a6171dda32af3a9caef592bd2cfcdef1224bfed4ddda14026d355f2f43e8f1
3
+ size 1064
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60e99075d371ecbb9f1dde97363f612d45bf0bf88f1a2006d9bfcf1939333c14
3
+ size 11424648
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/tokenizer_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|l2r_pred|>",
10
+ "<|r2l_pred|>",
11
+ "<|next_1_pred|>",
12
+ "<|next_2_pred|>",
13
+ "<|mask|>"
14
+ ],
15
+ "is_local": false,
16
+ "model_max_length": 131072,
17
+ "pad_token": "<|im_end|>",
18
+ "split_special_tokens": false,
19
+ "tokenizer_class": "Qwen2Tokenizer",
20
+ "unk_token": null
21
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
runs/mask15-l2r50-i2-fulle-lm/checkpoint-1728/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40fb25263250c08c3479a6f0ac9fdf1f196e2a3b08a4eb10384786ff9b1903ef
3
+ size 4792
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/chat_template.jinja ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
27
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
28
+ {%- elif message.role == "assistant" %}
29
+ {%- set content = message.content %}
30
+ {%- set reasoning_content = '' %}
31
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
32
+ {%- set reasoning_content = message.reasoning_content %}
33
+ {%- else %}
34
+ {%- if '</think>' in message.content %}
35
+ {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
36
+ {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+ {%- if loop.index0 > ns.last_query_index %}
40
+ {%- if loop.last or (not loop.last and reasoning_content) %}
41
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
42
+ {%- else %}
43
+ {{- '<|im_start|>' + message.role + '\n' + content }}
44
+ {%- endif %}
45
+ {%- else %}
46
+ {{- '<|im_start|>' + message.role + '\n' + content }}
47
+ {%- endif %}
48
+ {%- if message.tool_calls %}
49
+ {%- for tool_call in message.tool_calls %}
50
+ {%- if (loop.first and content) or (not loop.first) %}
51
+ {{- '\n' }}
52
+ {%- endif %}
53
+ {%- if tool_call.function %}
54
+ {%- set tool_call = tool_call.function %}
55
+ {%- endif %}
56
+ {{- '<tool_call>\n{"name": "' }}
57
+ {{- tool_call.name }}
58
+ {{- '", "arguments": ' }}
59
+ {%- if tool_call.arguments is string %}
60
+ {{- tool_call.arguments }}
61
+ {%- else %}
62
+ {{- tool_call.arguments | tojson }}
63
+ {%- endif %}
64
+ {{- '}\n</tool_call>' }}
65
+ {%- endfor %}
66
+ {%- endif %}
67
+ {{- '<|im_end|>\n' }}
68
+ {%- elif message.role == "tool" %}
69
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
70
+ {{- '<|im_start|>user' }}
71
+ {%- endif %}
72
+ {{- '\n<tool_response>\n' }}
73
+ {{- message.content }}
74
+ {{- '\n</tool_response>' }}
75
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
76
+ {{- '<|im_end|>\n' }}
77
+ {%- endif %}
78
+ {%- endif %}
79
+ {%- endfor %}
80
+ {%- if add_generation_prompt %}
81
+ {{- '<|im_start|>assistant\n' }}
82
+ {%- if enable_thinking is defined and enable_thinking is false %}
83
+ {{- '<think>\n\n</think>\n\n' }}
84
+ {%- endif %}
85
+ {%- endif %}
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "dtype": "float32",
9
+ "eos_token_id": 151645,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 512,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1536,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 4,
19
+ "num_hidden_layers": 20,
20
+ "num_key_value_heads": 4,
21
+ "pad_token_id": 151645,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-06,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.5.0",
30
+ "use_cache": false,
31
+ "vocab_size": 151674
32
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": [
4
+ 151645
5
+ ],
6
+ "output_attentions": false,
7
+ "output_hidden_states": false,
8
+ "pad_token_id": 151645,
9
+ "transformers_version": "5.5.0",
10
+ "use_cache": true
11
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1db79a574e8bcf6573ad06b25d299e3107dda2917da7bd5739c7b09dc43a214d
3
+ size 583362376
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2959064d99bbc35d734e848627ea406a5796f3da9e93b08d52911e08258ae449
3
+ size 1166837626
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07a72b34a312263bd24397cedb076bbc6278a1dcb07fe9374f55a0b8670e9baf
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:181b5f286f5aa29521ec127c0f6273280a5e23b5a8ca7bc45cbc6d4a827a9f5c
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e57726130b053a40295ffe3b8a5b737a2bf6e15fdde32743844d1add5359574
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c7b99a7f549bd8e7a738a46e995227ce29515d887966b5a93a4685eb181a1c2
3
+ size 15024
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71f52a3ae3412b2053eb61b18dd446a6b3125f82036fb38a407b55123d55fdf7
3
+ size 1064
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60e99075d371ecbb9f1dde97363f612d45bf0bf88f1a2006d9bfcf1939333c14
3
+ size 11424648
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/tokenizer_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|l2r_pred|>",
10
+ "<|r2l_pred|>",
11
+ "<|next_1_pred|>",
12
+ "<|next_2_pred|>",
13
+ "<|mask|>"
14
+ ],
15
+ "is_local": false,
16
+ "model_max_length": 131072,
17
+ "pad_token": "<|im_end|>",
18
+ "split_special_tokens": false,
19
+ "tokenizer_class": "Qwen2Tokenizer",
20
+ "unk_token": null
21
+ }
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2016/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40fb25263250c08c3479a6f0ac9fdf1f196e2a3b08a4eb10384786ff9b1903ef
3
+ size 4792
runs/mask15-l2r50-i2-fulle-lm/checkpoint-2304/chat_template.jinja ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
27
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
28
+ {%- elif message.role == "assistant" %}
29
+ {%- set content = message.content %}
30
+ {%- set reasoning_content = '' %}
31
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
32
+ {%- set reasoning_content = message.reasoning_content %}
33
+ {%- else %}
34
+ {%- if '</think>' in message.content %}
35
+ {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
36
+ {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+ {%- if loop.index0 > ns.last_query_index %}
40
+ {%- if loop.last or (not loop.last and reasoning_content) %}
41
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
42
+ {%- else %}
43
+ {{- '<|im_start|>' + message.role + '\n' + content }}
44
+ {%- endif %}
45
+ {%- else %}
46
+ {{- '<|im_start|>' + message.role + '\n' + content }}
47
+ {%- endif %}
48
+ {%- if message.tool_calls %}
49
+ {%- for tool_call in message.tool_calls %}
50
+ {%- if (loop.first and content) or (not loop.first) %}
51
+ {{- '\n' }}
52
+ {%- endif %}
53
+ {%- if tool_call.function %}
54
+ {%- set tool_call = tool_call.function %}
55
+ {%- endif %}
56
+ {{- '<tool_call>\n{"name": "' }}
57
+ {{- tool_call.name }}
58
+ {{- '", "arguments": ' }}
59
+ {%- if tool_call.arguments is string %}
60
+ {{- tool_call.arguments }}
61
+ {%- else %}
62
+ {{- tool_call.arguments | tojson }}
63
+ {%- endif %}
64
+ {{- '}\n</tool_call>' }}
65
+ {%- endfor %}
66
+ {%- endif %}
67
+ {{- '<|im_end|>\n' }}
68
+ {%- elif message.role == "tool" %}
69
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
70
+ {{- '<|im_start|>user' }}
71
+ {%- endif %}
72
+ {{- '\n<tool_response>\n' }}
73
+ {{- message.content }}
74
+ {{- '\n</tool_response>' }}
75
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
76
+ {{- '<|im_end|>\n' }}
77
+ {%- endif %}
78
+ {%- endif %}
79
+ {%- endfor %}
80
+ {%- if add_generation_prompt %}
81
+ {{- '<|im_start|>assistant\n' }}
82
+ {%- if enable_thinking is defined and enable_thinking is false %}
83
+ {{- '<think>\n\n</think>\n\n' }}
84
+ {%- endif %}
85
+ {%- endif %}