Choosing Gemma 4 settings for function calls on an 8 GB RTX 3050
- Hardware
- NVIDIA RTX 3050 OEM, 8 GB
- Models & engines
- llama.cpp built with CUDA, commit d1044bc82
Exact Q4_0 repacks of Google's Gemma 4 QAT weights (E2B, E4B, 12B)
Python 3 and a clone of his gemma4-dev repo - Key gotcha
- With thinking switched off under Google's settings, E4B still produced thinking text in 496 of 840 replies
What they built
xbill wanted to know which Gemma 4 model and setting to serve for function calls on a single 8 GB card. He ran E2B, E4B and 12B, each as a 4-bit QAT build, on an RTX 3050 OEM through llama.cpp.
Each model answered 840 problems from the Berkeley Function Calling Leaderboard (simple, multiple and irrelevance categories) at temperature 0 and with Google's sampling settings, each with thinking off and on: 36 runs and 10,080 replies, scored by plain code so the model never grades itself.
Setup
- NVIDIA RTX 3050 OEM, 8 GB
- llama.cpp built with CUDA, commit d1044bc82
- Exact Q4_0 repacks of Google's Gemma 4 QAT weights (E2B, E4B, 12B)
- Python 3 and a clone of his gemma4-dev repo
How it works
- Every problem offers tools through the OpenAI tools field; the right reply is one correct call, or no call when no tool fits
- Arguments are checked the way BFCL's own checker does
- Google's settings were temperature 1.0, top-k 64, top-p 0.95; each reply had an 8,192-token limit
- Results were compared problem by problem with paired tests
Results & numbers
- At temperature 0 with thinking off, E2B, E4B and 12B scored 748, 758 and 756 of 840, level with each other
- E2B took 0.84 seconds per problem against 3.57 for the 12B, and used 3,610 MiB of card memory against 7,294
- With Google's settings and thinking off, E4B dropped to 698 and answered 66 of 600 tool requests in prose; turning thinking on brought it to 761
- The 12B got more single calls right but called a tool more often when none fit
Gotchas
- With thinking switched off under Google's settings, E4B still produced thinking text in 496 of 840 replies
- The 12B with thinking on at temperature 0 lost 21 problems, and 19 replies ran to the 8,192-token limit
- Each setting ran once, on one card; parallel and multi-turn categories were not tested, and other servers parse tool calls their own way
- If your agent's tool calls drop after a sampling change, check whether thinking is off before blaming the model
“On an 8 GB card, the setting decides function calling more than the model size does.”— xbill
Do it yourself
- Build llama.cpp with CUDA
- Download a Q4_0 Gemma 4 QAT GGUF that fits your card
- Decide whether your client sends temperature 0 or Google's default sampling
- At temperature 0, serve E2B with thinking off; with Google's settings, turn thinking on
- Count replies that skip a tool they should have called, not just the overall score
Similar setups
Re-benchmarking local GGUF models for a coding agent after a llama.cpp upgrade
Jordi Marçal re-ran his fixed coding-agent benchmark on seven local GGUF models after three weeks of llama.cpp updates, and found the harness's generation caps, not the models, explained a sudden score collapse.
Letting a coding agent tune llama.cpp on an 8 GB AMD GPU: 3x faster prompt reading for OpenCode
Cliff K had his coding agent benchmark llama.cpp backends and flags for a Qwen3.6 35B MoE on a Radeon RX 6600 XT, at the context depths OpenCode really uses, and turned the process into an open-source skill.
Fine-tuning Gemma 4 E2B on an 8 GB RTX 3050 so it thinks less
xbill used one 8 GB RTX 3050 to have Gemma 4 E2B write its own training data, fine-tune itself through its served 4-bit weights and get graded on 250 held-out maths problems, the whole loop in 6 h 44 min.
Running a 14.4 GB Gemma 4 26B MoE on an 8 GB RTX 3050 with llama.cpp
A step-by-step llama.cpp setup that serves Gemma 4 26B A4B from an 8 GB RTX 3050 by keeping most expert layers in system RAM, reaching 131,072 tokens of context and scores level with the 12B that fits the card.