Text Generation
Transformers
Safetensors
qwen3
cooking
recipes
dpo
provenance
abstention
conversational
text-generation-inference
Instructions to use HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HumanjavaEnterprises/Qwen3-8B-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/Qwen3-8B-Cooking-Assistant") model = AutoModelForCausalLM.from_pretrained("HumanjavaEnterprises/Qwen3-8B-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/Qwen3-8B-Cooking-Assistant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HumanjavaEnterprises/Qwen3-8B-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/Qwen3-8B-Cooking-Assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant
- SGLang
How to use HumanjavaEnterprises/Qwen3-8B-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/Qwen3-8B-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/Qwen3-8B-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/Qwen3-8B-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/Qwen3-8B-Cooking-Assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant with Docker Model Runner:
docker model run hf.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant
|
Download README.md from HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant: direct link, hf CLI and curl.
- Browser
- Download file 16 kB
-
https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant/resolve/main/README.md
- Command line
-
hf download hf://HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant/README.md
-
curl -L -o README.md https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant/resolve/main/README.md
16 kB
| license: apache-2.0 | |
| base_model: Qwen/Qwen3-8B | |
| base_model_relation: finetune | |
| library_name: transformers | |
| 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, qwen3, provenance, abstention] | |
| datasets: [HumanjavaEnterprises/cooking-assistant-eval] | |
| # Qwen3-8B Cooking Assistant | |
| A cooking assistant that reads the recipe you give it, and 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 2.7% of the time vs 25.8% for base | |
| Qwen3-8B; given the recipe, it answers correctly 94.8% of the time vs 83.1% (four open judges, 3 of 4 agreeing). General | |
| cooking answers are level with the base. Trained on 26 languages, evaluated in 21; runs on a 6 GB GPU (Q4_K_M). | |
| *Unofficial fine-tune of Qwen3-8B by Humanjava Enterprises; not made or endorsed by Alibaba Cloud or the Qwen team.* | |
| Full-precision (bf16) safetensors for Transformers and vLLM. For llama.cpp, Ollama and LM Studio: | |
| [HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant-GGUF](https://huggingface.co/HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant-GGUF). | |
| It does not memorise recipes: give it the recipe (paste it, or have your | |
| app look it up) and it will read it. | |
| **Sibling (added 2026-11-14):** the same recipe applied to GLM-4-9B-0414: [HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant](https://huggingface.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant) ([GGUF](https://huggingface.co/HumanjavaEnterprises/GLM-4-9B-Cooking-Assistant-GGUF), `ollama run vveerrgg/glm-4-9b-cooking-assistant`). Its card compares both on one judge panel; this card's numbers are unchanged. | |
| ## Files | |
| The two training stages (supervised LoRA, then a preference LoRA on top) are merged into one bf16 model, the same | |
| architecture and tokenizer as Qwen3-8B (~16 GB). The GGUF files in the sibling repo are converted from these weights. | |
| ## Quick start | |
| ```bash | |
| # vLLM | |
| vllm serve HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant --max-model-len 8192 | |
| # then send requests with "chat_template_kwargs": {"enable_thinking": false} | |
| ``` | |
| ```python | |
| # Transformers | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| repo = "HumanjavaEnterprises/Qwen3-8B-Cooking-Assistant" | |
| tok = AutoTokenizer.from_pretrained(repo) | |
| model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto") | |
| messages = [{"role": "system", "content": "You are a cooking assistant. You answer questions about dishes, ingredients, techniques and food safety. When you are not sure, you say so."}, | |
| {"role": "user", "content": "If I double the recipe, how much pepper do I need?"}] | |
| inputs = tok.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False, return_dict=True, return_tensors="pt").to(model.device) | |
| out = model.generate(**inputs, max_new_tokens=400) | |
| print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)) | |
| ``` | |
| ## 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/qwen3-8b-cooking-assistant:v1`. | |
| | Version | Date | Invents (no recipe, 3 of 4 judges) | Correct (recipe shown, 3 of 4 judges) | Notes | | |
| |---|---|---|---|---| | |
| | **v1** (current) | 2026-11-12 | 2.7% (base 25.8%) | 94.8% (base 83.1%) | first public release | | |
| **Corrections (2026-11-14):** the evaluation set covers 21 languages (this card said 26; the model was trained on 26); training counts removed from this card; Transformers example updated for transformers 5. No score changed. | |
| ## Prompt format | |
| Qwen3 chat template, **thinking off** (`enable_thinking: false`, or `/no_think` in the user turn). 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. | |
| - **Asks when the recipe is missing.** "If I double the recipe, how much pepper?" with no recipe gets a request for the | |
| original quantity, not an invented number. | |
| - **Answers general cooking questions in full:** food safety, substitutions, why a dish failed. | |
| 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 also a worked example of a small custom model built carefully: open weights, open or public-domain sources | |
| only, every training record traceable to its source, and the checks published along with the failures they caught. | |
| ## Results | |
| All cooking scores are on a fixed held-out set of 682 questions in 21 languages, 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 Qwen3-8B | |
| (thinking off) and this model are compared by an open-weights judge from a different model family | |
| (DeepSeek-V4-Flash, MIT licence), blind, in both orders. 95% confidence intervals in brackets. | |
| | | Qwen3-8B | this model | | |
| |---|---|---| | |
| | **Invents recipe details when no recipe is shown** | 30.0% [25.1, 35.4] | **9.0%** [6.3, 12.8] | | |
| | same, after a rule check that removes judge false alarms | 27.7% | **4.0%** [2.3, 6.9] | | |
| | **Correct when the recipe is shown** (290 questions) | 87.6% | **96.2%** | | |
| | Preferred by the judge, all 682 questions | — | **0.610** [0.581, 0.639] (0.50 = tie) | | |
| | Preferred by the judge, general questions only | — | 0.460 [0.369, 0.549] (level with base) | | |
| The drop in invented details is significant (McNemar p < 1e-10; 78 questions where only the base invents, 15 where | |
| only this model does). | |
| **Four judges.** To check the judge, three more open-weights judges from different families scored the same answers | |
| one at a time: Qwen3.8-27B (Apache-2.0), GLM-4.7-Flash (MIT) and gpt-oss-120b (Apache-2.0). With the same rule check | |
| applied to all four, the share of no-recipe answers that invent recipe details: | |
| | counted as "invents" when | Qwen3-8B | this model | | |
| |---|---|---| | |
| | at least 3 of 4 judges say so | 25.8% [21.1, 31.0] | **2.7%** [1.4, 5.2] | | |
| | all four say so | 19.1% | 1.0% | | |
| | any one says so | 49.2% | 18.3% | | |
| The same four judges on the questions where the recipe **is** shown and the model has to read it (290 questions; 3 of | |
| 4 must agree): Qwen3-8B correct 83.1% [78.4, 87.0], this model **94.8%** [91.6, 96.8] (40 questions only this model | |
| gets right, 6 only the base does, McNemar p < 1e-6). Two other kinds of question in the set are reported apart: | |
| 82 general questions graded against a reference answer (40.2% for both models; the judges disagree widely there) and | |
| 10 "how do you make X?" questions with no recipe whose reference is the original 1800s text (0% for both: the model | |
| is built not to recall historical recipes from memory). | |
| Every judge, and every way of combining them, shows a significant drop (3 of 4: 72 questions where only the base | |
| invents, 3 where only this model does, McNemar p < 1e-17). The judges agree moderately on base answers (Fleiss kappa | |
| 0.63). GLM-4.7-Flash flags more of this model's answers than the others; reading them, most repeat or restate a line | |
| the user quoted, which the rubric says is not inventing, and the rule check now clears those for every judge. Qwen3.8-27B also labelled this model's preference training data, so its | |
| read of this model's answers is not fully independent. Model judges also tend to make the same mistakes as each | |
| other, so four agreeing is less than four independent checks. Most of the remaining "invents" cases are borderline: a quantity that appears in the question | |
| itself, or a common default ("a pinch of salt") offered with a hedge. | |
| **Quantised files** were scored on the same 682 questions against the full-precision model (0.50 = identical quality): | |
| | | Q4_K_M | Q6_K | Q8_0 | | |
| |---|---|---|---| | |
| | Judge preference vs full precision | 0.492 [0.475, 0.509] | 0.501 [0.485, 0.517] | 0.481 [0.466, 0.494] | | |
| | Correct when the recipe is shown, 290 questions (full precision on that run) | 97.2% (96.6%) | 96.6% (96.2%) | 96.9% (96.2%) | | |
| | Invents with no recipe (full precision on that run) | 9.3% (7.3%) | 6.3% (6.3%) | 6.7% (6.7%) | | |
| | Invents with no recipe, 3 of 4 judges (full precision) | 4.7% (3.3%) | 3.0% (3.3%) | 3.3% (2.7%) | | |
| | Correct when the recipe is shown, 3 of 4 judges (full precision) | 95.5% (94.1%) | 95.5% (94.1%) | 95.2% (94.8%) | | |
| With all four judges, no quantised file differs significantly from full precision (McNemar on the 3-of-4 verdict: | |
| Q4_K_M p = 0.34, Q6_K p = 1.0, Q8_0 p = 0.69 for inventing; p ≥ 0.22 for correctness with the recipe shown). On Q4_K_M two of the four judges on their own | |
| (GLM-4.7-Flash, gpt-oss-120b) do see slightly more invented details (p = 0.02 and 0.04); pick Q6_K or Q8_0 if that matters. | |
| With the DeepSeek judge alone, no quantisation changes the invents rate significantly (McNemar p ≥ 0.29). Q8_0's small dip comes from the 82 | |
| general questions (0.418) and is most likely judge noise on a small set; Q4_K_M and Q6_K, which remove more bits, | |
| sit at parity. | |
| **Memorisation.** 1,000 CC BY-SA training documents (Wikibooks) were probed 12,000 ways (prefixes of 32 to 128 | |
| tokens at three offsets, raw and chat prompts, greedy decoding). The model never continues a document verbatim (no | |
| 50-token match, longest overlap 67 characters vs the base model's 52), and overlap with the true text is no higher | |
| than base Qwen3-8B's (ROUGE-L 0.169 vs 0.177). | |
| **General ability** (lm-eval 0.4.13, thinking off; MMLU-Pro on 100 questions per subject, so ±1.3 points is noise): | |
| | | IFEval | GSM8K | TruthfulQA mc2 | MMLU-Pro | MGSM (8 lang) | Belebele (21 lang) | | |
| |---|---|---|---|---|---|---| | |
| | Qwen3-8B | 0.817 | 0.807 | 0.532 | 0.611 | 0.341 | 0.846 | | |
| | this model | 0.800 | 0.866 | 0.542 | 0.591 | 0.401 | 0.863 | | |
| MMLU-Pro is 2.0 points down, the largest loss. The GSM8K and MGSM gains most likely reflect cleaner final-answer | |
| formatting learned from the chat data, not better maths. Belebele (reading comprehension) is within 2 points of the | |
| base in all 21 languages. | |
| **Refusals** (XSTest, 250 safe and 200 unsafe prompts). Without a system prompt it behaves like the base (refuses | |
| 5.2% of safe prompts vs 4.4%). With the cooking system prompt, the base refuses 38.4% of safe prompts as off-topic; | |
| this model refuses 18.4% and answers or redirects the rest. We read every unsafe prompt the base refused and this | |
| model did not: all were deflections or explicit rebuttals, none complied. | |
| ## 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. About a quarter of the training records are English | | |
| | 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 | Two LoRA stages on Qwen3-8B, 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). | |
| ## What went wrong along the way | |
| - **The first model invented recipe details.** Questions had been written while looking at a recipe, then trained | |
| without it, so the model learned to answer as if it could see one. Benchmarks did not catch it; reading the answers | |
| did. Fix: the recipe goes in the prompt, plus examples of asking when it is missing. | |
| - **Then the general answers got thin.** Teaching it to ask made general answers short (median 440 characters vs the | |
| base's 1,223), and lowering the adapter strength brought depth back but lost the asking. Fix: let the base model | |
| rewrite general answers in its own words, then a preference stage on the model's own outputs. | |
| - **A benchmark that looked broken was.** Belebele scored by log-likelihood put the base model at chance (it always | |
| picked "A"). We rescored it with generated letter answers. | |
| ## 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. Four open judges from four families agree on the direction and size 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-card) (no account; we keep only a name or initials and your labels). | |
| - Still invents on some no-recipe questions: about 1 in 40 when three of four judges must agree, about 1 in 16 by the | |
| strictest single judge. Most remaining cases are borderline hedges (a common default offered with a caveat). | |
| - Strongest in English and Spanish, where most of the source texts are; languages with few source texts (such as Thai, Tamil and Hindi) are likely weaker. | |
| - 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/qwen3-8b-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-card) on Label Test. | |
| - **Security** (files that don't match `SHA256SUMS`, unexpected embedded content): report privately, see | |
| [SECURITY.md](https://github.com/HumanjavaEnterprises/qwen3-8b-cooking-assistant/blob/main/SECURITY.md). | |
| ## Licence and credits | |
| Weights: Apache-2.0, same as the base model. Base model: Qwen3-8B by the Qwen team (Apache-2.0). | |
| 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). Judge: DeepSeek-V4-Flash (MIT). OCR: olmOCR-2 by Ai2 | |
| (Apache-2.0). Evaluation: lm-evaluation-harness, XSTest (CC BY 4.0), Belebele (CC BY-SA 4.0). Training: LLaMA-Factory. | |
| Quantisation: llama.cpp. | |
| Built by [Humanjava Enterprises](https://huggingface.co/HumanjavaEnterprises). | |