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.38B
Experts
128, top-6 + 1 shared
Context in training
128k tokens

Releases

Every published checkpoint, newest first. Each one lists how it was trained and what it scores, measured the same way we report everything else.

  1. Latest

    Lewi Surge Preview 3B

    PoliteChainsaw/Lewi-Surge-Preview-3B

    Open on Hugging Face
    Released
    October 16, 2026
    Type
    Chat
    Parameters
    3.45B
    Active
    ~0.38B
    Context
    up to 128k (PoSE)

    TrainingMid-training on 0.5B tokens, then full chat fine-tuning on 0.52B tokens, fp32 on TPU v6e. Thinking mode off.

    • HumanEval (chat-tuned)29.3%
    • MBPP19.0%
    • HellaSwag42.7%
    • ARC-Easy54.2%
  2. Lewi Surge Preview 3B Chat-Early

    PoliteChainsaw/Lewi-Surge-Preview-3B-Chat-Early

    Open on Hugging Face
    Released
    October 13, 2026
    Type
    Chat (early)
    Parameters
    3.45B
    Active
    ~0.38B
    Context
    16k

    TrainingLess than a quarter of the planned chat fine-tuning; stopped when the compute ran out.

  3. Lewi Surge Preview 3B Base

    PoliteChainsaw/Lewi-Surge-Preview-3B-Base

    Open on Hugging Face
    Released
    October 13, 2026
    Type
    Base
    Parameters
    3.45B
    Active
    ~0.38B
    Context
    16k

    TrainingPretrained from scratch on 7.3B tokens, grown from 1.4B, then code-focused annealing.

    • HumanEval25.0%
    • MBPP29.6%
    • HellaSwag43.4%
    • ARC-C27.4%

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.

Against small open base models

Same script for every model: base checkpoints, 0-shot, greedy, HumanEval with the better of two standard prompt formats. Lewi is a work in progress; the others are final releases trained on 40 to 3,200 times more data.

ModelTraining tokensHumanEvalMBPP
Qwen2.5-0.5BAlibaba18T29.9%37.7%
Qwen2.5-Coder-0.5BAlibaba23.5T27.4%48.2%
Lewi Surge Preview BasePolite Chainsaw7.3B25.0%29.6%
SmolLM2-1.7BHugging Face11T23.2%44.0%
Granite 3.0 1B-A400MIBM10T22.6%36.2%
Pythia-1.4BEleutherAI300B5.5%7.0%

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 (the Chat-Early checkpoint).
  6. Long contextContext extended to 128k on long documents, with the sequence split across TPU chips.
  7. Mid-training and SFT0.5B tokens of reasoning, math and code, then 0.52B tokens of chat fine-tuning, in fp32 on Google Cloud TPU v6e.
  8. NowLewi Surge Preview 3B is released. The next model is being built on memarch, our own architecture.

What comes next

Open by default

Every Lewi release is on Hugging Face under Apache-2.0, with its limitations written down. The training code is on GitHub. Ukrainian is one of Lewi's first-class languages.