Text Generation
Transformers
Safetensors
glm4
cooking
recipes
dpo
provenance
abstention
conversational
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.
Instructions to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant") model = AutoModelForCausalLM.from_pretrained("HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant
- SGLang
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant with Docker Model Runner:
docker model run hf.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant
GLM 4 9B Cooking Assistant v2 (2026-11-28)
Browse filesFiles changed (7)
11 unmodified lines12131415161718151617181920212 unmodified lines242526272728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410523 unmodified lines129130131601321331341356413613713813914023 unmodified lines1641651669416716816917017117211 unmodified lines# GLM-4-9B Cooking Assistant
A cooking assistant that reads the recipe you give it, and usually asks for the recipe instead of inventing detailswhen it can't see one. On questions that need a recipe it wasn't shown, it invents details 9.7% of the time vs40.1% for base GLM-4-9B-0414; given the recipe, it answers correctly 96.2% of the time vs83.1% (three open judges from other model families, 2 of 3 agreeing). General answers are not improved: on our 82 general cooking questions the full-precision model scored lower than the base (46.3% vs 56.1%; not statistically significant). Trained on 26 languages, evaluated in 21;runs fully on an 8 GB GPU (Q4_K_M), or partly offloaded on 4 GB.when it can't see one. **v2 (2026-11-28) matches v1 within measurement noise on inventing, reading a shown recipe and general questions (paired tests, not significant); clearly better at scaling recipes with odd egg counts and spices.** On questions that need a recipe it wasn't shown, v2 invents details11.3% of the time (v1 12.0%, base GLM-4-9B-0414 41.1%); given the recipe, it answers correctly93.1% of the time (v1 94.1%, base 81.7%). Three open judges from outside the Qwen and GLMfamilies, 2 of 3 agreeing, v1 rescored on the same panel. Trained on 26 languages, evaluated in 21.
*Unofficial fine-tune of GLM-4-9B-0414 by Humanjava Enterprises; not made or endorsed by Zhipu AI / Z.ai.*
2 unmodified linesThe same recipe on Qwen3-8B:[HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant](https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant).
**Cooking Assistant family (updated 2026-11-26):** [Qwen3-8B](https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant) (`ollama run vveerrgg/qwen3-8b-cooking-assistant`) · [EuroLLM-9B](https://huggingface.co/HumanjavaEnterprises/EuroLLM-9B-Cooking-Assistant) (`ollama run vveerrgg/eurollm-9b-cooking-assistant`) · [Olmo-3-7B](https://huggingface.co/HumanjavaEnterprises/Olmo-3-7B-Cooking-Assistant) (`ollama run vveerrgg/olmo-3-7b-cooking-assistant`). Each card reports its own judge panel.**Cooking Assistant family (updated 2026-11-28):** [Qwen3-8B](https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant) (`ollama run vveerrgg/qwen3-8b-cooking-assistant`) · [EuroLLM-9B](https://huggingface.co/HumanjavaEnterprises/EuroLLM-9B-Cooking-Assistant) (`ollama run vveerrgg/eurollm-9b-cooking-assistant`) · [Olmo-3-7B](https://huggingface.co/HumanjavaEnterprises/Olmo-3-7B-Cooking-Assistant) (`ollama run vveerrgg/olmo-3-7b-cooking-assistant`). Each card reports its own judge panel.
It does not memorise recipes: give it the recipe (paste it, or have your app look it up) and it will read it.
## v2 (current, 2026-11-28)
**v2 (2026-11-28) matches v1 within measurement noise on inventing, reading a shown recipe and general questions (paired tests, not significant); clearly better at scaling recipes with odd egg counts and spices.** v2 is trained from the raw GLM-4-9B-0414 with the v1 recipe plus a recipe-scaling pack (scalingrecipes up and down, with code-checked arithmetic) and paired examples, then a preference stage on all v1 pairs pluspairs sampled from the model itself on no-recipe questions.
**Same 682 questions, new judge panel.** Three open-weights judges from outside the Qwen and GLM families:gpt-oss-120b (Apache-2.0), Seed-OSS-36B-Instruct (Apache-2.0) and Mistral-Small-3.2-24B (Apache-2.0); 2 of 3 mustagree, after the same rule check as v1. v1 is **rescored on this panel**, so v1 and v2 sit side by side below. DeepSeek-V4-Flash, a v1 judge, is **off this panel**: it also judged the synthetic training data both v1and v2 are built on, so its verdicts are not independent of that data. The v1 numbers further down this card come fromthe older panel and are not comparable with these.
| 2 of 3 judges | base GLM-4-9B-0414 | v1 (rescored) | **v2** | v2 vs v1, paired (only v1 / only v2, McNemar p) ||---|---|---|---|---|| Invents recipe details, no recipe shown (300) | 41.1% | 12.0% | **11.3%** | 16 / 14, p = 0.86 || Correct, recipe shown (290) | 81.7% | 94.1% | **93.1%** | 8 / 5, p = 0.58 || Correct, general questions (82) | 51.2% | 45.1% | **51.2%** | 5 / 10, p = 0.30 |
None of the v1 vs v2 differences is statistically significant. Against the base, inventing drops sharply and reading ashown recipe improves (both p < 0.001); on general questions v2 is level with the base.
**Recipe scaling** (a fixed 40-recipe probe, held out from training; judges gpt-oss-120b, Granite-4.2-30B andOLMo-3.1-32B, majority):
| | v1 | **v2** ||---|---|---|| Arithmetic right (of 40) | 32 | **29** || Odd egg counts handled sensibly (of 13) | 1 | **13** || Spice and heat scaled with caution (of 15) | 0 | **6** || Good or partly good overall (of 40) | 36 | **36** |
The probe is small: reruns of the same build move each column by about ±3, so small differences mean nothing; the eggand spice rows are well outside that.
**Quantised files** (v2, same 682 questions and panel; the full-precision answers come from vLLM, the quantised onesfrom llama.cpp):
| | Q4_K_M | Q6_K | Q8_0 ||---|---|---|---|| Invents with no recipe, 2 of 3 (full precision) | 9.3% (11.0%) | 12.7% (10.7%) | 9.7% (11.7%) || Correct with the recipe shown, 2 of 3 (full precision) | 92.8% (93.1%) | 92.8% (93.1%) | 92.8% (92.8%) || General questions, 2 of 3 (full precision) | 50.0% (51.2%) | 51.2% (51.2%) | 54.9% (51.2%) || McNemar p, quant vs full precision (invents / recipe / general) | 0.36 / 1 / 1 | 0.21 / 1 / 1 | 0.18 / 1 / 0.25 |
No quantised file differs significantly from full precision on any of the three (smallest p = 0.18).
**Memorisation.** 1,000 CC BY-SA training documents probed 12,000 ways, greedy decoding: ROUGE-L 0.155 vs 0.161 for base GLM-4-9B-0414; no 50-token match; longest overlap 89 characters, the same as the base. Passes.
**Asked without a recipe** ("If I triple my pancake recipe, how much milk do I need?"; `ollama run vveerrgg/glm-4-9b-cooking-assistant`,temperature 0, built-in system prompt), v2 answers, as our public answer test prints them (cut at 240 characters):
> Ollama 0.40.16: "The amount of milk needed depends on your original pancake recipe. If you triple the recipe, you would need three times the original amount of milk. Could you share your original recipe so I can give you an exact amount?">> Ollama 0.12.6 (an older version renders the chat format slightly differently): "The amount of milk needed depends on your original pancake recipe. If you share the original recipe, I can help calculate the exact amount for tripling it. Otherwise, a standard pancake recipe typically uses about 1 cup of milk per batch. …" (it can add a typical amount, worded as typical)
**v2 changes beyond the weights**- **Default system prompt.** When a request sends no system prompt, `chat_template.jinja` adds one: "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." Without it, asked "Who are you?", the model names its base model's maker. With your own system prompt (we recommend the trained one, below) nothing is added.- No knowledge cut-off date is claimed: v2's training data dropped the replay rows that stated one.
**v2 limits**- **Spice under-caution:** 6 of 15 spice-heavy scale-ups get a "taste and adjust the heat" caution; the rest scale chilli linearly. Check heat yourself when doubling a hot dish.- Still invents on some no-recipe questions, about 1 in 9 when 2 of 3 judges must agree (the same as v1 on this panel).- The judges are models, and the probe is small (±3 per column between reruns).
The questions, all three models' answers and every judge's verdict for v2 are in config `glm-4-9b-v2` of[HumanjavaEnterprises/cooking-assistant-eval](https://huggingface.co/datasets/HumanjavaEnterprises/cooking-assistant-eval).
## Files
The two training stages (supervised LoRA, then a preference LoRA on top) are merged into one bf16 model, the same23 unmodified lines## Versions
The model is one product with dated versions. Each version is a git tag on this repo, so you can pin one with`revision="v1"` (Transformers / huggingface_hub) or `ollama run vveerrgg/glm-4-9b-cooking-assistant:v1`.`revision="v2"` (or `"v1"`) (Transformers / huggingface_hub) or `ollama run vveerrgg/glm-4-9b-cooking-assistant:v2` (or `:v1`).
| Version | Date | Invents (no recipe, 2 of 3 judges) | Correct (recipe shown, 2 of 3 judges) | Notes ||---|---|---|---|---|| **v1** (current) | 2026-11-14 | 9.7% (base 40.1%) | 96.2% (base 83.1%) | first public release || v1 | 2026-11-14 | 9.7% (base 40.1%) | 96.2% (base 83.1%) | first public release || **v2** (current) | 2026-11-28 | 11.3% (v1 12.0%, base 41.1%), new panel, 2 of 3 | 93.1% (v1 94.1%, base 81.7%), new panel, 2 of 3 | retrained from the base with a recipe-scaling pack; better at scaling; default system prompt |
## Prompt format
23 unmodified lines[Qwen3-8B Cooking Assistant](https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant): the same trainingdata and the same two stages on a different base model family, scored on the same questions.
## Results## v1 results (2026-11-12 to 2026-11-14, older judge panel)
*These are v1's published numbers, on the v1 panel (which included DeepSeek-V4-Flash; see the disclosure). They are not comparable with the v2 table above, where v1 is rescored on the v2 panel.*
All cooking scores are on the fixed held-out set of 682 questions in 21 languages behind the Qwen3-8B Cooking Assistantcard, never used in training: 290 with the recipe shown, 10 recall questions with no recipe ("how do you make X?"), 3001234123456789101111123f5e5b9cc04bf96620f48b48888b7b19b08ad4cdebb145cb8026a2dff46c9e81 model-00001-of-00004.safetensors4ea6f5947e61b44619ce20bcab318890663e1a799486248499de824bbdb35b8a model-00002-of-00004.safetensors73c2c940fcecfe74c48a7433360e7b304149901e40a11882348fa852a9402b87 model-00003-of-00004.safetensorsb94a33a656e90c29e9961b40308b01faf5a7118d49560e217000982e613c729f model-00004-of-00004.safetensorsb556d320991e51a54d4a10bcb519af329bfe21545986b9a67094c13781967c7e model-00001-of-00004.safetensorse6ae072d46dbaaf7da8b36222c404c96ac3106e7cc9f4f6aabfc85a9c033b6bf model-00002-of-00004.safetensors171f22ef21e81e359c36d520aa399deb3b2314a7e795125f486931a56329695e model-00003-of-00004.safetensorsf81d5b0171e9d6e26a2cd2c7fdbe55a804597f705761b24390f65e4318a97047 model-00004-of-00004.safetensors8a8f873a73f5234b9e950b016ab844ba47cb8399d8bbdba202ed0ddc3ca7d421 config.json56ee0be8c595f22a6a80a822096533e10455fcd1e859e0fc36a6e760088147fa generation_config.json421fb251889681bc9c3bed28e5cd079e00a789a1a04024d53c8d182a8943af34 model.safetensors.index.json35a6dd9ff6e2474ba72b180db853851d2a84fce3d12095089285f447c7474541 special_tokens_map.jsone316474d867ad1f91165a12d90c73b27a7e0f9a1c9293831cca66c792bfe9a36 tokenizer_config.json76ebeac0d8bd7879ead7b43c16b44981f277e47225de2bd7de9ae1a6cc664a8c tokenizer.jsondb700f25fa300e53634c6fc78dee86b7fbd6d27e624edb855b18a4078c83a822 chat_template.jinjab68b42a57b804e64f3b99ef56e1a58eb3b168eb3e04fe415a3cf813d2c35e290 chat_template.jinjad08ac7b31e69ddf9845d56f2705325e69873f87b0b34b4bd53a3185428a784ae LICENSE11234[gMASK]<sop>{%- 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|># 可用工具1223version https://git-lfs.github.com/spec/v1oid sha256:3f5e5b9cc04bf96620f48b48888b7b19b08ad4cdebb145cb8026a2dff46c9e81oid sha256:b556d320991e51a54d4a10bcb519af329bfe21545986b9a67094c13781967c7esize 49306737441223version https://git-lfs.github.com/spec/v1oid sha256:4ea6f5947e61b44619ce20bcab318890663e1a799486248499de824bbdb35b8aoid sha256:e6ae072d46dbaaf7da8b36222c404c96ac3106e7cc9f4f6aabfc85a9c033b6bfsize 48952745521223version https://git-lfs.github.com/spec/v1oid sha256:73c2c940fcecfe74c48a7433360e7b304149901e40a11882348fa852a9402b87oid sha256:171f22ef21e81e359c36d520aa399deb3b2314a7e795125f486931a56329695esize 48952746161223version https://git-lfs.github.com/spec/v1oid sha256:b94a33a656e90c29e9961b40308b01faf5a7118d49560e217000982e613c729foid sha256:f81d5b0171e9d6e26a2cd2c7fdbe55a804597f705761b24390f65e4318a97047size 4079395488README.md+83-8
SHA256SUMS+5-5
chat_template.jinja+1-1
model-00001-of-00004.safetensors+1-1
model-00002-of-00004.safetensors+1-1
model-00003-of-00004.safetensors+1-1
model-00004-of-00004.safetensors+1-1