Run this model with HF Jobs

Run Dev9124/EKA-1-INT4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Dev9124/EKA-1-INT4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Dev9124/EKA-1-INT4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Dev9124/EKA-1-INT4. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
EKA-1-INT4 / chat_template.jinja
Dev9124's picture
Upload folder using huggingface_hub
b32b5a9 verified
Raw History Blame Contribute Delete
8.15 kB
{{ bos_token }}
{%- set effective_reasoning_effort = reasoning_effort if reasoning_effort is defined and reasoning_effort in ['low', 'medium', 'high', 'max'] else 'max' -%}
{%- if (enable_thinking is not defined or enable_thinking) and effective_reasoning_effort is not none -%}<|system|>Reasoning Effort: {{ effective_reasoning_effort | upper }}{%- endif -%}
{%- macro render_extra_keys(json_dict, handled_keys) -%}
{%- if json_dict is mapping -%}
{%- for json_key in json_dict if json_key not in handled_keys -%}
{%- if json_dict[json_key] is mapping or (json_dict[json_key] is sequence and json_dict[json_key] is not string) -%}
{{- '\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | tojson | safe) ~ '</' ~ json_key ~ '>' }}
{%- else -%}
{{- '\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | string) ~ '</' ~ json_key ~ '>' }}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endmacro -%}
{%- if tools -%}
<|system|>
# Tools
You have access to the following functions:
<tools>
{%- for tool in tools -%}
{%- if tool.function is defined -%}
{%- set tool = tool.function -%}
{%- elif 'function' in tool -%}
{%- set tool = tool['function'] -%}
{%- endif -%}
{%- if tool.defer_loading is not defined or not tool.defer_loading -%}
{{- "\n<function>\n<name>" ~ tool.name ~ "</name>" }}
{%- if tool.description is defined -%}
{{- '\n<description>' ~ (tool.description | trim) ~ '</description>' }}
{%- endif -%}
{{- '\n<parameters>' }}
{%- if tool.parameters is defined and tool.parameters is mapping and tool.parameters.properties is defined and tool.parameters.properties is mapping -%}
{%- for param_name, param_fields in tool.parameters.properties|items -%}
{{- '\n<parameter>' }}
{{- '\n<name>' ~ param_name ~ '</name>' }}
{%- if param_fields.type is defined -%}
{{- '\n<type>' ~ (param_fields.type | string) ~ '</type>' }}
{%- endif -%}
{%- if param_fields.description is defined -%}
{{- '\n<description>' ~ (param_fields.description | trim) ~ '</description>' }}
{%- endif -%}
{%- if param_fields.enum is defined -%}
{{- '\n<enum>' ~ (param_fields.enum | tojson | safe) ~ '</enum>' }}
{%- endif -%}
{%- set handled_keys = ['name', 'type', 'description', 'enum'] -%}
{{- render_extra_keys(param_fields, handled_keys) }}
{{- '\n</parameter>' }}
{%- endfor -%}
{%- endif -%}
{%- set handled_keys = ['type', 'properties', 'required'] -%}
{{- render_extra_keys(tool.parameters, handled_keys) }}
{%- if tool.parameters is defined and tool.parameters.required is defined -%}
{{- '\n<required>' ~ (tool.parameters.required | tojson | safe) ~ '</required>' }}
{%- endif -%}
{{- '\n</parameters>' }}
{%- set handled_keys = ['type', 'name', 'description', 'parameters', 'defer_loading', 'strict'] -%}
{{- render_extra_keys(tool, handled_keys) }}
{{- '\n</function>' }}
{%- endif -%}
{%- endfor -%}
{{- "\n</tools>" }}
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>example_function_name
<arg_key>example_parameter_1</arg_key>
<arg_value>value_1</arg_value>
<arg_key>example_parameter_2</arg_key>
<arg_value>This is the value for the second parameter
that can span
multiple lines
</arg_value>
</tool_call>
<IMPORTANT>
Reminder:
- Function or tool calls MUST follow the specified format: <tool_call>function_name with inner <arg_key></arg_key> and <arg_value></arg_value> blocks, closed by </tool_call>
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- 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
</IMPORTANT>
{%- endif -%}
{%- macro visible_text(content) -%}
{%- if content is string -%}
{{- content }}
{%- elif content is iterable and content is not mapping -%}
{%- for item in content -%}
{%- if item is mapping and item.type == 'text' -%}
{{- item.text }}
{%- elif item is string -%}
{{- item }}
{%- elif item is mapping and item.type in ['image', 'image_url', 'video', 'video_url', 'audio', 'audio_url', 'input_audio'] -%}
{%- set media_type = item.type | replace('_url', '') | replace('input_', '') -%}
{{- "<reminder>You are unable to process this " ~ media_type ~ " because you don't have multi-modal input ability. Try different methods.</reminder>" }}
{%- endif -%}
{%- endfor -%}
{%- else -%}
{{- content }}
{%- endif -%}
{%- endmacro -%}
{%- set ns = namespace(last_user_index=-1) -%}
{%- for m in messages %}
{%- if m.role == 'user' %}
{%- set ns.last_user_index = loop.index0 -%}
{%- endif %}
{%- endfor %}
{%- for m in messages -%}
{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}
{%- elif m.role == 'assistant' -%}
<|assistant|>
{%- set content = visible_text(m.content) %}
{%- if m.reasoning_content is string %}
{%- set reasoning_content = m.reasoning_content %}
{%- elif '</think>' in content %}
{%- set reasoning_content = content.split('</think>')[0].split('<think>')[-1] %}
{%- set content = content.split('</think>')[-1] %}
{%- endif %}
{%- if ((clear_thinking is defined and not clear_thinking) or loop.index0 > ns.last_user_index) and reasoning_content is defined -%}
{{ '<think>' + reasoning_content + '</think>'}}
{%- else -%}
{{ '<think></think>' }}
{%- endif -%}
{%- if content.strip() -%}
{{ content.strip() }}
{%- endif -%}
{%- if m.tool_calls is defined and m.tool_calls is iterable and m.tool_calls | length > 0 %}
{{- '\n' -}}
{%- for tc in m.tool_calls -%}
{%- if tc.function is defined -%}
{%- set tc = tc.function -%}
{%- elif tc.function -%}
{%- set tc = tc.function -%}
{%- endif -%}
{{- '<tool_call>' ~ tc.name ~ '\n' -}}
{%- if tc.arguments is defined -%}
{%- set _args = tc.arguments -%}
{%- if _args is string -%}
{%- set _args = _args | fromjson -%}
{%- endif -%}
{%- if _args is mapping -%}
{%- for args_name, args_value in _args|items -%}
{{- ' <arg_key>' ~ args_name ~ '</arg_key>\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 -%}
{{- ' <arg_value>' ~ args_value ~ '</arg_value>\n' -}}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{{- '</tool_call>\n' -}}
{%- endfor -%}
{%- endif -%}
{%- elif m.role == 'tool' -%}
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|observation|>' -}}
{%- endif %}
{%- if m.content is string -%}
{{- '<tool_response>\n' + m.content + '\n</tool_response>\n' -}}
{%- elif m.content is iterable and m.content is not mapping and m.content and m.content.0 is mapping and m.content.0.type is defined and m.content.0.type == "tool_reference" -%}
{{- '<tool_response>\n<tools>\n' -}}
{%- for tr in m.content -%}
{%- for tool in tools -%}
{%- if tool.function is defined -%}
{%- set tool = tool.function -%}
{%- elif 'function' in tool -%}
{%- set tool = tool['function'] -%}
{%- endif -%}
{%- if tool.name == tr.name -%}
{{- '<function>\n<name>' ~ tool.name ~ '</name>\n</function>\n' -}}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}
{{- '</tools>\n</tool_response>\n' -}}
{%- elif m.content is iterable and m.content is not mapping and m.content and m.content.0 is mapping and m.content.0.output is defined -%}
{%- for tr in m.content -%}
{{- '<tool_response>\n' + tr.output + '\n</tool_response>\n' -}}
{%- endfor -%}
{%- else -%}
{{- '<tool_response>\n' + visible_text(m.content) + '\n</tool_response>\n' -}}
{%- endif -%}
{%- elif m.role == 'system' -%}
<|system|>{{ visible_text(m.content) }}
{%- endif -%}
{%- endfor -%}
{%- if add_generation_prompt -%}
<|assistant|>{{- '<think></think>' if (enable_thinking is defined and not enable_thinking) else '<think>' -}}
{%- endif -%}