The trending post runs a small Gemma-class model with tool calls on a consumer card, and the budget math generalizes to any card you own.
The trending query Gemma 4 Function Calls on an 8 GB RTX 3050 sits on dev.to's trending page on November 25, 2026. The Gemma family is Google's line of small open-weight models, and the durable lesson here is bigger than one release. Every local deployment starts as a memory budget, and the pieces competing for it are predictable.
The VRAM arithmetic
Quantization is the practice of storing a model's parameters with fewer bits than full precision. At 16-bit each parameter takes two bytes, at 8-bit one byte, and at 4-bit half a byte. For a model with eight billion parameters, the 4-bit weights alone land near four gigabytes before overhead.
Overhead is real, since embeddings, norms, and runtime buffers add a gigabyte or so. The working rule is that a small model at 4-bit occupies about half its parameter count in gigabytes, and the card budget covers the rest. Tools like llama.cpp ship the quantized formats that make this possible.
Where the remaining gigabytes go
A transformer caches key and value vectors for every token at every layer, so each new token can attend to the past without recomputing it. That record is the KV cache, and it grows linearly with context length.
Long context on a small card is therefore a trade: shorter context, lower-bit weights, or a smaller model each free room. Prefill activations claim a slice too, which is why the first long prompt can spike memory hardest.
| Precision | Bytes per parameter | Tradeoff |
|---|---|---|
| 16-bit | 2 | Reference quality, the most memory. |
| 8-bit | 1 | Half the weight memory, small quality loss. |
| 4-bit | 0.5 | The budget choice, minor drops on some tasks. |
Drop in your PDF - it doesn't leave your device.
Every miss becomes a red node on your map.
Free plan: 21 nodes, no card, no countdown.
Function calling as constrained decoding
A function call is structured output: the decoder restricts candidate tokens at each step to those consistent with a grammar built from the tool's schema. The model still chooses what to call and with which arguments, but the form is guaranteed to parse.
That split between meaning and format is why a small local model can drive tools reliably once the harness does its part. Structured output turns a chatty probability machine into a component with an interface, which is exactly what an 8 GB deployment needs to be useful.
Key takeaways
- Weights at 4-bit cost about half a gigabyte per billion parameters, which sets the floor of any local deployment.
- The KV cache grows with context length, so long prompts compete directly with model size on a small card.
- Quantization trades a little quality for a lot of memory, and 4-bit is the usual budget choice.
- Function calling works because decoding is constrained to a grammar, which guarantees parseable output.
Quick answers
How much VRAM do 4-bit weights need?
Roughly half a gigabyte per billion parameters, plus overhead. An eight-billion-parameter model lands near four gigabytes before the cache.
What is the KV cache?
The stored key and value vectors that let each new token attend to everything before it. It grows linearly with context length.
Why do function calls come back well-formed?
The decoder only picks tokens consistent with a grammar derived from the tool's schema. The model chooses meaning while the grammar enforces format.
Can an 8 GB card run long contexts?
Only by trading something else away: fewer parameters, lower-bit weights, or a shorter window. The budget has to come from one of the three.
One thing to do tonight
Pick your own card tonight and do the arithmetic: parameter count times half a gigabyte per billion at 4-bit, then subtract. What is left is your context budget, and a short quiz on quantization terms tomorrow will tell you which parts of the vocabulary you still guess at.