Instructions to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF", filename="vn26b-experts-v1-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-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 build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-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 build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
Use Docker
docker model run hf.co/build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "build-small-hackathon/Gemma-26B-A4B-VisualNovel-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": "build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
- Ollama
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with Ollama:
ollama run hf.co/build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
- Unsloth Studio
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-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 build-small-hackathon/Gemma-26B-A4B-VisualNovel-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 build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF to start chatting
- Pi
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf build-small-hackathon/Gemma-26B-A4B-VisualNovel-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:8080/v1 hermes config set model.default build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with Docker Model Runner:
docker model run hf.co/build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
- Lemonade
How to use build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull build-small-hackathon/Gemma-26B-A4B-VisualNovel-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Gemma-26B-A4B-VisualNovel-GGUF-Q4_K_M
List all available models
lemonade list
Gemma 4 26B-A4B โ Visual Novel (GGUF)
A QLoRA fine-tune of google/gemma-4-26b-a4b-it (26B MoE, ~4B active) for
the Ars-Fabula anime visual-novel engine. The model
narrates slice-of-life scenes for a locked cast and drives sprites, backgrounds
and choices through a bracketed tool protocol
([TOOL: name key="value" choices='[...]']).
Training
- Method: QLoRA on the MoE experts (Path A "un-fuse"): each fused 3D
Gemma4TextExpertsweight is split into per-expertnn.Linearleaves so LoRA can targetexperts.(gate_up|down).N(7885 LoRA modules, 1.88% trainable), then merged + re-fused bit-exact to the canonical Gemma4 layout for GGUF. - Data: 2,752 VN-protocol turns (traced real play, validity-filtered).
- Schedule: 2 epochs, single B200, 688 optimizer steps, final train loss 0.225.
- Why the experts: training the FFN experts (where phrasing lives) is what moved prose quality โ attention-only and dense-FFN-only LoRA gave only a shallow restyle. The experts tune keeps the base model's already-low canned-phrase rate while raising vocabulary diversity and sharpening character voice (see Evaluation).
Evaluation
This fine-tune (at its ship config, temperature 1.1) vs the untuned base
google/gemma-4-26b-a4b-it, on held-out VN-protocol prompts. Higher is
better for โ metrics, lower for โ.
| Metric | base gemma-4-26b-a4b-it |
26B experts tune |
|---|---|---|
| Protocol validity โ | 100% (8/8) | 100% (48/48) |
| Slop-tell density /1k words โ | 2.20 | 2.11 |
| Type-token ratio (TTR) โ | 0.49 | 0.53 |
| Cross-scene trigram reuse โ | 0.019 | 0.004 |
- The base model is already strong on the protocol, so the win isn't "teaching the format" โ it's prose quality at no validity cost. The tune holds 100% validity across 48 held-out scenes (6 seeds) at temperature 1.1, while raising vocabulary diversity (TTR 0.49โ0.53) and cutting verbatim cross-scene phrase reuse ~5ร (0.019โ0.004). Slop-tell density is a wash (2.20 vs 2.11) โ the base was never slop-heavy on this list; the tune's gain is voice and variety, not de-clichรฉ-ing.
- Sampling provenance: tune figures are mean over 6 seeds at temp 1.1 (validity over all 48 scenes); the base was sampled once (seed 42) at temp 0.8, its eval default, on the same 8-scene prompt set.
What the metrics mean
- Protocol validity โ fraction of generated turns that pass the engine's
own validator (
vn_validate): well-formed[TOOL: โฆ]calls, parseablechoicesJSON, and cast-lock (only the locked cast may speak/act). A hard well-formedness gate ("does the turn drive the UI without erroring"), not a taste score. - Slop-tell density โ count of curated "LLM-slop" phrases (stock clichรฉs like
"the air hung heavy with unspoken words", "a mix of X and Y") per 1,000
words, via
tools/repetition_metrics.pyagainst a hand-curated tell list. Lower = less formulaic. (The list was curated from observed tuned-model failure modes, so it may undercount base-specific clichรฉs โ read the base number as a floor, not a like-for-like.) - Type-token ratio (TTR) โ unique words รท total words: a vocabulary-diversity proxy. Higher = richer, less word-level repetition.
- Cross-scene trigram reuse โ fraction of distinct 3-word sequences that recur across different scenes: a verbatim self-plagiarism proxy. Lower = the model reuses fewer canned spans from scene to scene.
Qualitative read (48 scenes, temp 1.1, seeds 1โ6)
- Strengths: genuinely good comedy โ per-seed-varied gags with setup / escalation / button (i.e. composing, not memorizing, despite the low 0.225 loss); environmental staging (shows before it tells); distinct, light character voices.
- Weaknesses: romance is the weak suit (stock, on-the-nose, little subtext); the "air heavy / charged with unspoken X" reflex survives the tune but clusters almost entirely in romance scenes; choices lean on an open-up / deflect / stay-silent triad; the occasional garbled line or firstโsecond-person POV slip.
- Verdict: read it for comedy and cast chemistry; skim the kissing scenes.
Quants
| File | Bits | Size | Notes |
|---|---|---|---|
vn26b-experts-v1-Q4_K_M.gguf |
Q4_K_M | 16.8 GB | servable default; matches the stock gemma-4-26B-A4B-it-UD-Q4_K_M layout |
vn26b-experts-v1-Q8_0.gguf |
Q8_0 | 26.9 GB | near-lossless |
MoE fallback (benign): 60/658 tensors (ffn_down / ffn_down_exps, cols
704 & 2112, not รท256) fall back q4_Kโq5_0, q6_Kโq8_0 โ so the down-projs are
higher precision than nominal (why Q4_K_M is 16.8 GB, not ~14 GB).
Serving
Gemma 4 26B-A4B is a custom MoE arch; serve with the
atomic-llama-cpp-turboquant fork (the stock llama.cpp lacks the tensor
maps). The tuned model emits a reasoning channel (<|channel>thought โฆ <channel|>)
that the OpenAI /v1/chat/completions parser mangles โ hit the raw /completion
endpoint with the embedded chat template and strip a stray leading <channel|>.
Recommended sampling: temperature 1.1, top_p 0.95.
Runtime (Q4_K_M, fork llama-server CUDA build on a single L4, all 30 layers
offloaded -ngl 99): prompt eval โ1620 tok/s, generation โ61 tok/s.
- Downloads last month
- 421
4-bit
8-bit