Formatter 0.6B

  • Developed by: qingy2024
  • License: apache-2.0
  • Finetuned from model : Qwen3 0.6B (base)

This is mainly my experiment to play around with adding special tokens and changing the chat template while fine-tuning.

{%- set last_message = messages[-1] -%}
{%- if last_message.role == "user" -%}
{{- '<|problem_start|>\n' + last_message.content + '<|problem_end|>\n' -}}
{%- elif last_message.role == "assistant" -%}
{%- for message in messages -%}
{%- if message.role == "user" -%}
{{- '<|problem_start|>\n' + message.content + '<|problem_end|>\n' -}}
{%- elif message.role == "assistant" -%}
{{- '<|formatted_problem_start|>\n' + message.content + '<|formatted_problem_end|>\n' -}}
{%- else -%}
{{- raise('Unknown role: ' + message.role) -}}
{%- endif -%}
{%- endfor -%}
{%- else -%}
{{- raise('Unsupported role: ' + last_message.role) -}}
{%- endif -%}
{%- if add_generation_prompt and last_message.role == "user" -%}
{{- '<|formatted_problem_start|>\n' -}}
{%- endif -%}

Example:

User: Read the excerpt from Dr. Martin Luther King Jr.’s "I Have a Dream" speech.

I am not unmindful that some of you have come here out of great trials and tribulations. Some of you have come fresh from narrow jail cells. Some of you have come from areas where your quest for freedom left you battered by the storms of persecution and staggered by the winds of police brutality. You have been the veterans of creative suffering. Continue to work with the faith that unearned suffering is redemptive. Go back to Mississippi, go back to Alabama, go back to South Carolina, go back to Georgia, go back to Louisiana, go back to the slums and ghettos of our northern cities, knowing that somehow this situation can and will be changed. Let us not wallow in the valley of despair.

Which lines in this paragraph can be used as examples of metaphor? Select 3 options.

great trials and tribulations
storms of persecution
winds of police brutality
go back to Georgia
this situation can and will be changed
let us not wallow in the valley of despair
LLM: Read the excerpt from Dr. Martin Luther King Jr.’s "I Have a Dream" speech.

I am not unmindful that some of you have come here out of great trials and tribulations. Some of you have come fresh from narrow jail cells. Some of you have come from areas where your quest for freedom left you battered by the storms of persecution and staggered by the winds of police brutality. You have been the veterans of creative suffering. Continue to work with the faith that unearned suffering is redemptive. Go back to Mississippi, go back to Alabama, go back to South Carolina, go back to Georgia, go back to Louisiana, go back to the slums and ghettos of our northern cities, knowing that somehow this situation can and will be changed. Let us not wallow in the valley of despair.

Which lines in this paragraph can be used as examples of metaphor? Select 3 options.
A. great trials and tribulations
B. storms of persecution
C. winds of police brutality
D. go back to Georgia
E. this situation can and will be changed
F. let us not wallow in the valley of despair

Lessons Learned

  • When adding new tokens to the model, LoRA will be much worse. Use full fine-tuning to get better results.
  • Be very careful about chat templates. Every character/new line/space matters and not following that can make the model have worse performance.
  • For Qwen base models, leave the <|endoftext|> as the EOS token. Then you can train it to use other tokens like <|im_end|>. If you set the EOS token to <|im_end|>, the model will get confused.
  • For Qwen models in general, always put the <|endoftext|> at the end of each training example.

Downloads last month
4
Safetensors
Model size
0.6B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for qingy2024/Formatter-0.6B

Finetuned
(107)
this model
Quantizations
1 model

Collection including qingy2024/Formatter-0.6B