DWS Research

DWSLM is a 1B-parameter language model we're building from scratch, to be trained on a single GPU.

The corpus, tokenizer, model code and training loop are all ours, and no pretrained weights are involved. The goal is decent scores on standard benchmarks, along with a written record of what it took to get there.

1B params · 23.2B tokens · 17 languages + code · 32,768-token vocab

parameters, target
1B
training tokens
23.2B
documents
15.7M
GPUs
1

00 data03 pretrain: now06 release

Fig. 1 Status as of 2026-11-13.

01Seven phases, three done.

00 data18 open sources, deduped, labeleddone 01 tokenizerDWSLMTok32.3done 02 modelarchitecture, training loop, proxy runsdone
03 pretrain256M done, 1B next, each over the 23.2B-token corpusnow
04 mid-trainanneal on the best data, stretch the contextlater
05 post-traininstruction tuning, then preference tuninglater
06 release256M base weights are out; benchmarks and write-up nextnow
256MDWSLM-256M released: base weights on Hugging Face, chat demo, model cardreleased

Each phase produces a file that the next one consumes, so an error in one carries into everything after it. That's why the data and the tokenizer have exact counts and parity tests behind them (sections 02 and 03).

Evaluation won't wait for phase 06. The benchmarks start running with the first proxy model.

00 data → dwslm_corpus.parquet · 38 GB 01 tokenizer → tokenizer.json · 23.2B-token shards 02 model → model code · loop · proxy results 03 pretraining → base checkpoint we are here 04 mid-training → annealed base, longer context 05 post-training → instruct model 06 release → weights · benchmarks · write-up
Fig. 2 The pipeline, and what each phase produces.

0215.7 million documents, all openly licensed. done

Eighteen sources: FineWeb-Edu and FineWeb-2 for the web, Wikipedia in 16 languages, The Stack v3 for permissively licensed code, public-domain books in ten languages, peS2o papers, SEC filings, old US newspapers and OpenWebMath.

Every document keeps its source, language and license. MinHash deduplication removed 181,089 near-duplicates, and an OCR quality gate removed 2,129 pages of scanner noise.

Half the tokens are in the 16 languages other than English, and a quarter are code (Fig. 3).

documents
15,710,438
size
38 GB, one parquet file
tokens
23,207,662,201, counted exactly
licenses
ODC-By, CC BY-SA, CC0, public domain, permissive code
web 8.53B code 5.95B books 4.79B encyclopedia 2.27B science 0.72B government 0.39B news 0.37B math 0.19B by language English 5.85B · 25% code 5.95B · 26% 16 other languages 11.41B · 49%
Fig. 3 Training tokens by data type, then by language. Every document encoded with DWSLMTok32.3.

03A tokenizer built for this corpus. done

DWSLMTok32.3 is a byte-level BPE (byte-pair encoding) tokenizer with 32,768 tokens, built on GPT-4o's pretokenizer and trained on the corpus above. It changes three things from the standard recipe. Common Chinese characters get their own tokens, merges are spread across languages instead of going mostly to English, and digit runs split from the right so the groups line up with thousands.

Compared with plain BPE on the same corpus, each token carries 27% more Chinese text and 19% more Japanese. English and code each give up about 2.5%.

How it works, and a live demo →

English · 41 bytes, 14 tokens

The quick brown fox counts 1234567 sheep.

Code · 62 bytes, 26 tokens

def fib(n):↵ return n if n < 2 else fib(n - 1) + fib(n - 2)

Hindi · 188 bytes, 27 tokens

अनुसंधान वह है जो मैं तब करता हूँ जब मुझे नहीं पता कि मैं क्या कर रहा हूँ।

Fig. 4 Real DWSLMTok32.3 output, one tint per token.

04Now: training the 256M. now

Before the 1B run, we're training a 256M-parameter model on the same corpus, plus 289M rephrased tokens. That's one pass at about 90 tokens per parameter, a couple of days on one GPU, and its results decide what the 1B looks like.

The 256M is free to try layers from the past year's papers. The 1B has to run in llama.cpp and MLX, so it will reuse an architecture those runtimes already support, most likely Qwen3.8's. Small proxy runs came first. They settled the learning rate, the local layers, the init scale and the long-context recipe. The main run started on 11 November.

The 256M plan, and the papers behind it →

Day 0: what every kernel costs →

The main run, live →

Everything before it, with results →

params
256M first, 1B after
tokens
23.2B, one epoch each
ratio
90 / param at 256M, 23 at 1B
compute
≈ 3.6 × 10¹⁹, then 1.4 × 10²⁰ FLOPs
hardware
1 GPU
wall clock
≈ 2 days, then to be set from the 256M
Fig. 5 The budget for both models. Compute and wall clock are estimates.

05What "decent" means.

Evaluation will use the standard suite (HellaSwag, ARC, PIQA, WinoGrande and MMLU) plus code and multilingual benchmarks, since a quarter of the corpus is code and half is in languages other than English.

The comparison is with open models around 1B parameters, and most of them trained on far more data. TinyLlama used 3 trillion tokens for 1.1B parameters, about 130 times our budget, and Llama 3.2 1B used up to 9 trillion (Fig. 6).

For DWSLM, decent means scoring close to models that saw a hundred times more data, not beating them.

1 10 100 1,000 10,000 Chinchilla-optimal 20 DWSLM 23 TinyLlama 1.1B 2,700 Llama 3.2 1B ~7,300
Fig. 6 Training tokens per parameter, log scale. Chinchilla's compute-optimal ratio is about 20.