Free account = 1 chapter of every course unlocked
No credit card ยท Google sign-in in 30 seconds ยท 20+ free chapters across 25 courses
Start free โ†’
All Courses/Pick the Right Model for Your Machine
๐ŸŽฏ

Pick the Right Model for Your Machine

Stop guessing which model to run. Verdict-first picks for 8, 12, 16 and 24GB+ cards and for each job you actually do, then the reasoning underneath: the three numbers that decide everything, quant formats, when a 7B beats a 70B, real usable context, sampling settings, honest speed measurement, how to read a leaderboard without being fooled, and how to build an eval from your own work.

14 chaptersFirst chapter free to preview

Who this is for

  • โ†’Anyone with a working local setup and a folder full of half-tested models who wants a repeatable way to choose between them.
  • โ†’Developers picking a model for a feature โ€” extraction, classification, code completion, tool calling โ€” where a wrong choice is expensive to unwind later.
  • โ†’People who have read three conflicting recommendation threads and noticed that none of them stated the hardware, the task or the quantization used.
  • โ†’Not for you if you want one permanent answer and no maintenance. The opening chapters do hand over picks by capacity tier and by job, but those carry a shelf life, and the rest of the material exists so you can redo the choice yourself when the field moves.
  • โ†’Not a hardware buying guide. It assumes the machine you already have and works within it.

What you need first

  • ยทA local runtime already installed and working, whichever one you prefer. The material is deliberately runtime-neutral.
  • ยทEnough disk space to hold several candidate models at once, because comparison means running them side by side rather than sequentially over weeks.
  • ยทA willingness to write down twenty real prompts from your own work. This is the part people skip and it is the part that produces the answer.
  • ยทBasic comfort with a spreadsheet or a text file for recording results. No statistics background is assumed; the evaluation chapters explain what little is needed.

Model choice is a fit problem, not a ranking problem

"Which local model is best" is not a question with an answer, and treating it as one is the root of most wasted time in this hobby. It becomes answerable only once three things are fixed: the hardware you will run it on, the job you will give it, and the quality bar that job has to clear.

Aggregate leaderboard scores compress dozens of capabilities into a single number. The capabilities you care about are almost always a narrow subset of that. A model that sits mid-table overall may be the strongest available option for German summarization, or for producing valid SQL against your schema, or for calling functions with correctly typed arguments โ€” and the aggregate ranking will never tell you, because those skills are a rounding error in the average.

Why a small model often wins

The argument that a smaller model can beat a much larger one is not consolation for people with modest hardware. It falls out of how these systems get used.

A model that fits entirely in accelerator memory and responds quickly changes what you can afford to do around it. You can supply a longer few-shot prompt. You can retrieve more context and still leave room. You can sample several times and take the consistent answer, or run a second pass that checks the first. You can iterate on the prompt twenty times in an afternoon rather than three. Each of those is an end-to-end quality gain, and collectively they routinely outweigh the raw capability gap between model sizes on a constrained task.

The larger model, meanwhile, is paying for generality you are not using. If the job is extracting six fields from an invoice, world knowledge and multi-step reasoning are not what is being tested. Instruction-following and format compliance are, and those correlate poorly with size beyond a point.

The model is one component

The last piece of framing the course insists on: swapping models is rarely the biggest lever available. Retrieval quality, prompt structure, output constraints and the verification step around the model typically move end-to-end accuracy more than any model change does. People reach for a new download because it is the easiest thing to change, not because it is the most effective. Establishing a measurement first tells you whether the model was ever the bottleneck.

The three numbers that decide what will run

Before quality enters the conversation, three quantities determine whether a model is even a candidate on your machine.

One: the weights

Parameter count multiplied by bytes per parameter. Four-bit quantization stores roughly half a byte per weight, eight-bit roughly one byte, sixteen-bit floating point two. That single multiplication rules out most of the internet's recommendations for most people's hardware in about five seconds.

Mixture-of-experts architectures complicate this in a way worth understanding, because they are now common. Such a model has a large total parameter count and a much smaller number of parameters active for any given token. The total governs the memory footprint, since the experts have to be somewhere. The active count governs how much has to be read per token. The practical consequence is a model that is unusually fast for its size if you can hold it, and unusable if you cannot โ€” there is no graceful middle.

Two: the key-value cache

Every token in context stores a key and a value vector for every layer. The cache size scales with context length, layer count, the number of key-value heads, head dimension and the precision it is stored in. Grouped-query attention reduces the head count dramatically, which is why two models with the same parameter count can have wildly different context costs.

The important habit is treating context length as a purchase. Configuring a long context reserves that memory before you have written a word, and doing so can push a model that comfortably fit into a partial CPU offload, at which point you have traded a large amount of speed for context you may never fill. Cache quantization buys some of it back, at a quality cost that is small for most tasks and not zero.

Three: memory bandwidth

Token generation is memory-bound rather than compute-bound. Producing each new token requires streaming the active weights out of memory, so the ceiling on generation rate is set by how many bytes per second the memory subsystem can deliver, divided by how many bytes each token requires. This is why quantization makes a model faster as well as smaller: fewer bytes read per token.

Prompt processing behaves differently. It handles many tokens in parallel and is compute-bound, which is why time to first token grows with prompt length while the steady-state generation rate does not. Two systems with identical memory capacity and different bandwidth are not equivalent, and a model split between accelerator memory and system RAM is governed by the slower tier plus the cost of crossing the bus.

Get these three numbers right and the shortlist writes itself. Get them wrong and you spend the evening downloading things that were never going to work.

Quantization formats and what each one costs

A quantization format is not only a compression scheme. It is a commitment to a runtime, and choosing weights before choosing a runtime is a common and annoying ordering mistake.

  • GGUF belongs to the llama.cpp family โ€” llama.cpp itself, Ollama, LM Studio, KoboldCpp and others. Its distinguishing capability is graceful splitting of layers between accelerator and CPU, which no other format handles as well. That flexibility, more than any quality advantage, is why it dominates consumer use. Within GGUF, the k-quant family mixes precision across tensor types rather than applying one width uniformly, and the newer importance-weighted variants use a calibration pass to decide where precision is worth spending.
  • AWQ is activation-aware quantization: it identifies weight channels that matter most for output and protects them, targeting four-bit GPU inference with fast kernels. It is aimed at serving stacks such as vLLM rather than at desktop use.
  • GPTQ is an earlier post-training method using second-order information to minimize the error introduced by rounding. Plenty of weights still ship in it; it has gradually been displaced for new releases.
  • EXL2 allows a variable bit rate across layers, which lets you target a memory budget directly rather than picking from fixed widths. It is tied to the ExLlamaV2 runtime.
  • MLX is Apple's array framework with its own quantization scheme, native to unified memory and generally the fastest path on Apple hardware โ€” at the cost of a smaller ecosystem than the CUDA world.
  • NF4 through bitsandbytes exists mainly to make fine-tuning fit on modest hardware. It is a training format that also runs, not a serving format.

How much quality does quantization cost

The honest answer is that degradation is gradual down to roughly the four-bit region and steeper below it, that the exact knee depends on the model and the task, and that anyone quoting a universal figure is extrapolating from one experiment. Several patterns are consistent enough to plan around:

Smaller models suffer more than larger ones at the same bit width, because they carry less redundancy to lose. Structured output โ€” JSON, function call arguments, code โ€” degrades noticeably earlier than conversational prose, since a single wrong token breaks a parse while a slightly worse adjective does not. And perplexity is a poor proxy for any of this: a shift too small to register in perplexity can be the difference between valid and invalid output on every request.

The rule the course settles on is conditional rather than absolute. Prefer a larger model at a moderate quantization over a smaller model at higher precision only while the larger one still fits entirely in accelerator memory. The moment it spills into system RAM, the ordering inverts, and it inverts hard.

Context window claims versus context you can use

An advertised context length is a statement about the maximum positional range the implementation will accept. It is not a claim that the model uses that range well, and the two are frequently far apart.

Many long-context figures come from scaling the position encoding beyond the length the model was trained on โ€” RoPE scaling, YaRN and related techniques. These extend the addressable range. They do not manufacture training signal at those lengths. A model stretched to a headline number will accept the tokens and may attend to them poorly.

The published evidence is worth knowing rather than guessing at. Stanford researchers documented, in work titled "Lost in the Middle", that models retrieve information placed near the start and end of a long context considerably more reliably than material buried in the middle. NVIDIA built the RULER benchmark specifically to separate claimed context from effective context, and reported that effective lengths fall short of advertised ones across the models it tested. Neither result is controversial; both are routinely ignored by people pasting an entire codebase into a prompt and wondering why the answer missed the relevant file.

What follows in practice

  • Retrieval beats stuffing. Selecting the right few thousand tokens usually outperforms supplying a hundred thousand and hoping attention finds the needle. It is also cheaper in cache memory.
  • Position is a design variable. If material must be long, put the critical instruction where the model attends reliably. Instructions placed after a long document frequently outperform the identical instruction placed before it.
  • Confirm what the runtime actually applied. Runtimes impose their own context defaults, often smaller than the model supports, and they truncate silently. The number in the model card is not the number in effect.
  • Long context has a running cost. The cache grows with the window you configure, and that memory competes directly with the weights. A long context that forces a CPU offload has made the system worse in exchange for capacity you are not using.

The chapter that covers this ends with a small test you can run yourself: place a distinctive fact at several depths in a long document and ask for it back. It takes fifteen minutes and it will change how you structure prompts.

Sampling, chat templates, and measuring speed honestly

Two configuration issues account for a large share of "this model is not very good" conclusions, and neither has anything to do with the weights.

Sampling settings

The model produces a probability distribution over the next token; sampling settings decide how a token is drawn from it. Temperature flattens or sharpens the distribution. Top-k truncates to a fixed number of candidates. Top-p truncates to a cumulative probability mass. Min-p truncates relative to the most likely token, which adapts better across steps where the model is confident and steps where it is not. Repetition and frequency penalties discourage reuse of recent tokens.

The defaults shipped by most front ends are tuned for open-ended chat, which is the wrong setting for a lot of work. Extraction, classification, code and anything with a required output shape want near-greedy decoding. Prose, brainstorming and dialogue want more entropy. Repetition penalties in particular are actively harmful for structured output, where the repeated tokens being penalized are the closing braces and recurring field names you need.

If valid JSON is a requirement, constrain the decode with a grammar or schema rather than asking politely and parsing hopefully. Every runtime worth using supports some form of this, and it converts a probabilistic problem into a deterministic one.

The chat template

Each model family expects conversation turns wrapped in a particular structure of role markers and special tokens. A client that formats them incorrectly produces output that looks like weak capability: instructions half-followed, the model answering a question you did not ask, responses that trail into invented dialogue. This is the most under-diagnosed cause of disappointing local output, and it is entirely fixable. Before concluding a model is poor, verify the template being applied.

Reporting speed without fooling yourself

Time to first token and steady-state generation rate are different measurements and answer different questions. Report both, and report the conditions with them: prompt length, configured context, quantization, whether the model was already resident, and whether anything else was competing for the accelerator.

A cold-start measurement is mostly a measurement of your storage device. A ten-token prompt hides the prefill cost that will dominate your real workload. A benchmark run once is a sample rather than a result. None of this requires elaborate tooling โ€” it requires stating conditions, which is exactly what the numbers circulating in forums almost never do, and why they cannot be compared to each other.

Reading leaderboards, contamination and vendor numbers

Public evaluations are useful for one job and misused for another. They are good at narrowing a field of hundreds to a shortlist of five. They are bad at picking the winner among those five for your task, and that is the decision people actually try to make with them.

Human preference arenas, of which the Chatbot Arena work originating at UC Berkeley is the best known, collect pairwise votes on open-ended prompts. What they measure is genuine and genuinely useful: what people prefer when shown two answers. What they also measure, unavoidably, is formatting, length, confidence and tone. A model that presents well scores well. If your application post-processes output into a form nobody reads directly, the thing being ranked is not the thing you need.

Static academic suites โ€” multiple-choice knowledge tests, word-problem sets, coding pass rates โ€” are reproducible and comparable, which is their whole point. Their weaknesses are that they are narrow, that top models have saturated several of them to the point where differences are noise, and that their test items are public text that ends up inside training corpora. Hugging Face rebuilt its open leaderboard partly for these reasons, which is itself a useful signal about how much weight the original scores deserved.

Vendor-published numbers are not usually falsified. They are optimized. The vendor chooses the prompt, the scaffold, the sampling settings, the number of attempts and the comparison points, and every one of those choices is made by someone who wants a particular result. Two vendors' self-reported figures for the same benchmark are two different experiments, and placing them in one table implies a comparability that does not exist.

Contamination is the failure underneath all of it. When evaluation items leak into pretraining data, scores rise without capability rising. It is difficult to prove for any specific model, it is known to happen, and it is the strongest argument for the position this course takes: a small private evaluation built from work nobody has published is worth more to you than any public table, because it is the one thing that cannot have been trained on.

Use the leaderboards to generate candidates. Then stop reading them.

Your own evaluation, licenses, and a shortlist that survives churn

Twenty prompts drawn from real work will tell you more about a model than every benchmark in existence, because they test the distribution you actually operate in.

Building the set

Collect genuine inputs rather than imagined ones โ€” real documents, real questions, real code from the repository you work in. Include the cases that have already failed, since those are where models differ most. Mix routine examples with adversarial ones: ambiguous instructions, missing information, inputs that should produce a refusal or a clarifying question rather than an answer.

Write expected properties, not expected strings. "Returns valid JSON with these five keys", "cites only files that exist", "declines when the document does not contain the answer" are checkable. "Gives a good summary" is not. Properties give you pass and fail; scores out of ten drift with mood and with whichever model you graded first.

Running it without fooling yourself

Blind and shuffle. Label outputs A and B, randomize the order, and judge without knowing which model produced which. Knowing the name anchors judgment more strongly than most people believe about themselves.

Run each prompt more than once, because sampling is stochastic and a single generation is a sample rather than a measurement. Hold a few prompts back so you can detect the point at which you have tuned your prompts to one specific model rather than improved them generally. And version the evaluation alongside the prompt template: change either and prior results are no longer comparable, which is worth writing down at the top of the file.

Licences before you ship

Open weights and open source are not the same category, and the difference has consequences. Some families ship under permissive licenses that impose almost nothing. Others ship under bespoke community licenses carrying acceptable-use policies, attribution or naming requirements, and conditions that activate at commercial scale. Some releases are research-only and are not licensed for production at all.

Two details catch people out. The license attaches to derivatives, so a model you fine-tune inherits the terms of what you fine-tuned. And the license on a quantized or re-uploaded copy is whatever the original publisher granted, regardless of what the re-uploader wrote in the repository description. Check the source, once, before the model is embedded in a product.

Keeping the shortlist alive

The list rots. New releases arrive constantly, and the honest way to handle that is to treat the shortlist as a maintained document: what you tested, on which hardware, at which quantization, on which version of the evaluation, and when. When something new appears, run the evaluation rather than reading the announcement โ€” it takes less time than the argument you would otherwise have with yourself. Retire entries that no longer have a job. A shortlist of four models with dates beside them is worth more than a folder of forty downloads and a vague memory of which one felt good.

Common questions

What is the best local model right now?

It depends on your card, your task and your quality bar, which is why the course opens with picks arranged by capacity tier and by job rather than with one name. Those picks have a shelf life measured in months, so the rest of the material is about redoing the choice yourself: fix the hardware, the task and the quality bar, run twenty of your own prompts through the shortlist, and one candidate usually separates itself within an afternoon. Any page confidently naming a single permanent winner is either guessing about your situation or is already out of date.

Is a bigger model at low precision better than a smaller model at high precision?

Usually yes, but only while the bigger model still fits entirely in accelerator memory. Once it spills into system RAM the comparison inverts sharply, because generation speed collapses to the slower memory tier. The other qualifier is task shape: heavily quantized models degrade earlier on structured output such as JSON and code than on conversational prose.

How much context do I actually need?

Almost always less than you think, and configuring more is not free. Long context consumes memory the moment you set it, and published work from Stanford and from NVIDIA both indicate that models use the middle of a long window less reliably than the ends. Retrieving the relevant few thousand tokens generally beats supplying everything and hoping attention finds the right part.

Can I trust benchmark numbers published by the model maker?

Treat them as an upper bound obtained under favorable conditions rather than as a lie. The vendor selects the prompts, the scaffolding, the sampling settings and the comparison points, so two vendors reporting on the same benchmark have run two different experiments. They are useful for shortlisting and unreliable for choosing between close candidates.

How many prompts does a useful private evaluation need?

Around twenty is enough to be decisive for most single-purpose applications, provided they are real inputs and include the cases that have already failed. The number matters less than three practices: checkable pass or fail criteria instead of scores, blind and shuffled comparison, and more than one generation per prompt so you are not reading noise.

Do model licenses matter if this is just for personal use?

For private experimentation the practical risk is low, but the habit of checking is worth forming before something you built becomes something you distribute. The traps are that license terms carry over to any model you fine-tune, and that a re-uploaded or quantized copy is bound by the original publisher grant no matter what the mirror says.

Related reading

Full syllabus

1

Pick by Hardware: What to Run at 8, 12, 16 and 24GB+

Free preview
Read free โ†’
2

Pick by Job: Coding, Writing, Vision, Embeddings, Tool-Calling

3

The Three Numbers That Decide Everything

4

Quant Formats Decoded: GGUF, AWQ, GPTQ, MLX

5

When a 7B Beats a 70B: Task Fit Over Size

6

Context Window Claims vs Real Usable Context

7

Sampling Settings: The Free Quality Upgrade Everyone Skips

8

Measuring Speed Honestly: tok/s and Time to First Token

9

How to Read a Leaderboard Without Being Fooled

10

Contamination, Cherry-Picking, and Vendor Benchmarks

11

Build Your Own Eval: 20 Prompts From Your Real Work

12

Licences Before You Ship

13

Keeping a Live Shortlist as Models Churn

14

Capstone: Your Personal Model Bench

Unlock all 14 chapters

Plus 24 other courses โ€” 547 more chapters included.

Compare all plans

Free Tools & Calculators