Haple commited on
Commit
917c867
·
verified ·
1 Parent(s): c11cbcd

Upload model trained with Unsloth

Browse files

Upload model trained with Unsloth 2x faster

Files changed (2) hide show
  1. chat_template.jinja +6 -3
  2. tokenizer_config.json +1 -1
chat_template.jinja CHANGED
@@ -1,3 +1,4 @@
 
1
  {{ bos_token }}
2
  {%- if messages[0]['role'] == 'system' -%}
3
  {%- if messages[0]['content'] is string -%}
@@ -35,13 +36,15 @@
35
  {{ item['text'] | trim }}
36
  {%- endif -%}
37
  {%- endfor -%}
38
- {%- else -%}
39
  {{ raise_exception("Invalid content type") }}
40
  {%- endif -%}
41
  {{ '<end_of_turn>
42
  ' }}
43
  {%- endfor -%}
44
  {%- if add_generation_prompt -%}
45
- {{ '<start_of_turn>model
46
- ' }}
47
  {%- endif -%}
 
 
 
1
+ {# Unsloth Chat template fixes #}
2
  {{ bos_token }}
3
  {%- if messages[0]['role'] == 'system' -%}
4
  {%- if messages[0]['content'] is string -%}
 
36
  {{ item['text'] | trim }}
37
  {%- endif -%}
38
  {%- endfor -%}
39
+ {%- elif message['content'] is defined -%}
40
  {{ raise_exception("Invalid content type") }}
41
  {%- endif -%}
42
  {{ '<end_of_turn>
43
  ' }}
44
  {%- endfor -%}
45
  {%- if add_generation_prompt -%}
46
+ {{'<start_of_turn>model
47
+ '}}
48
  {%- endif -%}
49
+
50
+ {# Copyright 2025-present Unsloth. Apache 2.0 License. #}
tokenizer_config.json CHANGED
@@ -51336,7 +51336,7 @@
51336
  "image_token": "<image_soft_token>",
51337
  "model_max_length": 32768,
51338
  "pad_token": "<pad>",
51339
- "padding_side": "right",
51340
  "sp_model_kwargs": null,
51341
  "spaces_between_special_tokens": false,
51342
  "tokenizer_class": "GemmaTokenizer",
 
51336
  "image_token": "<image_soft_token>",
51337
  "model_max_length": 32768,
51338
  "pad_token": "<pad>",
51339
+ "padding_side": "left",
51340
  "sp_model_kwargs": null,
51341
  "spaces_between_special_tokens": false,
51342
  "tokenizer_class": "GemmaTokenizer",