Run this model with HF Jobs
Run kuzaai/kuza-gemma-4-e2b 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 to fine-tune https://huggingface.co/kuzaai/kuza-gemma-4-e2b. 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/kuzaai/kuza-gemma-4-e2b 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.
Instructions to use kuzaai/kuza-gemma-4-e2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kuzaai/kuza-gemma-4-e2b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kuzaai/kuza-gemma-4-e2b 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 kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL
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 kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama cli -hf kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL
Use Docker
docker model run hf.co/kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL
- Llama new
- LM Studio
- Jan
- Ollama
How to use kuzaai/kuza-gemma-4-e2b with Ollama:
ollama run hf.co/kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL
- Unsloth Desktop
- Docker Model Runner
How to use kuzaai/kuza-gemma-4-e2b with Docker Model Runner:
docker model run hf.co/kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL
- Lemonade
How to use kuzaai/kuza-gemma-4-e2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kuzaai/kuza-gemma-4-e2b:UD-Q4_K_XL
Run and chat with the model
lemonade run user.kuza-gemma-4-e2b-UD-Q4_K_XL
List all available models
lemonade list
- Atomic Chat
Kuza Gemma 4 E2B
Full training-run archive for Kuza (East Africa agricultural assistant),
fine-tuned from unsloth/gemma-4-E2B-it-qat-q4_0-unquantized.
Weights, logs, checkpoints, GGUFs, and provenance are stored with the same
layout as $KUZA_WORK_DIR/kuza-gemma-4-e2b/.
This derivative is subject to the Gemma license.
Training mix
- 100% English train from
kuzaai/kuza_sft_english - 50% Swahili from
kuzaai/kuza_sft_swahili - 8%
HuggingFaceH4/no_robots - 5% adversarial from
kuzaai/kuza_sft_adversarial - 3% multiturn from
kuzaai/kuza_sft_multiturn - 10% code-switching (Sw-En) from
kuzaai/kuza_sft_code_switch - 6% passage-grounded QA from
kuzaai/kuza_sft_grounding
LoRA: RsLoRA r=32, alpha=64, QAT int4.
Sequence length 2048, 2 epochs, LR 0.0001.
Thinking is off. GGUFs are text-only (PLE kept; vision/audio dropped).
Preference alignment (DPO)
adapter/ holds the SFT+DPO policy (promoted by 02b_dpo.py). Preference
pairs: 866 train / 97 validation from kuzaai/kuza_dpo_preference.
DPO: beta 0.1, RPO alpha 1.0,
LR 5e-06, 1 epoch(s),
loss sigmoid. The pristine SFT adapter is preserved in adapter-sft/;
the pre-promotion DPO output is preserved in adapter-dpo/.
The preference dataset kuzaai/kuza_dpo_preference
is maintained and uploaded separately by the repo owner; it is never pushed by
the training pipeline.
Files
adapter/โ PEFT policy adapter (SFT+DPO), tokenizer, metrics and manifestsadapter-sft/โ frozen pristine SFT adapter (pre-alignment snapshot)adapter-dpo/โ DPO output as trained (pre-promotion copy)training/โ Trainer checkpoints includingcheckpoint-bestmerged_bf16/โ text-only merged Hugging Face BF16 weightsreference/โ text-only BF16 GGUF (kuza-bf16.gguf) and smoke logreference_qat/โ QAT lattice-exact Q4_0 export (kuza-qat-q4_0-lattice.gguf)imatrix/โ calibration corpus, eval corpus, imatrix, logsquants/โ quantized GGUF candidates:iq4_nl/(iq4_nl, from reference)iq4_xs/(iq4_xs, from reference)q4_0_imatrix_pure/(q4_0, from reference)q4_0_qat_export/(q4_0, from reference_qat)q4_k_m_default/(q4_k_m, from reference)q4_k_m_ud_style/(q4_k_m, from reference)q8_0_ceiling/(q8_0, from reference)ud_q4_k_xl/(q4_k_m, from reference)screen/โ GPU KLD diagnostic, hidden-set scores, andresults.jsonwinnerprovenance/โ copied adapter metrics, recipes, screen JSONupload_manifest.jsonโ path, size, and sha256 for every uploaded file
Download
huggingface-cli download kuzaai/kuza-gemma-4-e2b --local-dir ./kuza-gemma-4-e2b
screen/results.json applies the quality gates (safety, language, same-top-p,
KLD ceiling) first, then ranks gate-passers within KLD noise by hidden-set
accuracy, CPU generation t/s, GGUF size, and peak RSS. CPU numbers are the
deployment signal for the edge target; GPU t/s and KLD are diagnostics.
- Downloads last month
- 48
4-bit
8-bit
16-bit
Model tree for kuzaai/kuza-gemma-4-e2b
Base model
google/gemma-4-E2B