Instructions to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF 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 HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF 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 HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
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 HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
Use Docker
docker model run hf.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF 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-GGUF" # 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-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
- Ollama
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF with Ollama:
ollama run hf.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
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": "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF with Docker Model Runner:
docker model run hf.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
- Lemonade
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.GLM-4-9B-Cooking-Assistant-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
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 HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M
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 "HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M" \ --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"
|
Download README.md from HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 16.1 kB
-
https://huggingface.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF/resolve/main/README.md
- Command line
-
hf download hf://HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF/README.md
-
curl -L -o README.md https://huggingface.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF/resolve/main/README.md
16.1 kB
| license: mit | |
| base_model: HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant | |
| base_model_relation: quantized | |
| library_name: gguf | |
| pipeline_tag: text-generation | |
| language: [en, es, pt, it, fr, nl, de, ru, bn, id, fa, ja, pl, sv, vi, tl, he, ml, tr, zh, ms, th, fi, ar, ta, hi] | |
| tags: [cooking, recipes, dpo, glm4, gguf, llama.cpp, provenance, abstention] | |
| datasets: [HumanjavaEnterprises/cooking-assistant-eval] | |
| # GLM-4-9B Cooking Assistant (GGUF) | |
| A cooking assistant that reads the recipe you give it, and usually asks for the recipe instead of inventing details | |
| when it can't see one. On questions that need a recipe it wasn't shown, it invents details 9.7% of the time vs | |
| 40.1% for base GLM-4-9B-0414; given the recipe, it answers correctly 96.2% of the time vs | |
| 83.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. | |
| *Unofficial fine-tune of GLM-4-9B-0414 by Humanjava Enterprises; not made or endorsed by Zhipu AI / Z.ai.* | |
| Files for llama.cpp, Ollama and LM Studio. Full-precision safetensors (Transformers, vLLM): | |
| [HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant](https://huggingface.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant). | |
| The same recipe on Qwen3-8B: | |
| [HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant](https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant). | |
| It does not memorise recipes: give it the recipe (paste it, or have your app look it up) and it will read it. | |
| ## Files | |
| | File | Size | Use | | |
| |---|---|---| | |
| | `glm-4-9b-cooking-assistant-v1-Q4_K_M.gguf` **(default)** | 6.2 GB | 8 GB cards (6.0 GB used at 8k context, q8_0 KV cache); no significant loss against full precision on our checks | | |
| | `glm-4-9b-cooking-assistant-v1-Q6_K.gguf` | 8.3 GB | 7.8 GB used at 8k context (q8_0 KV cache); no significant loss against full precision on our checks | | |
| | `glm-4-9b-cooking-assistant-v1-Q8_0.gguf` | 10.0 GB | 10 GB cards and up; no significant loss against full precision on our checks | | |
| | `glm-4-9b-cooking-assistant-v1-BF16.gguf` | 18.8 GB | full precision, for your own quantisation | | |
| | `glm-4-9b-cooking-assistant-v1.imatrix.gguf` | 11 MB | importance matrix used for Q4_K_M and Q6_K | | |
| Q4_K_M and Q6_K are built with an importance matrix computed on chat-formatted training conversations, stratified by | |
| question type and by whether a recipe was shown; none of them is in the evaluation set. These files are larger than a Qwen3-8B file of the same name mostly because GLM-4-9B is larger (9.4B parameters; | |
| the BF16 and Q8_0 files are about 1.15 times Qwen3-8B's). On top of that, GLM-4-9B's feed-forward width does not fit | |
| the k-quant block size, so llama.cpp stores some down-projection tensors at higher precision (in Q4_K_M, 20 as Q8_0 | |
| and 20 as Q5_0; in Q6_K, all 40 as Q8_0), which adds about 0.4 GB to Q4_K_M. | |
| Checksums: `SHA256SUMS`. | |
| ## Quick start | |
| ```bash | |
| # llama.cpp | |
| llama-server -hf HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M --jinja -c 8192 | |
| # Ollama | |
| ollama run vveerrgg/glm-4-9b-cooking-assistant | |
| # or: ollama run hf.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF:Q4_K_M (template, system prompt and settings ship in this repo) | |
| ``` | |
| ## 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`. | |
| | 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 | | |
| ## Prompt format | |
| GLM-4-0414 chat template, embedded in every file (`[gMASK]<sop>`, then `<|system|>`, `<|user|>`, `<|assistant|>` turns; | |
| a turn ends at `<|user|>`). There is no thinking mode. Ollama does not read the embedded template: use the `template`, | |
| `system` and `params` files in this repo (the `hf.co/...` path does) or the library tag above. Trained with this system prompt, which works best: | |
| ``` | |
| You are a cooking assistant. You answer questions about dishes, ingredients, techniques and food safety. When you are not sure, you say so. | |
| ``` | |
| To ask about a specific recipe, put the recipe text in the user turn, then the question. | |
| ## What it does | |
| The fine-tune teaches **behaviour, not facts**: | |
| - **Reads the recipe you give it.** Paste a recipe and ask about it; it answers from that text. | |
| - **Usually asks when the recipe is missing.** "If I double the recipe, how much pepper?" with no recipe gets a request | |
| for the original quantity; it may add a typical range, marked as typical, but not a number presented as the recipe's. | |
| - **Answers general cooking questions:** food safety, substitutions, why a dish failed. On our general questions it | |
| does not beat the base model (see Results). | |
| The intended setup is **LoRA for behaviour, retrieval for facts, tools for numbers**: an app looks up the recipe and | |
| hands it to the model; scaling and unit conversion are calculated, not guessed. | |
| It is the second model built with the recipe behind | |
| [Qwen3-8B Cooking Assistant](https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant): the same training | |
| data and the same two stages on a different base model family, scored on the same questions. | |
| ## Results | |
| All cooking scores are on the fixed held-out set of 682 questions in 21 languages behind the Qwen3-8B Cooking Assistant | |
| card, never used in training: 290 with the recipe shown, 10 recall questions with no recipe ("how do you make X?"), 300 | |
| that need a recipe the model is not shown, and 82 general questions. Answers from base GLM-4-9B-0414 and this model | |
| were scored one at a time by open-weights judges, blind to which model wrote them. None of the headline judges is from | |
| the GLM or the Qwen family: DeepSeek-V4-Flash (MIT), gpt-oss-120b (Apache-2.0) and Seed-OSS-36B-Instruct (Apache-2.0). | |
| A rule check removes "invents" verdicts on answers whose every detail was already in the question. 95% confidence | |
| intervals in brackets. | |
| | counted as "invents" when | GLM-4-9B-0414 | this model | | |
| |---|---|---| | |
| | at least 2 of 3 judges say so | 40.1% [34.7, 45.8] | **9.7%** [6.8, 13.6] | | |
| | all three say so | 28.1% | 3.7% | | |
| | any one says so | 58.9% | 27.1% | | |
| (299 of the 300 answers per column count: one base and one model answer lack a verdict from one judge.) | |
| 2 of 3: 104 questions where only the base invents, 13 where only this model does | |
| (McNemar p < 1e-18). | |
| The same judges on the questions where the recipe **is** shown and the model has to read it (290 questions; 2 of 3 | |
| must agree): GLM-4-9B-0414 correct 83.1% [78.4, 87.0], this model **96.2%** | |
| [93.3, 97.9] (42 questions only this model gets right, 4 only the base | |
| does, McNemar p < 1e-8). Two other kinds of question in the set are reported apart: 82 general questions graded | |
| against a reference answer (56.1% base, 46.3% this model: lower, but not significantly, McNemar p = 0.12 with 14 | |
| questions only the base gets right and 6 only this model; see the quantised files below) and | |
| 10 "how do you make X?" questions with no recipe whose reference is the original 1800s text (20.0% / | |
| 10.0%: the model is built not to recall historical recipes from memory). | |
| **A fourth judge.** Qwen3.8-27B (Apache-2.0) also scored every answer. It is a Qwen-family model and wrote the training | |
| questions, so it is not independent of the training data and is kept out of the headline. With all four judges and 3 | |
| of 4 agreeing: invents 30.1% (base) vs **4.7%**; correct with the recipe shown | |
| 78.6% vs **95.5%**. | |
| **Next to the Qwen3-8B sibling** (same questions, same three judges, both models' answers generated the same way): | |
| | | invents, no recipe (2 of 3) | correct, recipe shown (2 of 3) | | |
| |---|---|---| | |
| | Qwen3-8B → Qwen3-8B Cooking Assistant v1 | 43.0% → 10.3% | 85.9% → 95.5% | | |
| | GLM-4-9B-0414 → this model | 40.1% → 9.7% | 83.1% → 96.2% | | |
| (The Qwen card's own figures come from a four-judge panel that included GLM-4.7-Flash, so they differ from this row.) | |
| Model judges tend to make the same mistakes as each other, so three agreeing is less than three independent checks. | |
| On the no-recipe questions the judges agree less about this model's answers than about the base's (Fleiss kappa 0.33 | |
| vs 0.58). | |
| **Quantised files** were scored on the same 682 questions against the full-precision model, same judges: | |
| | | Q4_K_M | Q6_K | Q8_0 | | |
| |---|---|---|---| | |
| | Invents with no recipe, 2 of 3 judges (full precision) | 10.7% (8.7%) | 11.7% (9.3%) | 9.4% (10.0%) | | |
| | Correct when the recipe is shown, 2 of 3 judges (full precision) | 95.5% (95.9%) | 95.5% (96.2%) | 95.9% (96.2%) | | |
| | Difference significant? (McNemar, inventing) | no, p = 0.26 | no, p = 0.14 | no, p = 0.77 | | |
| With the three headline judges, no quantised file differs significantly from full precision on inventing (p ≥ 0.14) or on reading a shown recipe (p ≥ 0.5). On the 82 general questions every quantised file scored higher than full precision: Q4_K_M 54.9% vs 46.3% (p = 0.039), Q6_K 53.7% vs 47.6% (p = 0.27), Q8_0 56.1% vs 47.6% (p = 0.065). The full-precision answers are the same text in every comparison; only the judging was re-run for each file, which alone moves their scores by up to 1.3 points. The quantised answers come from llama.cpp and the full-precision ones from vLLM, so the full-precision model's lower general score may be partly a serving or decoding effect (one of three differences has p < 0.05, none after correcting for three comparisons); not settled. | |
| **Memorisation.** Training documents from the Wikibooks Cookbook (CC BY-SA) were probed with prefixes of 32 to 128 tokens at several offsets, as raw text and as chat prompts, with greedy decoding. The model never continues a document verbatim (no 50-token match; longest overlap 89 characters, the same as base GLM-4-9B-0414), and its overlap with the true text is no higher than the base's (ROUGE-L 0.158 vs 0.161). | |
| ## How it was built | |
| | | | | |
| |---|---| | |
| | Sources | Cooking texts in 26 languages from openly licensed and public-domain sources only: the Wikibooks Cookbook (CC BY-SA 4.0), public-domain cookbooks from Project Gutenberg and the Internet Archive (scans re-read with olmOCR-2), and NHLBI recipes (US government, public domain). Every record carries its source URL, licence and public-domain basis | | |
| | Excluded | Traditional and Indigenous knowledge, sacred material, outsider-authored books about other cultures, dog-meat recipes, anything without a verified licence | | |
| | Models used | Open-weights models only, all Apache-2.0 or MIT. **No output from any closed or API model is in the training, evaluation or seed data** | | |
| | Training | The training data and both stages of Qwen3-8B Cooking Assistant v1, unchanged, on GLM-4-9B-0414: two LoRA stages, each merged: a supervised stage that teaches reading a shown recipe, asking when there is none, and full general answers; then a preference stage that favours asking over inventing and correct over wrong. General chat data is mixed in to limit forgetting | | |
| | Tooling | LLaMA-Factory, vLLM, llama.cpp | | |
| The evaluation set behind every number on this card (all 682 questions, both models' answers, every judge's verdict, | |
| and per-row source credits) is published so the results can be checked: | |
| [HumanjavaEnterprises/cooking-assistant-eval](https://huggingface.co/datasets/HumanjavaEnterprises/cooking-assistant-eval), | |
| config `glm-4-9b-v1`. | |
| ## What carried over, and what did not | |
| - **The data was written for the Qwen model.** Part of the general answers were rewritten by base Qwen3-8B (for the | |
| Qwen model, its own words), and the preference stage uses answer pairs sampled from the Qwen model, not from this | |
| one. Both were kept unchanged so that only the base model differs; for GLM-4-9B-0414 they are another model's words. | |
| - **The two cooking behaviours carried over.** On inventing and on reading a shown recipe this model shows no significant difference from Qwen3-8B Cooking Assistant v1 under the same judges (McNemar p = 0.86 and 0.80). **General answers did not:** where the Qwen model stayed level with its base, this model's full-precision score fell below GLM-4-9B-0414's (not significant; see Results). | |
| ## Limitations | |
| - **Not a source of truth for food safety.** It repeats standard guidance (e.g. 74 °C / 165 °F for poultry) but can be | |
| wrong; check official sources. | |
| - **It does not know historical recipes by heart.** It was trained on old cookbooks to read and reason about recipes, | |
| not to recall them. For a specific historical dish, give it the text. | |
| - The judges are models. Three open judges from three other families agree on the direction of the changes, | |
| and we keep checking them against people with Label Test, our blind labelling tool. **Help refine it:** label five | |
| answers at [label-test.humanjava.com](https://label-test.humanjava.com/?s=cook4&k=cook-9ac741a1e387&src=hf-gguf-glm) (no account; we keep only a name or initials and your labels). | |
| - Still invents on some no-recipe questions: about 1 in 10 when two of three judges must agree (9.7%), nearly 1 in 4 by the strictest single judge (22.7%). | |
| - **General answers are not improved.** On 82 general questions the full-precision model scored 46.3% vs the base's 56.1% (not significant, p = 0.12); the quantised files scored 54-56% on the same questions (not compared against the base), so the gap may be partly a serving or decoding effect (one of three differences has p < 0.05, none after correcting for three comparisons); not settled. | |
| - Best in English and Spanish: it invents on 6.9% and 3.8% of the no-recipe questions there, 12.6% across the other | |
| languages together (2 of 3 judges). | |
| - The old public-domain cookbooks reflect their era: measures, techniques, some outdated advice. | |
| ## Feedback and security | |
| - **The model got something wrong** (invented a detail, misread a recipe, unsafe advice): please | |
| [open a report](https://github.com/HumanjavaEnterprises/glm-4-9b-cooking-assistant/issues/new?template=wrong-answer.yml). | |
| Real examples are what improve the next version. | |
| - **Help measure it:** [label five answers](https://label-test.humanjava.com/?s=cook4&k=cook-9ac741a1e387&src=hf-gguf-glm) on Label Test. | |
| - **Security** (files that don't match `SHA256SUMS`, unexpected embedded content): report privately, see | |
| [SECURITY.md](https://github.com/HumanjavaEnterprises/glm-4-9b-cooking-assistant/blob/main/SECURITY.md). | |
| ## Licence and credits | |
| Weights: MIT, same as the base model. Base model: GLM-4-9B-0414 by Zhipu AI / Z.ai (MIT); its copyright and permission | |
| notice is kept in `LICENSE`: | |
| > Copyright (c) 2025 Zhipu AI. Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
| > software and associated documentation files (the "Software"), to deal in the Software without restriction [...] | |
| > The above copyright notice and this permission notice shall be included in all copies or substantial portions of | |
| > the Software. (Full text in `LICENSE`.) | |
| Training data sources: Wikibooks Cookbook contributors (CC BY-SA 4.0; per-page attribution in the dataset), Project | |
| Gutenberg and Internet Archive public-domain books, NHLBI. General chat data: NVIDIA | |
| (Nemotron-Instruction-Following-Chat-v1, ODC-BY 1.0, responses by GPT-OSS-120B and Qwen3-235B-A22B), Hugging Face | |
| (SmolTalk2, Apache-2.0, responses by Qwen3-32B; prompts from SystemChat-2.0, the Aya Dataset by Cohere For AI, and | |
| Table-GPT by Microsoft). Teacher: Qwen3.8-27B (Apache-2.0). Rewritten general answers: Qwen3-8B (Apache-2.0). | |
| Preference-stage answers: Qwen3-8B Cooking Assistant (Apache-2.0). Judges: DeepSeek-V4-Flash (MIT), gpt-oss-120b | |
| (Apache-2.0), Seed-OSS-36B-Instruct by ByteDance Seed (Apache-2.0), Qwen3.8-27B (Apache-2.0). OCR: olmOCR-2 by Ai2 | |
| (Apache-2.0). Training: LLaMA-Factory. Quantisation: llama.cpp. | |
| Built by [Humanjava Enterprises](https://huggingface.co/HumanjavaEnterprises). | |