Text Generation
Safetensors
GGUF
English
unsloth
qwen3_5
fda warning letters
medical devices
qwen-3.5-9b
conversational
Instructions to use protocolsyncllc/medgap-qwen-3.5-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use protocolsyncllc/medgap-qwen-3.5-9b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K # Run inference directly in the terminal: llama cli -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K # Run inference directly in the terminal: llama cli -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K # Run inference directly in the terminal: ./build/bin/llama cli -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Use Docker
docker model run hf.co/protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use protocolsyncllc/medgap-qwen-3.5-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "protocolsyncllc/medgap-qwen-3.5-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "protocolsyncllc/medgap-qwen-3.5-9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
- Ollama
How to use protocolsyncllc/medgap-qwen-3.5-9b with Ollama:
ollama run hf.co/protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
- Unsloth Desktop
- Pi
How to use protocolsyncllc/medgap-qwen-3.5-9b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "protocolsyncllc/medgap-qwen-3.5-9b:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use protocolsyncllc/medgap-qwen-3.5-9b with Docker Model Runner:
docker model run hf.co/protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
- Lemonade
How to use protocolsyncllc/medgap-qwen-3.5-9b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Run and chat with the model
lemonade run user.medgap-qwen-3.5-9b-Q6_K
List all available models
lemonade list
- Hermes Agent
How to use protocolsyncllc/medgap-qwen-3.5-9b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use protocolsyncllc/medgap-qwen-3.5-9b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf protocolsyncllc/medgap-qwen-3.5-9b:Q6_K
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "protocolsyncllc/medgap-qwen-3.5-9b:Q6_K" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub
Browse filesFiles changed (16)
- Qwen3.5-9B_q8.gguf+2-2
- chat_template.jinja+25-21
- config.json+107-101
- generation_config.json+2-2
- lora/README.md+3-3
- lora/adapter_config.json+9-4
- lora/adapter_model.safetensors+1-1
- lora/chat_template.jinja+25-21
- lora/tokenizer.json+2-2
- lora/tokenizer_config.json+20-2
- model.safetensors-00001-of-00004.safetensors+1-1
- model.safetensors-00002-of-00004.safetensors+1-1
- model.safetensors-00003-of-00004.safetensors+1-1
- model.safetensors-00004-of-00004.safetensors+1-1
- tokenizer.json+2-2
- tokenizer_config.json+21-3
123version https://git-lfs.github.com/spec/v1oid sha256:7cd0c23c74b393f653092de1da28b8d0a6e03b6789e06f0d123aaf5a73529a86size 9786060064123version https://git-lfs.github.com/spec/v1oid sha256:74fd15f5ebecbac5f1f2b185cd8244a6b519587e008079d537e1a2a7cef04d63size 9786060544
41 unmodified lines4243444546473 unmodified lines51525354555657585960616263646566677 unmodified lines7576777879808182838485868788899025 unmodified lines11611711811912012112212316 unmodified lines1401411421431441451461473 unmodified lines15115215315441 unmodified lines{%- if not messages %}{{- raise_exception('No messages provided.') }}{%- endif %}{%- if tools and tools is iterable and tools is not mapping %}{{- '<|im_start|>system\n' }}{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}3 unmodified lines{%- endfor %}{{- "\n</tools>" }}{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}{%- if messages[0].role == 'system' %}{%- set content = render_content(messages[0].content, false, true)|trim %}{%- if content %}{{- '\n\n' + content }}{%- endif %}{%- endif %}{{- '<|im_end|>\n' }}{%- else %}{%- if messages[0].role == 'system' %}{%- set content = render_content(messages[0].content, false, true)|trim %}{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}7 unmodified lines{%- endif %}{%- endif %}{%- endfor %}{%- if ns.multi_step_tool %}{{- raise_exception('No user query found in messages.') }}{%- endif %}{%- for message in messages %}{%- set content = render_content(message.content, true)|trim %}{%- if message.role == "system" %}{%- if not loop.first %}{{- raise_exception('System message must be at the beginning.') }}{%- endif %}{%- elif message.role == "user" %}{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}{%- elif message.role == "assistant" %}{%- set reasoning_content = '' %}25 unmodified lines{%- else %}{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}{%- endif %}{%- if tool_call.arguments is defined %}{%- for args_name, args_value in tool_call.arguments|items %}{{- '<parameter=' + args_name + '>\n' }}{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}{{- args_value }}16 unmodified lines{%- elif loop.last %}{{- '<|im_end|>\n' }}{%- endif %}{%- else %}{{- raise_exception('Unexpected message role.') }}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}3 unmodified lines{%- else %}{{- '<think>\n' }}{%- endif %}{%- endif %}41 unmodified lines424344454647484950515253545556575859603 unmodified lines646566676869707172737475767 unmodified lines8485868788899091929325 unmodified lines11912012112212312412512612716 unmodified lines1441451461471481491503 unmodified lines15415515615715841 unmodified lines{%- if not messages %}{{- raise_exception('No messages provided.') }}{%- endif %}{%- set num_sys = 0 %}{%- set merged_system = '' %}{%- if messages[0].role == 'system' or messages[0].role == 'developer' %}{%- set first = render_content(messages[0].content, false, true)|trim %}{%- if messages|length > 1 and (messages[1].role == 'system' or messages[1].role == 'developer') %}{%- set second = render_content(messages[1].content, false, true)|trim %}{%- set merged_system = first + '\n' + second %}{%- set num_sys = 2 %}{%- else %}{%- set merged_system = first %}{%- set num_sys = 1 %}{%- endif %}{%- endif %}{%- if tools and tools is iterable and tools is not mapping %}{{- '<|im_start|>system\n' }}{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}3 unmodified lines{%- endfor %}{{- "\n</tools>" }}{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}{%- if merged_system %}{{- '\n\n' + merged_system }}{%- endif %}{{- '<|im_end|>\n' }}{%- else %}{%- if merged_system %}{{- '<|im_start|>system\n' + merged_system + '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}7 unmodified lines{%- endif %}{%- endif %}{%- endfor %}{%- for message in messages %}{%- if loop.index0 >= num_sys and message.role != "system" and message.role != "developer" %}{%- set content = render_content(message.content, true)|trim %}{%- if message.role == "user" %}{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}{%- elif message.role == "assistant" %}{%- set reasoning_content = '' %}25 unmodified lines{%- else %}{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}{%- endif %}{%- if tool_call.arguments is mapping %}{%- for args_name in tool_call.arguments %}{%- set args_value = tool_call.arguments[args_name] %}{{- '<parameter=' + args_name + '>\n' }}{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}{{- args_value }}16 unmodified lines{%- elif loop.last %}{{- '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}3 unmodified lines{%- else %}{{- '<think>\n' }}{%- endif %}{%- endif %}{#- Unsloth fixes - developer role, tool calling #}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106{"architectures": ["Qwen3_5ForConditionalGeneration"],"image_token_id": 248056,"model_type": "qwen3_5","text_config": {"attention_bias": false,"attention_dropout": 0.0,"attn_output_gate": true,"bos_token_id": null,"torch_dtype": "bfloat16","eos_token_id": 248044,"full_attention_interval": 4,"head_dim": 256,"hidden_act": "silu","hidden_size": 4096,"initializer_range": 0.02,"intermediate_size": 12288,"layer_types": ["linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention"],"linear_conv_kernel_dim": 4,"linear_key_head_dim": 128,"linear_num_key_heads": 16,"linear_num_value_heads": 32,"linear_value_head_dim": 128,"mamba_ssm_dtype": "float32","max_position_embeddings": 262144,"mlp_only_layers": [],"model_type": "qwen3_5_text","mtp_num_hidden_layers": 1,"mtp_use_dedicated_embeddings": false,"num_attention_heads": 16,"num_hidden_layers": 32,"num_key_value_heads": 4,"pad_token_id": null,"partial_rotary_factor": 0.25,"rms_norm_eps": 1e-06,"rope_parameters": {"mrope_interleaved": true,"mrope_section": [11,11,10],"partial_rotary_factor": 0.25,"rope_theta": 10000000,"rope_type": "default"},"tie_word_embeddings": false,"use_cache": true,"vocab_size": 248320},"tie_word_embeddings": false,"video_token_id": 248057,"vision_config": {"deepstack_visual_indexes": [],"depth": 27,"hidden_act": "gelu_pytorch_tanh","hidden_size": 1152,"in_channels": 3,"initializer_range": 0.02,"intermediate_size": 4304,"model_type": "qwen3_5_vision","num_heads": 16,"num_position_embeddings": 2304,"out_hidden_size": 4096,"patch_size": 16,"spatial_merge_size": 2,"temporal_patch_size": 2},"vision_end_token_id": 248054,"vision_start_token_id": 248053}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{"architectures": ["Qwen3_5ForConditionalGeneration"],"image_token_id": 248056,"model_type": "qwen3_5","mtp_num_hidden_layers": 1,"text_config": {"attention_bias": false,"attention_dropout": 0.0,"attn_output_gate": true,"bos_token_id": null,"torch_dtype": "bfloat16","eos_token_id": 248044,"full_attention_interval": 4,"head_dim": 256,"hidden_act": "silu","hidden_size": 4096,"initializer_range": 0.02,"intermediate_size": 12288,"layer_types": ["linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention"],"linear_conv_kernel_dim": 4,"linear_key_head_dim": 128,"linear_num_key_heads": 16,"linear_num_value_heads": 32,"linear_value_head_dim": 128,"mamba_ssm_dtype": "float32","max_position_embeddings": 262144,"mlp_only_layers": [],"model_type": "qwen3_5_text","mtp_num_hidden_layers": 1,"mtp_use_dedicated_embeddings": false,"num_attention_heads": 16,"num_hidden_layers": 32,"num_key_value_heads": 4,"pad_token_id": null,"rms_norm_eps": 1e-06,"rope_parameters": {"mrope_interleaved": true,"mrope_section": [11,11,10],"partial_rotary_factor": 0.25,"rope_theta": 10000000,"rope_type": "default"},"tie_word_embeddings": false,"use_cache": true,"vocab_size": 248320},"tie_word_embeddings": false,"transformers_version": "5.20.2","unsloth_fixed_mtp": true,"video_token_id": 248057,"vision_config": {"deepstack_visual_indexes": [],"depth": 27,"hidden_act": "gelu_pytorch_tanh","hidden_size": 1152,"in_channels": 3,"initializer_range": 0.02,"intermediate_size": 4304,"model_type": "qwen3_5_vision","num_heads": 16,"num_position_embeddings": 2304,"out_hidden_size": 4096,"patch_size": 16,"rope_parameters": {"rope_theta": 10000.0,"rope_type": "axial"},"spatial_merge_size": 2,"temporal_patch_size": 2},"vision_end_token_id": 248054,"vision_start_token_id": 248053}
3 unmodified lines456789103 unmodified lines248046,248044],"pad_token_id": 248044,"transformers_version": "5.16.1","use_cache": true}3 unmodified lines456789103 unmodified lines248046,248044],"pad_token_id": 248055,"transformers_version": "5.20.2","use_cache": true}
123456789197 unmodified lines207208209210---base_model: Qwen/Qwen3.5-9Blibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:Qwen/Qwen3.5-9B- lora- sft- transformers197 unmodified lines[More Information Needed]### Framework versions- PEFT 0.18.1123456789197 unmodified lines207208209210---base_model: unsloth/Qwen3.5-9Blibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:unsloth/Qwen3.5-9B- lora- sft- transformers197 unmodified lines[More Information Needed]### Framework versions- PEFT 0.21.2
6 unmodified lines789101112132 unmodified lines1617181920211 unmodified line23242526272829303132333435363738394041426 unmodified lines"parent_library": "transformers.models.qwen3_5.modeling_qwen3_5","unsloth_fixed": true},"base_model_name_or_path": "Qwen/Qwen3.5-9B","bias": "none","corda_config": null,"ensure_weight_tying": false,2 unmodified lines"fan_in_fan_out": false,"inference_mode": true,"init_lora_weights": true,"layer_replication": null,"layers_pattern": null,"layers_to_transform": null,1 unmodified line"lora_alpha": 16,"lora_bias": false,"lora_dropout": 0,"megatron_config": null,"megatron_core": "megatron.core","modules_to_save": null,"peft_type": "LORA","peft_version": "0.18.1","qalora_group_size": 16,"r": 64,"rank_pattern": {},"revision": null,"target_modules": "(?:.*?(?:language|text).*?(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer).*?(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj))|(?:\\bmodel\\.layers\\.[\\d]{1,}\\.(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer)\\.(?:(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj)))","target_parameters": null,"task_type": "CAUSAL_LM","trainable_token_indices": null,"use_dora": false,"use_qalora": false,"use_rslora": false}6 unmodified lines789101112132 unmodified lines161718192021221 unmodified line2425262728293031323334353637383940414243444546476 unmodified lines"parent_library": "transformers.models.qwen3_5.modeling_qwen3_5","unsloth_fixed": true},"base_model_name_or_path": "unsloth/Qwen3.5-9B","bias": "none","corda_config": null,"ensure_weight_tying": false,2 unmodified lines"fan_in_fan_out": false,"inference_mode": true,"init_lora_weights": true,"kasa_config": null,"layer_replication": null,"layers_pattern": null,"layers_to_transform": null,1 unmodified line"lora_alpha": 16,"lora_bias": false,"lora_dropout": 0,"lora_ga_config": null,"megatron_config": null,"megatron_core": "megatron.core","modules_to_save": null,"monteclora_config": null,"peft_type": "LORA","peft_version": "0.21.2","qalora_group_size": 16,"r": 64,"rank_pattern": {},"revision": null,"target_modules": "(?:.*?(?:language|text).*?(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer).*?\\.(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj))|(?:\\bmodel\\.layers\\.[\\d]{1,}(?!.*\\.experts\\.\\d)\\..*?(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer).*?\\.(?:(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj)))","target_parameters": null,"task_type": "CAUSAL_LM","trainable_token_indices": null,"use_bdlora": null,"use_dora": false,"use_qalora": false,"use_rslora": false,"velora_config": null}
123version https://git-lfs.github.com/spec/v1oid sha256:deed2208dc3eac1066519750635b14ade9fca02562ce0477ad7d3a399d8b4cc0size 465605896123version https://git-lfs.github.com/spec/v1oid sha256:cf5d9c5bb50a0a46e3c073a1264e49f2f0237bc01da88918bfae7fe1bd1991e5size 465605896
41 unmodified lines4243444546473 unmodified lines51525354555657585960616263646566677 unmodified lines7576777879808182838485868788899025 unmodified lines11611711811912012112212316 unmodified lines1401411421431441451461473 unmodified lines15115215315441 unmodified lines{%- if not messages %}{{- raise_exception('No messages provided.') }}{%- endif %}{%- if tools and tools is iterable and tools is not mapping %}{{- '<|im_start|>system\n' }}{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}3 unmodified lines{%- endfor %}{{- "\n</tools>" }}{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}{%- if messages[0].role == 'system' %}{%- set content = render_content(messages[0].content, false, true)|trim %}{%- if content %}{{- '\n\n' + content }}{%- endif %}{%- endif %}{{- '<|im_end|>\n' }}{%- else %}{%- if messages[0].role == 'system' %}{%- set content = render_content(messages[0].content, false, true)|trim %}{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}7 unmodified lines{%- endif %}{%- endif %}{%- endfor %}{%- if ns.multi_step_tool %}{{- raise_exception('No user query found in messages.') }}{%- endif %}{%- for message in messages %}{%- set content = render_content(message.content, true)|trim %}{%- if message.role == "system" %}{%- if not loop.first %}{{- raise_exception('System message must be at the beginning.') }}{%- endif %}{%- elif message.role == "user" %}{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}{%- elif message.role == "assistant" %}{%- set reasoning_content = '' %}25 unmodified lines{%- else %}{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}{%- endif %}{%- if tool_call.arguments is defined %}{%- for args_name, args_value in tool_call.arguments|items %}{{- '<parameter=' + args_name + '>\n' }}{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}{{- args_value }}16 unmodified lines{%- elif loop.last %}{{- '<|im_end|>\n' }}{%- endif %}{%- else %}{{- raise_exception('Unexpected message role.') }}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}3 unmodified lines{%- else %}{{- '<think>\n' }}{%- endif %}{%- endif %}41 unmodified lines424344454647484950515253545556575859603 unmodified lines646566676869707172737475767 unmodified lines8485868788899091929325 unmodified lines11912012112212312412512612716 unmodified lines1441451461471481491503 unmodified lines15415515615715841 unmodified lines{%- if not messages %}{{- raise_exception('No messages provided.') }}{%- endif %}{%- set num_sys = 0 %}{%- set merged_system = '' %}{%- if messages[0].role == 'system' or messages[0].role == 'developer' %}{%- set first = render_content(messages[0].content, false, true)|trim %}{%- if messages|length > 1 and (messages[1].role == 'system' or messages[1].role == 'developer') %}{%- set second = render_content(messages[1].content, false, true)|trim %}{%- set merged_system = first + '\n' + second %}{%- set num_sys = 2 %}{%- else %}{%- set merged_system = first %}{%- set num_sys = 1 %}{%- endif %}{%- endif %}{%- if tools and tools is iterable and tools is not mapping %}{{- '<|im_start|>system\n' }}{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}3 unmodified lines{%- endfor %}{{- "\n</tools>" }}{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}{%- if merged_system %}{{- '\n\n' + merged_system }}{%- endif %}{{- '<|im_end|>\n' }}{%- else %}{%- if merged_system %}{{- '<|im_start|>system\n' + merged_system + '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}7 unmodified lines{%- endif %}{%- endif %}{%- endfor %}{%- for message in messages %}{%- if loop.index0 >= num_sys and message.role != "system" and message.role != "developer" %}{%- set content = render_content(message.content, true)|trim %}{%- if message.role == "user" %}{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}{%- elif message.role == "assistant" %}{%- set reasoning_content = '' %}25 unmodified lines{%- else %}{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}{%- endif %}{%- if tool_call.arguments is mapping %}{%- for args_name in tool_call.arguments %}{%- set args_value = tool_call.arguments[args_name] %}{{- '<parameter=' + args_name + '>\n' }}{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}{{- args_value }}16 unmodified lines{%- elif loop.last %}{{- '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}3 unmodified lines{%- else %}{{- '<think>\n' }}{%- endif %}{%- endif %}{#- Unsloth fixes - developer role, tool calling #}
123version https://git-lfs.github.com/spec/v1oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523size 19989325123version https://git-lfs.github.com/spec/v1oid sha256:a5cd9732badce41de57e6efce8302930ded1c1188c5f81feb2bd6c24c4a1941fsize 19989339
7 unmodified lines89101112131415164 unmodified lines212223242526272829307 unmodified lines"clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","errors": "replace","image_token": "<|image_pad|>","is_local": false,"local_files_only": false,"model_max_length": 262144,"model_specific_special_tokens": {"audio_bos_token": "<|audio_start|>",4 unmodified lines"vision_bos_token": "<|vision_start|>","vision_eos_token": "<|vision_end|>"},"pad_token": "<|endoftext|>","pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+","split_special_tokens": false,"tokenizer_class": "Qwen2Tokenizer","unk_token": null,"video_token": "<|video_pad|>","vision_bos_token": "<|vision_start|>",7 unmodified lines8910111213141516171819202122232425262728293031324 unmodified lines3738394041424344454647487 unmodified lines"clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","errors": "replace","extra_special_tokens": ["<|im_start|>","<|im_end|>","<|object_ref_start|>","<|object_ref_end|>","<|box_start|>","<|box_end|>","<|quad_start|>","<|quad_end|>","<|vision_start|>","<|vision_end|>","<|vision_pad|>","<|image_pad|>","<|video_pad|>"],"image_token": "<|image_pad|>","is_local": false,"local_files_only": false,"merges_file": null,"model_max_length": 262144,"model_specific_special_tokens": {"audio_bos_token": "<|audio_start|>",4 unmodified lines"vision_bos_token": "<|vision_start|>","vision_eos_token": "<|vision_end|>"},"pad_token": "<|vision_pad|>","padding_side": "right","pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+","processor_class": "Qwen3VLProcessor","split_special_tokens": false,"tokenizer_class": "Qwen3_5Tokenizer","unk_token": null,"video_token": "<|video_pad|>","vision_bos_token": "<|vision_start|>",
123version https://git-lfs.github.com/spec/v1oid sha256:ea1df88889c37bdda3a96417ded3a667b2b000954b2373174a0fa533cd98dfb7size 5276436216123version https://git-lfs.github.com/spec/v1oid sha256:bda346cf5f5992e746e63b818eb901c63b4dd2c438574fb0988a2f48619fafefsize 5276436216
123version https://git-lfs.github.com/spec/v1oid sha256:44396ecd3e40e0cefb0d53f7260f6042b0c833d9b0dcf476be2a7f459ec3629csize 5335161512123version https://git-lfs.github.com/spec/v1oid sha256:a2a3f3f88ba00f11fe77e5030361381feb3cbf5412a739d47d18888e9949b571size 5335161512
123version https://git-lfs.github.com/spec/v1oid sha256:84f5e4677dee87e24c4aec7e91104233b5eaa9cb2b0750d5086f78e5c05a88b5size 5368717440123version https://git-lfs.github.com/spec/v1oid sha256:19b5f50319b5fb48b75d1c9baca3f930ef2f31497871b45f716515f5226939d1size 5368717440
123version https://git-lfs.github.com/spec/v1oid sha256:9a2d3939480b4da5a29bda68be721b810b57019d239f7a30cd1e98d379b109c7size 3325995712123version https://git-lfs.github.com/spec/v1oid sha256:fd2664f72fdc6137d822226def1a9cd6991fc59df67bfd532cab2cebd5210500size 3325995712
123version https://git-lfs.github.com/spec/v1oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523size 19989325123version https://git-lfs.github.com/spec/v1oid sha256:a5cd9732badce41de57e6efce8302930ded1c1188c5f81feb2bd6c24c4a1941fsize 19989339
7 unmodified lines89101112131415164 unmodified lines21222324252627282930264 unmodified lines2952962972982997 unmodified lines"clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","errors": "replace","image_token": "<|image_pad|>","is_local": false,"local_files_only": false,"model_max_length": 262144,"model_specific_special_tokens": {"audio_bos_token": "<|audio_start|>",4 unmodified lines"vision_bos_token": "<|vision_start|>","vision_eos_token": "<|vision_end|>"},"pad_token": "<|endoftext|>","pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+","split_special_tokens": false,"tokenizer_class": "Qwen2Tokenizer","unk_token": null,"video_token": "<|video_pad|>","vision_bos_token": "<|vision_start|>",264 unmodified lines"special": true}},"chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n {%- if content is string %}\n {{- content }}\n {%- elif content is iterable and content is not mapping %}\n {%- for item in content %}\n {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain images.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Picture ' ~ image_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n {%- elif 'video' in item or item.type == 'video' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain videos.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Video ' ~ video_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n {%- elif 'text' in item %}\n {{- item.text }}\n {%- else %}\n {{- raise_exception('Unexpected item type in content.') }}\n {%- endif %}\n {%- endfor %}\n {%- elif content is none or content is undefined %}\n {{- '' }}\n {%- else %}\n {{- raise_exception('Unexpected content type.') }}\n {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n {{- '<|im_start|>system\\n' }}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {%- if content %}\n {{- '\\n\\n' + content }}\n {%- endif %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {{- '<|im_start|>system\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" %}\n {%- set content = render_content(message.content, false)|trim %}\n {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if ns.multi_step_tool %}\n {{- raise_exception('No user query found in messages.') }}\n{%- endif %}\n{%- for message in messages %}\n {%- set content = render_content(message.content, true)|trim %}\n {%- if message.role == \"system\" %}\n {%- if not loop.first %}\n {{- raise_exception('System message must be at the beginning.') }}\n {%- endif %}\n {%- elif message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content|trim %}\n {%- if loop.index0 > ns.last_query_index %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if loop.first %}\n {%- if content|trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- else %}\n {{- raise_exception('Unexpected message role.') }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- else %}\n {{- '<think>\\n' }}\n {%- endif %}\n{%- endif %}"}7 unmodified lines8910111213141516171819202122232425262728293031324 unmodified lines373839404142434445464748264 unmodified lines3133143153163177 unmodified lines"clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","errors": "replace","extra_special_tokens": ["<|im_start|>","<|im_end|>","<|object_ref_start|>","<|object_ref_end|>","<|box_start|>","<|box_end|>","<|quad_start|>","<|quad_end|>","<|vision_start|>","<|vision_end|>","<|vision_pad|>","<|image_pad|>","<|video_pad|>"],"image_token": "<|image_pad|>","is_local": false,"local_files_only": false,"merges_file": null,"model_max_length": 262144,"model_specific_special_tokens": {"audio_bos_token": "<|audio_start|>",4 unmodified lines"vision_bos_token": "<|vision_start|>","vision_eos_token": "<|vision_end|>"},"pad_token": "<|vision_pad|>","padding_side": "right","pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+","processor_class": "Qwen3VLProcessor","split_special_tokens": false,"tokenizer_class": "Qwen3_5Tokenizer","unk_token": null,"video_token": "<|video_pad|>","vision_bos_token": "<|vision_start|>",264 unmodified lines"special": true}},"chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n {%- if content is string %}\n {{- content }}\n {%- elif content is iterable and content is not mapping %}\n {%- for item in content %}\n {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain images.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Picture ' ~ image_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n {%- elif 'video' in item or item.type == 'video' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain videos.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Video ' ~ video_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n {%- elif 'text' in item %}\n {{- item.text }}\n {%- else %}\n {{- raise_exception('Unexpected item type in content.') }}\n {%- endif %}\n {%- endfor %}\n {%- elif content is none or content is undefined %}\n {{- '' }}\n {%- else %}\n {{- raise_exception('Unexpected content type.') }}\n {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- set num_sys = 0 %}\n{%- set merged_system = '' %}\n{%- if messages[0].role == 'system' or messages[0].role == 'developer' %}\n {%- set first = render_content(messages[0].content, false, true)|trim %}\n {%- if messages|length > 1 and (messages[1].role == 'system' or messages[1].role == 'developer') %}\n {%- set second = render_content(messages[1].content, false, true)|trim %}\n {%- set merged_system = first + '\\n' + second %}\n {%- set num_sys = 2 %}\n {%- else %}\n {%- set merged_system = first %}\n {%- set num_sys = 1 %}\n {%- endif %}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n {{- '<|im_start|>system\\n' }}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n {%- if merged_system %}\n {{- '\\n\\n' + merged_system }}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if merged_system %}\n {{- '<|im_start|>system\\n' + merged_system + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" %}\n {%- set content = render_content(message.content, false)|trim %}\n {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if loop.index0 >= num_sys and message.role != \"system\" and message.role != \"developer\" %}\n {%- set content = render_content(message.content, true)|trim %}\n {%- if message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content|trim %}\n {%- if loop.index0 > ns.last_query_index %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if loop.first %}\n {%- if content|trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- if tool_call.arguments is mapping %}\n {%- for args_name in tool_call.arguments %}\n {%- set args_value = tool_call.arguments[args_name] %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- else %}\n {{- '<think>\\n' }}\n {%- endif %}\n{%- endif %}\n{#- Unsloth fixes - developer role, tool calling #}\n"}
Qwen3.5-9B_q8.gguf+2-2
chat_template.jinja+25-21
config.json+107-101
generation_config.json+2-2
lora/README.md+3-3
lora/adapter_config.json+9-4
lora/adapter_model.safetensors+1-1
lora/chat_template.jinja+25-21
lora/tokenizer.json+2-2
lora/tokenizer_config.json+20-2
model.safetensors-00001-of-00004.safetensors+1-1
model.safetensors-00002-of-00004.safetensors+1-1
model.safetensors-00003-of-00004.safetensors+1-1
model.safetensors-00004-of-00004.safetensors+1-1
tokenizer.json+2-2
tokenizer_config.json+21-3