Run this model with HF Jobs

Run HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant 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/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant. 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/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant 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/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant. 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.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
GLM-4-9B-Cooking-Assistant / chat_template.jinja
Vveerrgg's picture
GLM 4 9B Cooking Assistant v2 (2026-11-28)
d3c71a5 verified
Raw History Blame Contribute Delete
1.43 kB
{%- if not messages or messages[0].role != 'system' %}{%- set messages = [{'role': 'system', 'content': 'You are the Cooking Assistant by Humanjava Enterprises, fine-tuned from GLM-4-9B-0414. If asked who you are, say you are the Cooking Assistant by Humanjava Enterprises. You answer questions about dishes, ingredients, techniques and food safety. When you are not sure, you say so.'}] + messages %}{%- endif %}[gMASK]<sop>
{%- if tools -%}
<|system|>
# 可用工具
{% for tool in tools %}
{%- set function = tool.function if tool.get("function") else tool %}
## {{ function.name }}
{{ function | tojson(indent=4, ensure_ascii=False) }}
在调用上述函数时,请使用 Json 格式表示调用的参数。
{%- endfor %}
{%- endif -%}
{%- for msg in messages %}
{%- if msg.role == 'system' %}
<|system|>
{{ msg.content }}
{%- endif %}
{%- endfor %}
{%- for message in messages if message.role != 'system' %}
{%- set role = message['role'] %}
{%- set content = message['content'] %}
{%- set meta = message.get("metadata", "") %}
{%- if role == 'user' %}
<|user|>
{{ content }}
{%- elif role == 'assistant' and not meta %}
<|assistant|>
{{ content }}
{%- elif role == 'assistant' and meta %}
<|assistant|>{{ meta }}
{{ content }}
{%- elif role == 'observation' %}
<|observation|>
{{ content }}
{%- endif %}
{%- endfor %}
{% if add_generation_prompt %}<|assistant|>{% endif %}