How-to

How to write unit tests with a local AI model

Last updated 2026-09-02 · Outlier v1.11.821

Quick answer

Use the Lite or Core tier for focused unit-test scaffolding without sending the function under test to a cloud API. The whole sequence below stays on the Mac.

What you need first for “how to write unit tests with a local ai model”

Apple Silicon Mac, macOS 12 or later, the unified-memory minimum that the chosen tier requires (6 GB for Nano, 12 GB for Lite, 16 GB for Quick, 24 GB for Core and Vision 3.8, 64 GB for Plus). Internet is required only for the one-time model download.

Steps

  1. Open the function under test. Drag the file onto the chat window or use the project chip.
  2. Ask for one focused test at a time. Local tier quality holds well for one test; quality on long batches drops.
  3. Iterate inline. Run the suggested test in your terminal; paste failures back.
  4. Pin the tier to Lite or Core. Quick is faster but its HumanEval pass@1 is much lower; not the right choice for code-shaped tasks.

What is the specific thing to know about this guide?

For test scaffolding the Lite tier is usually the right speed-quality balance on a 16 GB Mac, with Core reserved for trickier or long-context work.

Ask for one test at a time and the local tiers hold up well; ask for a whole suite in one turn and quality falls off sharply as the response lengthens. The practical loop is narrow: name the function, name the single behaviour you want covered, run what comes back, and paste the failure in unedited. Failures are the most useful thing you can give a smaller model, because they replace guesswork about your codebase with the actual error text. Keep the function under test in view — a test written against a signature the model inferred rather than read is the common way this goes wrong.

What can go wrong with this guide?

How does this guide differ from the cloud equivalent?

Hosted test-writing tools log your function-under-test alongside the prompt. Outlier’s local path leaves no log on a third-party server.

For test scaffolding the Lite tier is usually the right speed-quality balance on a 16 GB Mac, with Core reserved for trickier or long-context work.

Ask for one test at a time and the local tiers hold up well; ask for a whole suite in one turn and quality falls off sharply as the response lengthens. The practical loop is narrow: name the function, name the single behaviour you want covered, run what comes back, and paste the failure in unedited. Failures are the most useful thing you can give a smaller model, because they replace guesswork about your codebase with the actual error text. Keep the function under test in view — a test written against a signature the model inferred rather than read is the common way this goes wrong.

What does this guide not claim about “how to write unit tests with a local ai model”?

For test scaffolding the Lite tier is usually the right speed-quality balance on a 16 GB Mac, with Core reserved for trickier or long-context work.

Ask for one test at a time and the local tiers hold up well; ask for a whole suite in one turn and quality falls off sharply as the response lengthens. The practical loop is narrow: name the function, name the single behaviour you want covered, run what comes back, and paste the failure in unedited. Failures are the most useful thing you can give a smaller model, because they replace guesswork about your codebase with the actual error text. Keep the function under test in view — a test written against a signature the model inferred rather than read is the common way this goes wrong.

This guide does not claim feature parity with cloud-side workflows for “how to write unit tests with a local ai model”. Specifically, the product surface in v1.11.469 covers chat, file attachment, the local agent loop, project scoping, and the model picker. Cross-device sync, team workspaces, and shared session history are out of scope and are not on the v1.9 backlog either.

What is the right tier for test writing?

Lite at 5 GB, 12 GB RAM minimum, 53.4 tok/s on M1 Ultra reference. That is the baseline. If the function under test is short and the test framework is well-known (pytest, vitest, jest), Lite handles it. For tricky fixtures or property-based testing, Core (24 GB RAM) is the upgrade.

Where does this guide fit in the rest of the lineup?

Lite is good enough for most pytest scaffolds; Core is the upgrade for tricky fixtures or property-based tests. Quick is not the right tier for any test work despite its fast tok/s.

One unique number

4 steps, zero network requests after the model is downloaded. Recommended pattern: one test per turn, paste the failure into the next turn, iterate until green.

Download Outlier for Mac

Requires Apple Silicon (M1, M2, M3, or M4) — Intel Macs are not supported. macOS 12+.

New models worth running

Open weights ship constantly and most are not worth your disk. When one beats a tier Outlier already has, on hardware you already own, we say so and what it replaces. That is the only reason we email.

Your address and which site you sent it from. No IP, no user agent, no referer. Nothing is sent until you press the button. Privacy.

Outlier runs entirely on your Mac. No prompts leave the device. macOS 12+ on Apple Silicon (arm64). Apache 2.0 model weights. Back to home.