Shubhra Pandit commited on
Commit
266349d
·
1 Parent(s): 0263096

Upload instruct model files

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- bos_token }}
2
+ {%- if custom_tools is defined and custom_tools%}
3
+ {%- set tools = custom_tools %}
4
+ {%- endif %}
5
+ {%- if tools is defined and tools %}
6
+ {%- set tool_definition = tool_definition ~ (tools | tojson(indent=4)) %}
7
+ {%- else %}
8
+ {%- set tools = none %}
9
+ {%- endif %}
10
+
11
+
12
+ {#- This block extracts the system message, so we can slot it into the right place. #}
13
+ {%- if messages[0]['role'] == 'system' %}
14
+ {%- set user_provided_system_message = true %}
15
+ {%- if messages[0]['content'] is string %}
16
+ {%- set system_message = messages[0]['content']|trim %}
17
+ {%- else %}
18
+ {%- set system_message = messages[0]['content'][0]['text']|trim %}
19
+ {%- endif %}
20
+ {%- set messages = messages[1:] %}
21
+ {%- else %}
22
+ {%- if tools is not none %}
23
+ {#- Since not system_message was provided by user, if tool is provided, system_message is now default tool system message #}
24
+ {#- This system message is from llama website:https://www.llama.com/docs/model-cards-and-prompt-formats/llama4/ #}
25
+ {%- set system_message = "You are a helpful assistant and an expert in function composition. You can answer general questions using your internal knowledge OR invoke functions when necessary. Follow these strict guidelines:\n\n1. FUNCTION CALLS:\n- ONLY use functions that are EXPLICITLY listed in the function list below\n- If NO functions are listed (empty function list []), respond ONLY with internal knowledge or \"I don't have access to [Unavailable service] information\"\n- If a function is not in the list, respond ONLY with internal knowledge or \"I don't have access to [Unavailable service] information\"\n- If ALL required parameters are present AND the query EXACTLY matches a listed function's purpose: output ONLY the function call(s)\n- Use exact format: [func_name1(param1=value1, param2=value2), func_name2(...)]\nExamples:\nCORRECT: [get_weather(location=\"Vancouver\"), calculate_route(start=\"Boston\", end=\"New York\")] <- Only if get_weather and calculate_route are in function list\nINCORRECT: get_weather(location=\"New York\")\nINCORRECT: Let me check the weather: [get_weather(location=\"New York\")]\nINCORRECT: [get_events(location=\"Singapore\")] <- If function not in list\n\n2. RESPONSE RULES:\n- For pure function requests matching a listed function: ONLY output the function call(s)\n- For knowledge questions: ONLY output text\n- For missing parameters: ONLY request the specific missing parameters\n- For unavailable services (not in function list): output ONLY with internal knowledge or \"I don't have access to [Unavailable service] information\". Do NOT execute a function call.\n- If the query asks for information beyond what a listed function provides: output ONLY with internal knowledge about your limitations\n- NEVER combine text and function calls in the same response\n- NEVER suggest alternative functions when the requested service is unavailable\n- NEVER create or invent new functions not listed below\n\n3. STRICT BOUNDARIES:\n- ONLY use functions from the list below - no exceptions\n- NEVER use a function as an alternative to unavailable information\n- NEVER call functions not present in the function list\n- NEVER add explanatory text to function calls\n- NEVER respond with empty brackets\n- Use proper Python/JSON syntax for function calls\n- Check the function list carefully before responding\n\n4. TOOL RESPONSE HANDLING:\n- When receiving tool responses: provide concise, natural language responses\n- Don't repeat tool response verbatim\n- Don't add supplementary information\n\nHere is a list of functions in JSON format that you can invoke:\n" %}
26
+ {%- else %}
27
+ {%- set system_message = "" %}
28
+ {%- endif %}
29
+ {%- endif %}
30
+ {#- Now writing the system message: use the user provided system message if user_provided_system_message, else default tool system message if tools presented #}
31
+ {%- if system_message %}
32
+ {#- always use user provided system message to override default tool system message #}
33
+ {{- "<|header_start|>system<|header_end|>\n\n" }}
34
+ {{- system_message }}
35
+ {%- if user_provided_system_message and tools %}
36
+ {{- "\nHere is a list of functions in JSON format that you can invoke. Use exact format: [func_name1(param1=value1, param2=value2), func_name2(...)]\n" }}
37
+ {{- tool_definition -}}
38
+ {%- elif tool_definition %}
39
+ {{- tool_definition -}}
40
+ {%- endif %}
41
+ {{- "<|eot|>" }}
42
+ {%- endif %}
43
+
44
+ {#- Now deal with all other messages #}
45
+ {%- for message in messages %}
46
+ {#- Base case: messages that are not from tool role and has empty tool_call list #}
47
+ {%- if not (message.role == 'ipython' or message.role == 'tool' or ('tool_calls' in message and message.tool_calls|length != 0 )) %}
48
+ {{- '<|header_start|>' + message['role'] + '<|header_end|>\n\n' }}
49
+ {%- if message['content'] is string %}
50
+ {{- message['content'] }}
51
+ {%- else %}
52
+ {%- for content in message['content'] %}
53
+ {%- if content['type'] == 'image' %}
54
+ {{- '<|image|>' }}
55
+ {%- elif content['type'] == 'text' %}
56
+ {{- content['text'] | trim }}
57
+ {%- endif %}
58
+ {%- endfor %}
59
+ {%- endif %}
60
+ {{- "<|eot|>" }}
61
+ {#- Tool case: messages has non-empty tool_call list, must from assistant #}
62
+ {%- elif 'tool_calls' in message %}
63
+ {#- assume tool_calls are always coming from assistant #}
64
+ {%- if message.role == 'assistant' %}
65
+ {{- '<|header_start|>assistant<|header_end|>\n\n' -}}
66
+ {%- if message['content'] is string %}
67
+ {{- message['content'] }}
68
+ {%- else %}
69
+ {%- for content in message['content'] %}
70
+ {%- if content['type'] == 'image' %}
71
+ {{- '<|image|>' }}
72
+ {%- elif content['type'] == 'text' %}
73
+ {{- content['text'] }}
74
+ {%- endif %}
75
+ {%- endfor %}
76
+ {%- endif %}
77
+ {{- "[" }}
78
+ {%- for tool_call in message.tool_calls %}
79
+ {%- if tool_call.function is defined %}
80
+ {%- set tool_call = tool_call.function %}
81
+ {%- endif %}
82
+ {{- tool_call.name + '(' -}}
83
+ {%- for param in tool_call.arguments %}
84
+ {{- param + '="' -}}
85
+ {{- "%s" | format(tool_call.arguments[param]) -}}
86
+ {{- '"' -}}
87
+ {% if not loop.last %}, {% endif %}
88
+ {%- endfor %}
89
+ {{- ')' -}}
90
+ {% if not loop.last %}, {% endif %}
91
+ {%- endfor %}
92
+ {{- "]<|eot|>" }}
93
+ {%- endif %}
94
+ {#- Tool_response case: messages are from tool_response #}
95
+ {%- elif message.role == "tool" or message.role == "ipython" %}
96
+ {{- "<|header_start|>ipython<|header_end|>\n\n" }}
97
+ {%- if message.content is string %}
98
+ {{- message.content | tojson }}
99
+ {%- else %}
100
+ {%- for content in message['content'] %}
101
+ {%- if content['type'] == 'text' %}
102
+ {{- content['text'] | tojson }}
103
+ {%- endif %}
104
+ {%- endfor %}
105
+ {%- endif %}
106
+ {{- "<|eot|>" }}
107
+ {%- endif %}
108
+ {%- endfor %}
109
+ {%- if add_generation_prompt %}
110
+ {{- '<|header_start|>assistant<|header_end|>\n\n' }}
111
+ {%- endif %}
config.json CHANGED
@@ -497,14 +497,12 @@
497
  "quantization_status": "compressed"
498
  },
499
  "text_config": {
500
- "_attn_implementation_autoset": true,
501
  "attention_bias": false,
502
  "attention_chunk_size": 8192,
503
  "attention_dropout": 0.0,
504
  "attn_scale": 0.1,
505
- "attn_temperature_tuning": 4,
506
  "bos_token_id": 200000,
507
- "cache_implementation": "hybrid",
508
  "eos_token_id": [
509
  200001,
510
  200007,
@@ -519,7 +517,57 @@
519
  "interleave_moe_layer_step": 1,
520
  "intermediate_size": 8192,
521
  "intermediate_size_mlp": 16384,
522
- "max_position_embeddings": 262144,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  "model_type": "llama4_text",
524
  "moe_layers": [
525
  0,
@@ -646,9 +694,8 @@
646
  },
647
  "tie_word_embeddings": false,
648
  "torch_dtype": "bfloat16",
649
- "transformers_version": "4.51.3",
650
  "vision_config": {
651
- "_attn_implementation_autoset": true,
652
  "attention_dropout": 0.0,
653
  "hidden_act": "gelu",
654
  "hidden_size": 1408,
 
497
  "quantization_status": "compressed"
498
  },
499
  "text_config": {
 
500
  "attention_bias": false,
501
  "attention_chunk_size": 8192,
502
  "attention_dropout": 0.0,
503
  "attn_scale": 0.1,
504
+ "attn_temperature_tuning": true,
505
  "bos_token_id": 200000,
 
506
  "eos_token_id": [
507
  200001,
508
  200007,
 
517
  "interleave_moe_layer_step": 1,
518
  "intermediate_size": 8192,
519
  "intermediate_size_mlp": 16384,
520
+ "layer_types": [
521
+ "chunked_attention",
522
+ "chunked_attention",
523
+ "chunked_attention",
524
+ "full_attention",
525
+ "chunked_attention",
526
+ "chunked_attention",
527
+ "chunked_attention",
528
+ "full_attention",
529
+ "chunked_attention",
530
+ "chunked_attention",
531
+ "chunked_attention",
532
+ "full_attention",
533
+ "chunked_attention",
534
+ "chunked_attention",
535
+ "chunked_attention",
536
+ "full_attention",
537
+ "chunked_attention",
538
+ "chunked_attention",
539
+ "chunked_attention",
540
+ "full_attention",
541
+ "chunked_attention",
542
+ "chunked_attention",
543
+ "chunked_attention",
544
+ "full_attention",
545
+ "chunked_attention",
546
+ "chunked_attention",
547
+ "chunked_attention",
548
+ "full_attention",
549
+ "chunked_attention",
550
+ "chunked_attention",
551
+ "chunked_attention",
552
+ "full_attention",
553
+ "chunked_attention",
554
+ "chunked_attention",
555
+ "chunked_attention",
556
+ "full_attention",
557
+ "chunked_attention",
558
+ "chunked_attention",
559
+ "chunked_attention",
560
+ "full_attention",
561
+ "chunked_attention",
562
+ "chunked_attention",
563
+ "chunked_attention",
564
+ "full_attention",
565
+ "chunked_attention",
566
+ "chunked_attention",
567
+ "chunked_attention",
568
+ "full_attention"
569
+ ],
570
+ "max_position_embeddings": 10485760,
571
  "model_type": "llama4_text",
572
  "moe_layers": [
573
  0,
 
694
  },
695
  "tie_word_embeddings": false,
696
  "torch_dtype": "bfloat16",
697
+ "transformers_version": "4.53.1",
698
  "vision_config": {
 
699
  "attention_dropout": 0.0,
700
  "hidden_act": "gelu",
701
  "hidden_size": 1408,
generation_config.json CHANGED
@@ -9,5 +9,5 @@
9
  "pad_token_id": 200018,
10
  "temperature": 0.6,
11
  "top_p": 0.9,
12
- "transformers_version": "4.51.3"
13
  }
 
9
  "pad_token_id": 200018,
10
  "temperature": 0.6,
11
  "top_p": 0.9,
12
+ "transformers_version": "4.53.1"
13
  }
model-00001-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dc7b88bc57571ff82228e80c6be212280ef638d2dd9d258d88a75f339c6a9a8b
3
  size 4997823520
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4da8407d857d17bcd05231f7e41c35bcc293e54c163849297374ea68a2dac7d
3
  size 4997823520
model-00002-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b1bac3c424c76ef64a7857cd426bd0d358ceba1244c3dc4131f7deb2feb4d970
3
  size 4989453616
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bdc7cf9113309ed9dd69745974862104b833c126d55472680df1570249a3c53
3
  size 4989453616
model-00003-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:91de6560623a44a52062cecaaa3dbc3ebe36258b4f5262e8ed53c60697b432f0
3
  size 4986832064
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d725a42361ae6254b4f26eb52714ad9b67dec525738a40d027f84ecda86d259f
3
  size 4986832064
model-00004-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5967e8cd6d63de00c2b7820fb5b857db80584deaacb74d8ab04d37b036e5c9fd
3
  size 4986832528
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0892df63ced6ea6416d308631c12be54ea9d26d2d6e73f90f7b938c9baf3af6
3
  size 4986832528
model-00005-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c41351802c2cf716aac5bc4e8c8cf33488fe286bf66023c53960276410e07877
3
  size 4999758176
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0bacd195d34c2a6f7592b98cb9e646e4480dcdf638766c29f31476c97f04b27
3
  size 4999758176
model-00006-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6cb387ad077829e40dde85b4da96b5fe76d18ce14ce0fe3fd5c883e04bda029b
3
  size 4989454400
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da3cb51b52e3899d605846550ab2dcd0a83085e9b758a3b946f3d38d56f83cbe
3
  size 4989454400
model-00007-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:81b67a56a5fc6b2c6caf546145878b757a29d8a5e51359d3002ea4ddc8fea9ec
3
  size 4986832856
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0816f5416e8154f3e420c3b5947bea9d20097ed2c4855d51d7b51afaa149d549
3
  size 4986832856
model-00008-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:03115aa98c59a7fab0180a2be0b00b655c2f0ba3b3d71e4fb56126820fc2a064
3
  size 4986832864
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4edd3862bebdea962395292445eb2ab691c451c1e156900ce490f5dc9dbd5c8e
3
  size 4986832864
model-00009-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6304b9722fedc44e3922ff72f4a1745b0fec866f3d44860fb6fc93eb2619537a
3
  size 4999758176
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d00f7112cbeeee08dbc5d71ea183aa86c1a6c9ddd2c4e5dc6ae1902b5f571b4a
3
  size 4999758176
model-00010-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:75c7b4b302c780b58b60cfffe94f0a3834d0b1aa345551e452a0ec3c03862afc
3
  size 4989454400
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d63562829bfb753204a01670fbc811c3aa71e257b5b1149771aed0a8a7f6c40
3
  size 4989454400
model-00011-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:17420dbe5720ae83e5be36b5adca51444039cb3c5f3cd6c0351f8a142c353e09
3
  size 4986832848
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:807d4fbbc5b6789b5f90217b5b9ba0ece1d7a23f13d19417fc00fe222a5503f4
3
  size 4986832848
model-00012-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a059faa7122aa0a4da64c725e208ec89cf9b4f541ea100193e4c0b186a1ed4f1
3
  size 4986832856
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7545058c39f50c49cb535deb990953ca3459de47a48f206002d4b7c11c59896b
3
  size 4986832856
model-00013-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:666b4874f30af5a7f77bdc66eacceb2ec5a1c16d5a65bebe421141794872adca
3
  size 4999758184
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:721bcf76f6a0fb50fa3971da9df9b9de70889fddda6817d731c538cccd1917f3
3
  size 4999758184
model-00014-of-00014.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4cd82f83dbd50da85a939538085369c3b0142367b6bf8635e46bbea2a373a832
3
  size 4801140400
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57158a6bed072933c8322bf6524c966f3d5acab2646671c59149de776d4ef469
3
  size 4801140400
model.safetensors.index.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "metadata": {
 
3
  "total_size": 69686048896
4
  },
5
  "weight_map": {
 
1
  {
2
  "metadata": {
3
+ "total_parameters": 63720802592,
4
  "total_size": 69686048896
5
  },
6
  "weight_map": {
preprocessor_config.json CHANGED
@@ -3,6 +3,7 @@
3
  "data_format": "channels_first",
4
  "default_to_square": true,
5
  "device": null,
 
6
  "do_center_crop": null,
7
  "do_convert_rgb": true,
8
  "do_normalize": true,
 
3
  "data_format": "channels_first",
4
  "default_to_square": true,
5
  "device": null,
6
+ "disable_grouping": null,
7
  "do_center_crop": null,
8
  "do_convert_rgb": true,
9
  "do_normalize": true,
recipe.yaml CHANGED
@@ -2,6 +2,6 @@ default_stage:
2
  default_modifiers:
3
  QuantizationModifier:
4
  targets: [Linear]
5
- ignore: ['re:.*lm_head', 're:.*self_attn', 're:.*router', 're:.*vision_model', 're:.*multi_modal_projector',
6
- 're:.*multi_modal_projector', Llama4TextAttention]
7
  scheme: NVFP4
 
2
  default_modifiers:
3
  QuantizationModifier:
4
  targets: [Linear]
5
+ ignore: ['re:.*lm_head*', 're:.*self_attn*', 're:.*router*', 're:.*vision_model*', 're:.*multi_modal_projector*',
6
+ 're:.*multi_modal_projector*', Llama4TextAttention]
7
  scheme: NVFP4
tokenizer_config.json CHANGED
@@ -9082,7 +9082,6 @@
9082
  }
9083
  },
9084
  "bos_token": "<|begin_of_text|>",
9085
- "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- if strftime_now is defined %}\n {%- set date_string = strftime_now(\"%d %b %Y\") %}\n {%- else %}\n {%- set date_string = \"26 Jul 2024\" %}\n {%- endif %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %} \n {%- if messages[0]['content'] is string %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- else %}\n {#- FIXME: The processor requires an array, always. #}\n {%- set system_message = messages[0]['content'][0]['text']|trim %}\n {%- endif %}\n {%- set messages = messages[1:] %}\n {%- set user_supplied_system_message = true %}\n{%- else %}\n {%- set system_message = \"\" %}\n {%- set user_supplied_system_message = false %}\n{%- endif %}\n\n{#- System message if the user supplied one #}\n{%- if user_supplied_system_message %}\n {{- \"<|header_start|>system<|header_end|>\n\n\" }}\n {%- if tools is not none %}\n {{- \"Environment: ipython\n\" }}\n {%- endif %}\n {%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\n\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\n\n\" }}\n {%- endfor %}\n {%- endif %}\n {{- system_message }}\n {{- \"<|eot|>\" }}\n{%- endif %}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|header_start|>user<|header_end|>\n\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\n\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\n\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\n\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|header_start|>' + message['role'] + '<|header_end|>\n\n' }}\n {%- if message['content'] is string %}\n {{- message['content'] }}\n {%- else %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {{- '<|image|>' }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- \"<|eot|>\" }}\n {%- elif 'tool_calls' in message and message.tool_calls|length > 0 %}\n {{- '<|header_start|>assistant<|header_end|>\n\n' -}}\n {{- '<|python_start|>' }}\n {%- if message['content'] is string %}\n {{- message['content'] }}\n {%- else %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {{- '<|image|>' }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|python_end|>' }}\n {%- for tool_call in message.tool_calls %}\n {{- '{\"name\": \"' + tool_call.function.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.function.arguments | tojson }}\n {{- \"}\" }}\n {%- endfor %}\n {{- \"<|eot|>\" }}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|header_start|>ipython<|header_end|>\n\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|header_start|>assistant<|header_end|>\n\n' }}\n{%- endif %}\n",
9086
  "clean_up_tokenization_spaces": false,
9087
  "eos_token": "<|eot|>",
9088
  "extra_special_tokens": {},
@@ -9090,8 +9089,8 @@
9090
  "input_ids",
9091
  "attention_mask"
9092
  ],
9093
- "model_max_length": 262144,
9094
  "pad_token": "<|finetune_right_pad|>",
9095
  "processor_class": "Llama4Processor",
9096
- "tokenizer_class": "PreTrainedTokenizer"
9097
  }
 
9082
  }
9083
  },
9084
  "bos_token": "<|begin_of_text|>",
 
9085
  "clean_up_tokenization_spaces": false,
9086
  "eos_token": "<|eot|>",
9087
  "extra_special_tokens": {},
 
9089
  "input_ids",
9090
  "attention_mask"
9091
  ],
9092
+ "model_max_length": 10485760,
9093
  "pad_token": "<|finetune_right_pad|>",
9094
  "processor_class": "Llama4Processor",
9095
+ "tokenizer_class": "PreTrainedTokenizerFast"
9096
  }