Instructions to use ambrosfitz/gemma4-ushistory-sft-parityfix-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 ambrosfitz/gemma4-ushistory-sft-parityfix-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 ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ambrosfitz/gemma4-ushistory-sft-parityfix-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 ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF with Ollama:
ollama run hf.co/ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M
- Unsloth Studio
How to use ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF to start chatting
- Docker Model Runner
How to use ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF with Docker Model Runner:
docker model run hf.co/ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M
- Lemonade
How to use ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma4-ushistory-sft-parityfix-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
gemma4-ushistory-sft-parityfix-GGUF
GGUF quantizations of ambrosfitz/gemma4-ushistory-sft-parityfix
(the merged 16-bit parity-fix checkpoint), for local inference via llama.cpp / LM
Studio. Two quants are provided:
| File | Size | Notes |
|---|---|---|
gemma4-ushistory-parityfix-Q4_K_M.gguf |
7.38 GB | Verified clean 8/8 on structured-output smoke test |
gemma4-ushistory-parityfix-Q5_K_M.gguf |
8.55 GB | Verified clean 8/8 on structured-output smoke test |
Both fit comfortably on a 12GB+ GPU with full offload and room for a 4096-token KV cache.
Required generation recipe
This model was trained and evaluated with a specific chat template and stop-token setup. Getting either wrong produces malformed or garbage output β this was confirmed directly during quantization verification (see below).
- Chat template:
gemma-4, non-thinking mode. The correct jinja template is embedded in this GGUF's own metadata (tokenizer.chat_template) β do not override it with a runtime's built-in "gemma" preset. llama.cpp ships a built-in template namedgemmathat is for the classic Gemma 1/2/3 format (<start_of_turn>/<end_of_turn>) and is incompatible with this checkpoint's Gemma-4-unified format. Passing--chat-template gemmatollama-serversilently overrides the correct embedded template and produces completely unrelated, garbage output (confirmed: 0/8 parseable outputs, all hit the token budget without stopping). Leave the chat template on its default (LM Studio: don't override it; llama.cpp: don't pass--chat-template) so the runtime uses the template embedded in this file. - Stop token:
<turn|>(vocab id 106). This is not encoded as an EOS/EOG token in the GGUF metadata β the only marked EOS token is<eos>(id 1), and llama.cpp's own automatic EOG detection at load time does not pick up<turn|>either. This mirrors the original HF Transformers inference recipe, which also had to pass it explicitly (eos_token_id=[tokenizer.eos_token_id, id_of("<turn|>")]). You must set<turn|>as an explicit stop string in your runtime (LM Studio: add it under the model's stop-string/sequence setting) β without this, generation will run past the intended turn boundary and repeat into garbage on longer outputs.
Verification
Both quants were served on-pod via llama-server and smoke-tested with 8 items
spanning all 6 Bloom's-taxonomy levels (remember/understand/apply/analyze as
multiple-choice, analyze/evaluate/create as open-ended β matching this model's
trained item-type schema), using the project's exact prompt construction and an
explicit <turn|> stop string.
Result: 8/8 parsed, 8/8 structurally valid, 8/8 stopped cleanly β on both
quants. No malformed or garbage output on either quant once the chat-template
issue above was fixed. Full per-item results and methodology in this repo's
source project (handoff_A_verification.md).
A small parity sanity check (word-count spread across MCQ options, this project's
max-min length-parity metric) on the n=5 MCQ smoke items per quant showed the
same pattern already documented for the un-quantized model: understand-level
items carry more residual parity failures than remember/apply. At this sample
size this is noise-level, and there is no evidence quantization itself degrades
parity beyond what the fp16 checkpoint already exhibits.
Recommended local config (tested target: RTX 4070, 12GB)
- Full GPU offload (
-ngl 99or LM Studio's "GPU offload: max") - Context length: 4096 (matches training: passage + up to 1024 generated tokens)
- Chat template: leave on default / embedded (see above)
- Stop string: add
<turn|>explicitly (see above) temperature: 0for deterministic output, matching how this model was trained and evaluated throughout this project
Lineage
- Base: Gemma 4 (unsloth/gemma-4-12b)
- SFT:
ambrosfitz/gemma4-ushistory-sftβ parity-fix continued SFT βambrosfitz/gemma4-ushistory-sft-parityfix(merged 16-bit) β this GGUF quantization
- Downloads last month
- 153
4-bit
5-bit
Model tree for ambrosfitz/gemma4-ushistory-sft-parityfix-GGUF
Base model
ambrosfitz/gemma4-ushistory-sft-parityfix