Instructions to use ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF", filename="gemma-4-26B-A4B-it-DFlash-SWA-ik_llama-Q8_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-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 ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
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 ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
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 ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
Use Docker
docker model run hf.co/ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
- LM Studio
- Jan
- Ollama
How to use ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF with Ollama:
ollama run hf.co/ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
- Unsloth Studio
How to use ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-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 ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-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 ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF with Docker Model Runner:
docker model run hf.co/ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
- Lemonade
How to use ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ji-farthing/gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF:Q8_0
Run and chat with the model
lemonade run user.gemma-4-26B-A4B-it-DFlash-SWA-ik-llama-GGUF-Q8_0
List all available models
lemonade list
Gemma 4 26B-A4B DFlash SWA draft for ik_llama
This repo contains an ik_llama-compatible DFlash draft GGUF converted from z-lab/gemma-4-26B-A4B-it-DFlash, carrying the per-layer sliding-window attention (SWA) pattern.
This is not a standalone chat model. Use it as a --model-draft file next to a matching Gemma 4 26B-A4B IT target GGUF, with DFlash speculative decoding. Gemma 4 needs --jinja.
Sliding-window attention
The draft is sliding-window on every layer except a final full-attention (global) layer: sliding_window_pattern = [true, true, true, true, false], sliding_window = 2048.
Files
| File | Quant | Draft window |
|---|---|---|
gemma-4-26B-A4B-it-DFlash-SWA-ik_llama-Q8_0.gguf |
Q8_0 | 2048 (4 sliding + 1 global) |
Use
llama-server \
-m /path/to/gemma-4-26B-A4B-it-<quant>.gguf \
--model-draft /path/to/gemma-4-26B-A4B-it-DFlash-SWA-ik_llama-Q8_0.gguf \
--spec-type dflash:n_max=4,cross_ctx=8192 \
-c 8192 --jinja
SWA only engages once the DFlash cross-context exceeds the 2048 window, so set cross_ctx above the window for long-context prompts (the default 512 does not grow with -c).
Validation (RTX 4070, ik_llama DFlash SWA branch)
Draft acceptance and throughput versus the same draft run with full attention, as the prompt overflows the 2048 window, where clip = (prompt - 2048) / prompt:
| prompt tok | clip | accept, full-attn | accept, SWA | acceptance gain | tok/s change |
|---|---|---|---|---|---|
| 1413 | 0% | 14.4% | 15.2% | +0.7 pp | +1.9% |
| 2751 | 26% | 17.1% | 17.1% | +0.0 pp | -1.1% |
| 3923 | 48% | 12.0% | 15.9% | +3.9 pp | +7.9% |
| 5426 | 62% | 13.8% | 14.7% | +0.9 pp | +0.5% |
| 10673 | 81% | 10.6% | 18.1% | +7.5 pp | +16% |
Conversion
Converted from z-lab/gemma-4-26B-A4B-it-DFlash with ik_llama's convert_hf_to_gguf.py DFlash draft converter (sliding-window support branch), then quantized to Q8_0. The per-layer SWA pattern is taken from the source layer_types. Conversion requires a --target-model-dir containing the target tokenizer merges.
- Downloads last month
- 77
8-bit