How to use from
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 KucLab/kuclab-hertz-0.4:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf KucLab/kuclab-hertz-0.4:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf KucLab/kuclab-hertz-0.4:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf KucLab/kuclab-hertz-0.4: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 KucLab/kuclab-hertz-0.4:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama cli -hf KucLab/kuclab-hertz-0.4:Q4_K_M
Use Docker
docker model run hf.co/KucLab/kuclab-hertz-0.4:Q4_K_M
Quick Links

KucLab Hertz 0.4

A Czech/English STEM + programming assistant built by KucLab on top of google/gemma-4-12B-it, fine-tuned toward physics, chemistry, biology, mathematics and programming in Czech, while keeping the base model's native 256k-token context and tool-calling.

What this is

Hertz 0.4 is a LoRA fine-tune (r=8, merged into the base weights) trained on a self-distilled corpus of Czech/English STEM concepts, worked problems, programming exercises, and formatting examples. Training data was generated by prompting Qwen3.8-27B (Alibaba/Tongyi, Apache 2.0) as a data-generation teacher β€” it never trains itself, only produces answers used to fine-tune the actual model that ships here β€” with a system instruction asking for direct, confident answers over hedged ones.

  • Base: google/gemma-4-12B-it (11.95B params, Apache 2.0)
  • Method: QLoRA, r=8 / alpha=16, merged to bf16 then quantized
  • Context: 262144 tokens natively (no context-extension hack needed β€” unlike Hertz 0.3's Qwen2.5-14B base, this model ships long context out of the box). Deployed here with a default num_ctx of 65536; the model can go higher, this is a practical default, not a hard limit.
  • Training data: 744 rows β€” 497 newly self-distilled (STEM concepts/terms/problems, a new programming category, formatting), plus 234 rows reused as-is from Hertz 0.3's corpus.
  • Format available: GGUF (q4_k_m, ~7.4GB) for llama.cpp/Ollama, plus the raw LoRA adapter.

Gemma-4 has its own native thinking mechanism (channel-based, gated by an enable_thinking flag). Training data deliberately does not replicate that token syntax β€” output is plain text with visible step-by-step reasoning, same choice as Hertz 0.3. This doesn't disable native thinking mode, it just means the fine-tune doesn't touch it either way.

Quickstart (Ollama)

Important: ollama pull hf.co/... alone does NOT apply this model's system prompt (identity + personality) β€” Ollama only fetches the raw GGUF from Hugging Face, it does not read a repo's Modelfile. Without the system prompt, the model falls back to identifying as a generic Gemma model. Use ollama create with the Modelfile below instead β€” it pulls the weights AND applies the system prompt in one step:

curl -O https://huggingface.co/KucLab/kuclab-hertz-0.4/resolve/main/Modelfile
ollama create kuclab-hertz-0.4 -f Modelfile
ollama run kuclab-hertz-0.4

(The Modelfile's FROM line points at hf.co/KucLab/kuclab-hertz-0.4:Q4_K_M, so this pulls the same GGUF automatically β€” no separate download needed.)

Example

Q: Kolik je 17 Γ— 23? UkaΕΎ postup.

A: VΓ½sledek: 391 β€” pak krok za krokem 17Γ—(20+3) = 340+51 = 391.

Q: NapiΕ‘ v Pythonu funkci pro binΓ‘rnΓ­ vyhledΓ‘vΓ‘nΓ­.

A: (correct, idiomatic implementation with type hints and a docstring)

Benchmarks β€” and an honest complication

Measured against the same base model (google/gemma-4-12B-it, Q4_K_M via Ollama), same prompts, same grading code, both models cold.

MMLU-Pro STEM (240 held-out questions, this project's own curated subset)

base Hertz 0.4 Ξ”
Biology 86.7% 76.7% βˆ’10.0pp
Chemistry 55.0% 45.0% βˆ’10.0pp
Math 85.0% 76.7% βˆ’8.3pp
Physics 63.3% 56.7% βˆ’6.6pp
Total 72.5% 63.7% βˆ’8.8pp

We do not trust this number at face value, and you shouldn't either. Both models β€” base and fine-tuned β€” tend to work through every multiple-choice option individually with detailed reasoning before giving a final answer, and a meaningful fraction of responses got cut off by our grading harness's token budget before reaching the final answer letter (18% unparsed for base, 23% for Hertz 0.4). The drop is uniform across all four subjects, which points to a harness/verbosity artifact rather than genuine domain-knowledge loss, but we have not yet re-run this with a larger token budget to confirm. Until we do, treat this MMLU-Pro number as unverified and likely pessimistic for both models β€” we're publishing it anyway because we'd rather show a confusing number with an honest explanation than hide it.

Czech terminology benchmark: not yet run for this release.

Honest status

  • βœ… Coherent, correct Czech and English output (spot-checked: arithmetic, physics, code, terminology β€” one wrong term found: "smΔ›lnΓ‘ odchylka" instead of "smΔ›rodatnΓ‘ odchylka" for standard deviation)
  • βœ… Correctly identifies as a KucLab model, not as "Gemma" (LoRA + system prompt)
  • βœ… 256k native context (inherited from base, not independently long-context-tested by us yet)
  • ⚠️ MMLU-Pro STEM comparison run but confounded by a benchmark-harness token-budget issue (see above) β€” re-run pending
  • ⏳ Czech terminology benchmark not yet run for this release
  • ⏳ Tool-calling fine-tuning β€” base supports it natively, this fine-tune didn't add tool-use training examples
  • ⏳ No uncensoring/decensoring pass β€” safety behavior inherited from the base model as-is

If you're deciding whether this fits your use case: treat it as "gemma-4-12B-it, nudged toward Czech STEM/programming fluency and KucLab identity," with an open question mark on general STEM benchmark performance until we re-verify it.

License

Apache 2.0, inherited from google/gemma-4-12B-it (per Google's official Hugging Face listing). Qwen3.8-27B (used only to generate training data, never trained or redistributed here) is separately licensed under Apache 2.0 by Alibaba/Tongyi.

Credits

Downloads last month
30
GGUF
Model size
12B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for KucLab/kuclab-hertz-0.4

Adapter
(165)
this model