Kern Hugging Face

Kern TS module v0.13 4B parameters built for 16 GB Macs

A small code model that runs your compiler and tests before it answers.

Kern edits TypeScript on your laptop. Each edit is applied to a copy of your project and checked by the project's own tsc, ESLint and test suite. A failed check sends the diagnostics back for one more try. If that fails too, the edit is rolled back and you see why.

Trunk
2.8 GB on disk, Qwen3.5-4B in 4 bits
Expert
65 MB per stack, swapped at run time
Speed
~26 tokens/s on a fanless MacBook Air
Network
none needed after download
umami / src/lib/schema.ts real log

requestsrc/lib/schema.ts

"Apply z.string().trim().min(1) to the value fields of goalReportSchema, funnelReportSchema and attributionReportSchema. Keep everything else."

instruction given in Polish, shortened here

baselinebuild pass · lint pass · 0 diagnostics

plan4 steps, one declaration each · whole file in view

step 1goalReportSchema99 tok · 19.2 s

build pass · lint passaccepted

step 2funnelReportSchema216 tok · 20.5 s

build pass · lint passaccepted

step 3attributionReportSchema129 tok · 19.5 s

build pass · lint passaccepted

step 4reportTypeSchema424 tok · 33.9 s

same as the working copyno change

finalbuild pass · lint pass · repo tests 41/41 · hidden tests 5/5

done3 declarations, +3 -3 lines, 4 requests, 125.7 s end to end

Replay of a recorded run: Kern 4B, TS module v0.13, on an M4 MacBook Air, 28 October 2026. The code is Umami, an open-source Next.js analytics app. The hidden tests were written separately and ran after the chain finished.

01 / Why

Cloud models see your code. Local models guess.

Teams with client contracts, regulated data or simply a lot of private code can't send it to a vendor's servers. The models that run on their laptops are private and free, but nothing checks what they write: code that doesn't compile comes back as confidently as code that does.

Kern sits in the empty corner. It runs on the laptop, and the project's own toolchain checks every edit before a developer sees it.

02 / The short version

2.7×

more edits right on the first try than the same 4B model without Kern: 196 of 450 against 72, on code from 14 open-source TypeScript repositories, graded by hidden tests. A bare model twice its size gets 175.

The proof, task by task

03 / Results

Numbers from exams the model never trained on.

A task passes only when the edit applies, compiles under strict TypeScript, passes ESLint and passes tests the model never saw. Exams never enter training, and training data is screened for overlap with them. Results that surprised us in the wrong direction stay on this page.

Fig. 1 · Dev exam TS v0.1

450 edits, one square per task.

Kern 4B 196 of 450 passed (43.6%) TS module v0.13, first answer

Share of the 450 dev exam edits that pass the hidden tests, first answer
Qwen3.5-4B the trunk, no Kern
16.0%
Qwen3.5-9B 2× the size
38.9%
Kern 4B + one repair turn: 45.8%
43.6%
Qwen3.8-27B 6× the size; + repair: 67.8%
56.4%
First answer, temperature 0, thinking off, bf16 weights on a GPU, harness TS 0.2.7. The 4-bit laptop build of the earlier v0.6 module scored about 4 points lower than its bf16 run. Squares are grouped by category and keep their position across models, so you can see which tasks each one solves. Kern 4B is TS module v0.13, seed 0 (seed 1 scores 43.1%; seeds of one recipe differ by 2 to 2.5 points). The code comes from 14 repositories kept out of training, among them rxjs, date-fns, react-router, vue core and marked; a third of the instructions are in Polish.
80%

of compile fixes right on the first answer (36 of 45). The trunk alone: 47%.

27/70

refactors that move code to a new module. Qwen3.8-27B, six times larger: 6 of 70.

43.6%

against 38.9% for a bare model twice its size, a gap still inside the noise (95% interval −0.7 to +10.1 points). A 27B model is ahead at 56.4%.

Fig. 2 · Pilot on production code

306 tasks on two real codebases, measured on a MacBook.

Moxxy, our desktop agent, and Umami, an open-source analytics app. The tasks were written blind with hidden tests. Each configuration ran end to end on an M4 MacBook Air: answer, checks, one repair turn. The decision rule was written down before the run.

Pilot, 306 tasks: share of tasks with a correct, accepted edit within 15 seconds and at any time
ConfigurationWithin 15 s / any time
Kern 4B module v0.6
29.8 / 49.8%
Kern 9B module, slower
20.2 / 56.5%
Qwen3.5-4B + worked examples in the prompt
21.6 / 36.3%
Qwen3.5-9B + worked examples
17.0 / 51.6%
Qwen3.5-4B bare
11.4 / 14.7%
Qwen3.5-9B bare
8.5 / 29.7%
Liquid LFM2.5-2.6B
2.8 / 11.8%
Liquid LFM2.5-8B-A1B
0.4 / 3.4%
Within 15 s counts the checks too, end to end. The 4B module adds 8.3 points within 15 s over the best setup without it (95% interval +4.4 to +12.6), which passes the rule we registered. The 9B module is right more often but too slow for that window. Three seeds per module, 10 days of runs. This experiment used module v0.6; the current v0.13 has not been through it yet.
Fig. 3 · Real GitHub issues

Real issues are still hard for a single local edit.

Resolved issues on two public benchmarks, one answer per issue
Model SWE-bench Multilingual JS and TS SWE-PolyBench Verified TS
Kern 4B v0.134 / 436 / 97
Qwen3.5-4B1 / 431 / 97
Kern 9B v0.125 / 436 / 98
Qwen3.5-9B2 / 434 / 98
Qwen3.8-27B3 / 4311 / 99
One answer per issue, no repair turn, the files of the merged fix shown to the model, the projects' own test suites run natively. Agents that search the repository over many turns solve far more of these. This is the gap we are working on.
Fig. 4 · On the laptop

Measured on a fanless MacBook Air.

Resident memory
4.3 GB
Decoding
~26 tok/s
First token, warm project
0.6 s
Short diagnostic fix
3 to 6 s
Typical answer
~10 s
Context window
16k tokens
Switching experts
LoRA at run time
llama.cpp with multi-token prediction, 4-bit trunk, 16-bit adapter, public module v0.6, M4 with 24 GB. Peak memory of the whole product during the pilot, checks included: 7.4 GiB. We have not yet run it on a 16 GB machine.

Every table, interval and method note

04 / How it works

One trunk, small experts, and a validator with the last word.

We call this a validated expert language model, VELM for short: a specialized model paired with tools that can check its answers. For code those tools already exist in every project.

Trunk

Qwen3.5-4B, 4-bit, 2.8 GB

One general model, loaded once. Chosen by measurement, so a better open model is a drop-in upgrade.

Experts

  • TS editv0.13
  • Explainv0.1
  • React frontendv1.1
  • Go or Javanext

LoRA adapters of 65 MB, one per stack, trained on data the validator admitted.

Validator

your tsc · ESLint · Prettier · repo tests

It admits training data, grades the exams and checks every edit at run time.

  1. 1

    Context

    The files the request names, their imports and the current diagnostics. Nothing else goes into the prompt.

  2. 2

    Answer, or ask

    The model replaces whole declarations in a format the runtime can apply, asks one question when a fact is missing, or declines.

  3. 3

    Transaction

    The edit goes onto a copy of the repository. Type check, lint and the project's tests run there, not in your working tree.

  4. 4

    Verdict

    Pass: the change is written. Fail: one repair turn with the diagnostics. Fail again: rolled back, with the reason.

Bigger changes run as a chain of these steps, one declaration at a time, each one checked before the next. The run at the top of this page is a chain of four.

05 / Today

What Kern does now, and what it doesn't.

Fix compile and lint errors

Reads the diagnostics, rewrites the smallest declaration that fixes them.

80% of compile fixes, first answer

Change a function, fix a failing test

Keeps the rest of the file, the tests and the config untouched.

44% of function edits, 37% of test fixes

Edit several declarations

A chain of checked steps across a file, with the whole file in view.

3 declarations, repo tests 41 of 41

Explain code from the files, and say when something isn't there

QWhich function in src/lib/date.ts sends the usage report to the billing API?

ANone of the exported functions in this file send a report to a billing API. generateTimeSeries builds a formatted time series and a lookup from supplied data, but it returns the generated records without an API call. …

explain expert v0.1 · Umami · 4.7 s · names checked against the code

Ask or decline

Asked to rewrite a date helper with a different library, it declined in 4.2 s. Asked about a billing module the project doesn't have, it asked which file.

clarify · refuse

Not yet

  • Writing features from scratch
  • Planning work across many files
  • Projects larger than a 16k-token view
  • Languages other than TypeScript and JavaScript

06 / What we hold to

Six rules the product is built around.

  1. Run where the code is.

    A 16 GB laptop is the floor. No per-token bill, and nothing has to leave the machine.

  2. Say which checks passed.

    We never call an edit correct. We say it passed tsc, ESLint and these tests, on this snapshot.

  3. Small edits, chained.

    One declaration per step, each checked before the next. Small steps are cheap to verify and to undo.

  4. Unsure means ask.

    A question or a refusal costs the developer seconds. A confident wrong edit costs much more.

  5. The trunk is a part.

    Picked by measurement and replaceable. Experts retrain on a new trunk in hours, and the exams carry over.

  6. Rules before results.

    Each experiment has a written decision rule before it runs. An undecided result is published as undecided.

07 / Roadmap

Where this goes next.

Dates are targets. Each milestone ships only if it passes its own pre-written rule.

  1. Oct 2026 · done

    Three experts on one trunk

    • TS module v0.13, explain expert, React frontend module
    • Pilot verdict: +8.3 points within 15 s from the expert
    • First public weights on Hugging Face
    • First SWE-bench slices measured
  2. Nov 2026 to Jan 2027 · now

    Pilots on real work

    • Two developers, at least 100 real requests
    • Kern against the IDE quick fix and the bare model, timed to a correct result
    • Design partners under the same protocol
  3. Feb to Apr 2027

    A frozen release

    • TypeScript sharpened, frontend, and Go or Java
    • Ships only if it is at most 3 points behind the last release on the final panel
    • First custom expert trained on a partner's own code
  4. Later in 2027

    Kern v1 for teams

    • Inside Moxxy on 16 GB laptops
    • Larger trunks for 32 and 64 GB machines
    • An API for other editors, agents and CI
    • On-premises installs behind the firewall

What we are trying to prove

Targets, labeled as targets. Each one has a measurement attached.

15%

less active developer time in the pilots, against the IDE quick fix, with no more errors left at the end.

99%

lower bound on precision before any edit is applied without review. Today: 67 to 77%.

1 per stack

an expert for each stack a team uses, on the laptop they already own, from one shared trunk.

08 / Try it

Run the public module on your Mac.

The TypeScript module v0.6 and its 4-bit trunk are public on Hugging Face, with a script that sends a task in the exact prompt format the model was trained on. About 4 GB of free memory is enough. Newer modules are in private pilots.

zsh
# llama.cpp from October 2026 or newer
brew install llama.cpp
hf download MoxxyLabsAI/kern-ts-lora --local-dir kern-ts-lora
cd kern-ts-lora
llama-server -m qwen35-4b-base-Q4_K_M.gguf \
  --lora kern-ts-v0.6-repair-s0-lora-f16.gguf \
  -c 16384 --jinja --port 18001

# in a second terminal
python3 kern_try.py example/ex-ts-0001-parse-range

09 / FAQ

Questions we get.

Is Kern a chat assistant?

No. One request gets one structured answer: an edit, a question, a refusal or an explanation. It doesn't call tools or plan a feature. The runtime around it applies the edit and runs the checks.

Does my code leave my machine?

No. The model, the checks and the repository all stay on the laptop. After the download, the public release runs with no network access.

What does "checked" mean exactly?

The edit was applied to a copy of your repository, the TypeScript compiler reported no new errors, ESLint passed, and the repository's tests passed. We always say which of those ran. A check can only catch what it covers.

Can a checked edit still be wrong?

Yes. On our pilot, 67% of edits accepted on build and lint also pass hidden tests, and 77% with the repository's tests in the loop. That is why every edit is reviewed today, and why we publish this number.

What hardware do I need?

A Mac with Apple silicon and 16 GB of memory is our floor. The server with the 4B trunk uses about 4.3 GB. It also runs anywhere llama.cpp does.

How is this different from a model in Ollama?

Ollama and LM Studio run a model. Kern is a trained expert plus the runtime that checks its edits with your toolchain. On our exam the same 4B model gets 16% of edits right without Kern and 43.6% with it.

Which model is it built on?

Qwen3.5-4B, quantized to 4 bits, with LoRA adapters on top. We picked it by measuring several trunks on the same exams, and we will switch when a better open model wins.

Is it open?

The TypeScript module v0.6 and its trunk are public on Hugging Face. The exams, the training data and newer modules are private for now, so the exams stay unseen.

When can my team use it?

Pilots with design partners start in November 2026. If your team works in TypeScript and can't send code to the cloud, write to us.

10 / Contact

Bring a codebase and the checks you trust.

We are looking for two or three software teams and one regulated organization for a four-week pilot under a written protocol. We also like comparing notes with people who train small models.

Built by MoxxyLabs

Michal Makowski

Co-founder, ML. Creator of Moxxy. Built the Kern proof of concept end to end.

github.com/WebEferen

Kamil Imiolek

Co-founder, platform. Built the Moxxy desktop app, computer use and browser automation.

github.com/kamail12

Kern ships first inside Moxxy, our open-source CLI and desktop agent.