Instructions to use thinktecture/gemma3-4b-ft-nextera-q4_k_m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use thinktecture/gemma3-4b-ft-nextera-q4_k_m with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="thinktecture/gemma3-4b-ft-nextera-q4_k_m", filename="gemma3-4b-ft-nextera-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use thinktecture/gemma3-4b-ft-nextera-q4_k_m with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M # Run inference directly in the terminal: llama-cli -hf thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M # Run inference directly in the terminal: llama-cli -hf thinktecture/gemma3-4b-ft-nextera-q4_k_m: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 thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf thinktecture/gemma3-4b-ft-nextera-q4_k_m: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 thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M
Use Docker
docker model run hf.co/thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use thinktecture/gemma3-4b-ft-nextera-q4_k_m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thinktecture/gemma3-4b-ft-nextera-q4_k_m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thinktecture/gemma3-4b-ft-nextera-q4_k_m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M
- Ollama
How to use thinktecture/gemma3-4b-ft-nextera-q4_k_m with Ollama:
ollama run hf.co/thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M
- Unsloth Studio new
How to use thinktecture/gemma3-4b-ft-nextera-q4_k_m 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 thinktecture/gemma3-4b-ft-nextera-q4_k_m 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 thinktecture/gemma3-4b-ft-nextera-q4_k_m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for thinktecture/gemma3-4b-ft-nextera-q4_k_m to start chatting
- Docker Model Runner
How to use thinktecture/gemma3-4b-ft-nextera-q4_k_m with Docker Model Runner:
docker model run hf.co/thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M
- Lemonade
How to use thinktecture/gemma3-4b-ft-nextera-q4_k_m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thinktecture/gemma3-4b-ft-nextera-q4_k_m:Q4_K_M
Run and chat with the model
lemonade run user.gemma3-4b-ft-nextera-q4_k_m-Q4_K_M
List all available models
lemonade list
β οΈ Conference talk demo β not production weights.
This model accompanies a conference keynote on local on-device AI. Published as a reference for the fine-tuning patterns shown on stage β not a deployable artefact. No security audit, no SLA, pinned to the talk's state.
- Source repository: thinktecture-labs/local-multi-model-agent-slm
- Threat model + out-of-scope: SECURITY.md
- Licensing details: MODEL_LICENSES.md
- All five models in the stack: Collection β Local Multi-Model Agent β nextera fine-tunes
Gemma3-4B FT (Q4_K_M) β RAG Synthesis (+ Vision) β production
| Base model | google/gemma-3-4b-it (4.3B params, multimodal: text + vision via mmproj) |
| License | Gemma Terms of Use |
| Provenance | llama-quantize from the F16 sibling GGUF (no separate training run β quantization only). See finetune/convert_gemma3_4b_to_gguf.sh. |
| File size | 2.49 GB (vs 7.77 GB for F16) β ~3Γ memory-bandwidth headroom on decode |
| Hardware tested | RTX PRO 6000 (Blackwell sm_120), MBP M5 Max (Metal), DGX Spark (GB10 sm_121), Strix Halo (Vulkan/RDNA 3.5) β byte-deterministic across all four |
| Intended use | Production RAG response synthesis. Points-of-use: scenarios/<scenario>.json:synthesis_4b_gguf_ft. The vision channel uses the same GGUF (multimodal via the same mmproj as the F16 variant). |
| Out of scope | Tool calling (delegated to Qwen3.5-4B FT). Free-form chat without retrieved context. |
| Reference eval (Nextera, 2026-05-17) | Identical-quality to F16 on the 80-query RAG groundtruth set (MBP same-machine F16-vs-Q4_K_M A/B: 55/80 vs 54/80 = 1-query phrasing noise, zero semantic regression). Realized perf gains vs F16: RAG p50 -25% to -57%, image-query p50 -32% to -61% across the four-backend fleet. |
| Known failure modes | Same as F16 sibling. Q4_K_M-specific quantization artifacts not observed in our evals; would expect them most on rare-token tail behavior. |
- Downloads last month
- 37
4-bit