Laguna XS 2.1 is a 33B total parameter Mixture-of-Experts model with 3B activated parameters per token designed for agentic coding and long-horizon work on a local machine.
"chat_template": "{#- Iteration on laguna_glm_thinking_v8/chat_template.jinja -#}\n{#- No formatting instructions -#}\n{{- \"〈|EOS|〉\" -}}\n{%- set enable_thinking = enable_thinking | default(false) -%}\n{%- set add_generation_prompt = add_generation_prompt | default(false) -%}\n\n{#- ───── header (system message) ───── -#}\n{#- A caller-supplied system message with empty content opts out of the default below, producing no <system> block — used to train without a system message. -#}\n{%- set system_message = \"You are a helpful, conversationally-fluent assistant made by Poolside. You are here to be helpful to users through natural language conversations.\" -%}\n{%- if messages and messages[0].role == \"system\" -%}\n {%- set system_message = messages[0].content -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n\n{%- set has_sys = system_message and system_message.strip() -%}\n{%- if has_sys or tools or enable_thinking -%}\n {{- \"<system>\" -}}\n\n {%- if has_sys -%}\n {{- system_message.rstrip() -}}\n {%- if tools -%}{{- \"\\n\\n\" -}}{%- endif -%}\n {%- endif -%}\n\n {%- if tools -%}\n {{- \"### Tools\\n\\n\" -}}\n {{- \"You may call functions to assist with the user query.\\n\" -}}\n {{- \"All available function signatures are listed below:\\n\" -}}\n {{- \"<available_tools>\\n\" -}}\n {%- for tool in tools -%}\n {{- (tool | tojson) ~ \"\\n\" -}}\n {%- endfor -%}\n {{- \"</available_tools>\" -}}\n {%- endif -%}\n\n {{- \"</system>\\n\" -}}\n{%- endif -%}\n\n{#- ───── main loop ───── -#}\n{%- for message in messages -%}\n {%- set content = message.content if message.content is string else \"\" -%}\n {%- if message.role == \"user\" -%}\n {{- \"<user>\" + content + \"</user>\\n\" -}}\n {%- elif message.role == \"assistant\" -%}\n {%- generation -%}\n {{- \"<assistant>\" -}}\n {#- Extract reasoning content from message.reasoning (vLLM field name) or message.reasoning_content -#}\n {%- set reasoning_content = '' -%}\n {%- if message.reasoning is string -%}\n {%- set reasoning_content = message.reasoning -%}\n {%- elif message.reasoning_content is string -%}\n {%- set reasoning_content = message.reasoning_content -%}\n {%- endif -%}\n {#- Display reasoning content for all messages if enable_thinking -#}\n {%- if enable_thinking -%}\n {{- '<think>' + reasoning_content + '</think>' -}}\n {%- else -%}\n {{- '</think>' -}}\n {%- endif -%}\n {#- Display main content (trailing newline only when no tool_calls follow) -#}\n {%- if content -%}\n {{- content -}}\n {%- endif -%}\n {%- if message.tool_calls -%}\n {%- for tool_call in message.tool_calls -%}\n {%- set function_data = tool_call.function -%}\n {{- '<tool_call>' + function_data.name -}}\n {%- set _args = function_data.arguments -%}\n {%- for k, v in _args.items() -%}\n {{- \"<arg_key>\" ~ k ~ \"</arg_key>\" -}}\n {{- \"<arg_value>\" -}}{{- v | tojson(ensure_ascii=False) if v is not string else v -}}{{- \"</arg_value>\" -}}\n {%- endfor -%}\n {{- \"</tool_call>\" -}}\n {%- endfor -%}\n {%- endif -%}\n {{- \"</assistant>\\n\" -}}\n {%- endgeneration -%}\n {%- elif message.role == \"tool\" -%}\n {{- \"<tool_response>\" + content + \"</tool_response>\\n\" -}}\n {%- elif message.role == \"system\" -%}\n {#- Render additional system messages (the first one, if any, is handled separately in the header and was sliced off above) -#}\n {{- \"<system>\" + content + \"</system>\\n\" -}}\n {%- endif -%}\n{%- endfor -%}\n{#- ───── generation prompt ───── -#}\n{%- if add_generation_prompt -%}\n {{- \"<assistant>\" -}}\n {#- ───── Include reasoning mode directive ───── -#}\n {%- if enable_thinking -%}\n {{- '<think>' -}}\n {%- else -%}\n {{- '</think>' -}}\n {%- endif -%}\n{%- endif -%}"