Lewi Surge Preview

An open mixture-of-experts language model for programming, trained from scratch by one person on free and donated compute. The current model is Lewi Surge Preview.

Parameters
3.45B total
Active per token
~0.5B
Experts
128, top-6 + 1 shared
Context in training
128k tokens

Results

Measured on the base model before and after code-focused annealing. No fine-tuning tricks, no cherry-picked prompts: greedy decoding, standard prompts, local runs.

BenchmarkMetricBeforeAfter annealing
HumanEvalpass@118.9%25.0%
MBPP (sanitized)pass@123.7%29.6%
HellaSwagacc_norm41.9%43.4%
ARC-Challengeacc_norm26.5%27.4%

Knowledge-heavy benchmarks (ARC) barely move at this size; that is what the next stages and the larger model are for.

Architecture

Sixteen layers in four identical blocks. Three layers of Gated DeltaNet linear attention keep a fixed-size memory; every fourth layer is full attention. Each layer routes tokens to 6 of 128 small experts plus one shared expert.

  • Gated DeltaNet (linear attention)
  • Full attention
  • Experts used by one token

Why long context is cheap here

Only four of sixteen layers keep a key-value cache, with two KV heads each. That is about 4 KB per token: a 128k-token context fits in roughly half a gigabyte, so long documents and whole repositories run on consumer hardware.

Training log

  1. Stage 1A 1.4B model trained from scratch on English, code, math and Ukrainian.
  2. GrowthGrown to 3.45B: twice the experts, one more block of layers, without restarting.
  3. Code-first pretraining1.6B tokens of curated code, instructions and textbooks on an H200.
  4. Annealing1.4B tokens, more than half of them conversations, with the learning rate decayed to zero.
  5. Fine-tuningChat behaviour on 16k-token conversations.
  6. NowContext extension to 128k and a second fine-tuning pass, on TPU v5e.

What comes next

Open by default

The training code is already public on GitHub. The weights will follow on Hugging Face under an open license, with evaluation scripts. Ukrainian is one of Lewi's first-class languages.