Research
Research
We make open language models. Here is the public research we build on, from data and pretraining to post-training, distillation, running and measuring models, including the large body of work published in Chinese, all in our own words.
Everything about how Glintwell works is on this page: the steps, what we have decided, and how to start your own. Then the public research behind it, in our own words.
Our organization model: how Glintwell works
Where we are: Just starting. Glintwell has not released a model yet; this site holds the public research we build on.
Glintwell makes open language models from scratch: we gather and clean data, pretrain, post-train and distill models, and measure them honestly.
Everything we learn is published as we go: data recipes, training settings, code and evaluation configs, and the weights of every model we finish.
How it works
- DataGather public text, clean it, remove copies and private details, and mix it.
- PretrainTrain small models first to test every choice, then scale up the winners.
- Post-trainInstruction tuning, preference learning and reinforcement learning with checkable answers.
- DistillTeach small, fast models from larger ones whose terms allow it.
- MeasureHeld-out tests, published settings, and reading real outputs.
- ReleaseOpen weights, open recipes, open scores.
How to set one up
- Start tiny. Train a small model on one graphics card to learn every step.
- Use public data. Start from open, already-filtered datasets and check their terms.
- Test on small models. Fit scaling curves before any big run.
- Publish everything. Weights, recipes and scores, so others can build on them.
What we've decided
- Open weights for every model we finish.
- Open recipes: data filters, mixtures, settings and evaluation configs.
- Small models first, made strong with distillation.
- Only public data whose terms allow training, with private details removed.
- Only learn from models whose terms allow it.
- Publish every score, including the bad ones.
- All of our writing is public domain.
What comes next
- Train a series of tiny models to test our data and training pipeline end to end.
- Publish our first cleaned data recipe.
- Train and release our first small open model.
- Distill reasoning into it and publish the results.
Start your own
Nothing here is secret. Anyone can copy how Glintwell works and open their own version.
- Read this pageEverything about how Glintwell works is here and in the findings below. Our designs, specs and plans are public domain.
- Pick your name and placeChoose your own name and where you will start. You do not need to ask us, and you do not need to call it Glintwell.
- Follow the stepsRun it the way the "How it works" steps describe, then improve on it.
- Share backPublish what you learn, so the next person can start further ahead.
Research findings
These notes explain what we learned and what matters for the project. It is free to copy and share. Nothing here is medical, legal or financial advice.
Key sources
Introduced the transformer: a model built only from attention and simple feed-forward layers. It trained much faster than earlier designs and became the basis of every modern language model.
Showed that a language model's loss falls as a smooth power law as you add parameters, data and compute, so large runs can be predicted from small ones.
Found that for a fixed compute budget, model size and training tokens should grow together, at roughly 20 tokens per parameter. Many earlier models were too big for the data they saw.
A 175-billion-parameter model learned to do new tasks from a few examples written in the prompt, with no further training.
Fine-tuning on human-written answers, then optimizing against a reward model trained on people's rankings, made a much smaller model preferred over a far larger untuned one.
Showed preference learning can skip the separate reward model and reinforcement learning: train directly on pairs of better and worse answers with a simple loss.
A 671-billion-parameter expert model with 37 billion active per token, trained on 14.8 trillion tokens in 8-bit precision for about 2.8 million accelerator-hours. Introduced bias-based expert balancing without a loss penalty and multi-token prediction at scale.
Showed long step-by-step reasoning can emerge from reinforcement learning with only checkable rewards, then gave a four-stage recipe for readable reasoning and distilled it into small dense models from 1.5 to 70 billion parameters.
Built a large math corpus from web pages and introduced group relative policy optimization: reinforcement learning that scores each answer against the average of a group, with no value model.
The founding distillation paper: a small model learns from a large one's softened probabilities, which carry far more information than single correct labels.
A family of dense and expert models trained on about 36 trillion tokens in 119 languages, with thinking and non-thinking modes in one model and a thinking budget. Small models were trained by distilling from the largest.
A 1-trillion-parameter expert model with 32 billion active, trained on 15.5 trillion tokens with a matrix-orthogonalizing optimizer and a clipping fix that avoided any loss spike; post-trained with large-scale synthetic tool use.
Data for pretraining
A 15-trillion-token English web dataset built from 96 crawl snapshots, with every filtering step tested by training small models. An educational-quality classifier subset gave large gains on knowledge and reasoning tests.
A controlled test bed for comparing data recipes at fixed compute. A simple model-based quality filter beat elaborate rule pipelines, and the resulting 7-billion-parameter model matched far more expensive ones.
Showed that carefully filtered and deduplicated web text alone can train models as good as those trained on hand-curated mixes.
A fully documented 3-trillion-token open corpus with its tools, released so others can study and rebuild every step of data preparation.
An early open 800 GB mix of 22 diverse sources, showing that variety beyond web text improves general knowledge.
Built a cleaned web corpus with simple rules and ran a broad, systematic study of pretraining choices.
Removing exact and near-duplicate text cut memorized output by about ten times and made training more efficient with no loss in quality.
Uses a small proxy model to choose how much of each data domain to include, speeding up training of a much larger model.
A small code model trained on filtered "textbook quality" web data plus synthetic exercises beat much larger models, showing data quality can stand in for scale.
An open Chinese and English pretraining collection of more than 2 terabytes, cleaned with published filters for safety and quality.
Released a large cleaned Chinese web corpus and described a two-stage training process for a bilingual model, including checks for test-set leakage.
A tool chain and dataset for extracting high-quality Chinese web text, scoring every document with rules and a quality model.
A 500 GB high-quality Chinese corpus built with a two-stage hybrid filter, where a small classifier learned from a large model's quality judgments.
A bilingual 7-billion-parameter model released with all of its pretraining data, cleaning pipeline, checkpoints and training code.
Explains how test questions leak into training data and the methods used to detect it.
Tokenizers
Introduced byte-pair encoding for language: split words into frequent pieces so any word can be represented with a fixed vocabulary.
A tokenizer that works directly on raw text in any language, with no need for spaces between words, which matters for Chinese and Japanese.
Describes a bilingual model family with a byte-level vocabulary of about 150,000 tokens tuned to encode Chinese, English and code efficiently, and splitting numbers into single digits.
Model architecture
Encodes position by rotating query and key vectors, so attention depends naturally on the distance between tokens. Now used in nearly every language model.
The original Chinese blog post deriving rotary position embeddings from first principles, before the paper.
Gated feed-forward layers such as SwiGLU give better quality than the original design for the same compute.
A simpler, faster normalization that rescales by the root mean square only and works as well as the original.
Several query heads share one key and value head, cutting inference memory with little quality loss; existing models can be converted cheaply.
Multi-query attention: all heads share one key and value, making text generation much faster.
Introduced multi-head latent attention, which compresses keys and values into a small latent vector and cut the inference cache by more than 90 percent, together with a fine-grained expert design.
A trainable sparse attention that combines compressed summaries, selected blocks and a local window, matching full attention while running much faster on long texts.
Added a fine-grained sparse attention that picks the most relevant earlier tokens with a light indexer, cutting long-context cost, plus scaled-up reinforcement learning and agent training.
Training to predict several future tokens at once improved code models and allowed faster generation.
Rescales rotary position frequencies so a model trained on short texts can be extended to much longer contexts with little extra training.
A hybrid model where most layers use linear attention and every eighth uses full attention, reaching contexts of millions of tokens.
Mixture of experts
Routing each token to a single expert made trillion-parameter models practical and showed simple routing works.
Scaled expert models to 600 billion parameters with automatic sharding across thousands of chips.
Split experts into many small ones and added always-on shared experts, so each expert specializes more and knowledge is less duplicated.
An open model with 8 experts per layer, 2 chosen per token, matching much larger dense models at a fraction of the active compute.
Balances experts by adjusting a per-expert bias on routing scores instead of adding a loss penalty, improving both balance and quality.
An open expert model of 389 billion parameters with 52 billion active, with published findings on expert learning rates and large synthetic data.
Optimizers and training recipes
The adaptive optimizer that keeps running averages of gradients and their squares to set a step size for each weight.
Separating weight decay from the adaptive update fixed a flaw in Adam and became the standard for training language models.
With weight decay and per-matrix scaling, an orthogonalizing optimizer trained large models with about twice the compute efficiency of AdamW.
Scaling rules for initialization and learning rates let the best settings found on a small model transfer directly to a large one.
Introduced the warmup-stable-decay learning rate schedule and used it to study data and model scaling cheaply with small models.
Fit scaling laws for batch size and learning rate, and found the best model-to-data ratio depends on data quality.
Training in 16-bit with a 32-bit master copy of weights and loss scaling halves memory with no loss in accuracy.
Defined two 8-bit floating point formats and showed they can train large models to the same quality as 16-bit.
Reproduced large-run instabilities in small models and showed fixes such as normalizing queries and keys and a small output penalty.
A fully open model family with a detailed account of stability fixes and a late-training stage on high-quality data that brought big gains.
Released a model with every piece needed to reproduce it: data, training code, logs and hundreds of checkpoints.
An open bilingual model trained on 2.6 trillion tokens, with published methods for normalizing the output layer and limiting large output values for stability.
Describes data preparation, long-context training up to 200,000 tokens and a conditional reward model for alignment, with intermediate checkpoints released.
Attributes most of its quality to a heavily filtered 3.1-trillion-token bilingual corpus and a small, hand-polished fine-tuning set.
Scaled pretraining data from 7 to 18 trillion tokens and used over a million fine-tuning examples plus multi-stage reinforcement learning.
An open family from 0.5 to 72 billion parameters, covering about 30 languages, with grouped-query attention throughout.
Traces a bilingual model family from a 130-billion-parameter model to later versions, including alignment and tool-use methods.
A 355-billion-parameter expert model with 32 billion active, trained with a mid-training stage for code and reasoning and expert-iteration reinforcement learning for agent tasks.
Describes a next-generation open model focused on long, multi-step software engineering tasks.
An open reasoning model of 456 billion parameters with hybrid linear attention and a million-token context, trained with a clipped importance-sampling reinforcement learning method that keeps rare tokens learning.
Scaled reinforcement learning with long context and showed "long-to-short" methods that transfer long reasoning ability into concise answers.
A reasoning expert model with 20 billion active parameters, describing its reinforcement learning infrastructure and data for checkable and open-ended tasks.
A detailed public account of training dense models up to 405 billion parameters on 15 trillion tokens, including data, parallelism and hardware failures at scale.
A 1.1-billion-parameter model trained on about 3 trillion tokens, showing small models keep improving far past the compute-optimal point.
Scaling to thousands of chips
Splits each layer's matrices across chips (tensor parallelism) with a few simple communication steps.
Combined tensor, pipeline and data parallelism with an interleaved pipeline schedule to train a trillion-parameter model at high efficiency.
Removes duplicated optimizer state, gradients and weights across data-parallel copies, making very large models fit.
An industrial implementation of fully sharded training, with lessons on overlapping communication and memory.
Pipeline parallelism with micro-batches, so different layers on different chips work at the same time.
Sequence parallelism and selective recomputation cut activation memory several times with little extra compute.
Gradient checkpointing: save only some intermediate results and recompute the rest during the backward pass.
Computes exact attention in tiles that fit in fast on-chip memory, making it several times faster and using far less memory.
Better work splitting brought attention close to the chip's peak speed.
Overlaps data movement and math and uses 8-bit precision on newer chips for further speedups.
Splits a very long sequence across chips arranged in a ring, passing keys and values around, so context length grows with the number of chips.
An open bidirectional pipeline schedule that overlaps computation and communication so pipeline stages are almost never idle.
An open library for the all-to-all communication that sends tokens to experts on other chips, for both training and inference.
Compact open kernels for 8-bit matrix multiplication with fine-grained scaling, for dense and expert layers.
An open kernel that makes latent-attention decoding fast for variable-length requests.
An open high-throughput file system built for training data and checkpoints across large clusters.
Instruction tuning and preference learning
Showed agents can learn complex behavior from people comparing pairs of short clips, the root of learning from human feedback.
A reward model trained on human comparisons, then reinforcement learning against it, produced summaries people preferred over human-written ones.
A stable reinforcement learning method that limits how far each update moves the policy; long the default for learning from human feedback.
Fine-tuning on more than 1,800 tasks phrased as instructions, with step-by-step examples, improved models of every size.
A model writes its own instructions and answers, which are filtered and used to fine-tune it, cutting the need for human-written data.
Only 1,000 carefully chosen examples were enough to teach a strong pretrained model a good conversational style.
A model critiques and revises its own answers against written principles, and AI feedback replaces most human labels for harmlessness.
Optimizing too hard against a learned reward model eventually makes real quality fall; the paper measures how fast.
Learns from single answers marked good or bad, without needing pairs.
Combines fine-tuning and preference learning in one step, with no reference model.
Uses the average log-probability of an answer as the reward, with a margin, removing the reference model and reducing length bias.
A fully open post-training recipe with all data and code: fine-tuning, preference learning, then reinforcement learning with verifiable rewards.
Reinforcement learning and reasoning
Asking a model to write out intermediate steps greatly improved math and logic in large models.
A model generates reasoning, keeps the chains that reach correct answers and trains on them, improving step by step.
Rewarding each step of a solution worked better than rewarding only the final answer for hard math, and released 800,000 step-level labels.
Four fixes for reasoning reinforcement learning: higher clipping for rare tokens, skipping all-right or all-wrong prompt groups, token-level loss and soft penalties for overlong answers, with full code and data.
Fine-tuning on 1,000 hard, carefully chosen problems plus forcing the model to keep thinking gave strong reasoning at very low cost.
A math model improved by self-generated data, a math reward model and reinforcement learning, with tool-assisted reasoning in Chinese and English.
Code models trained from scratch on 2 trillion tokens with repository-level data and fill-in-the-middle training.
A test of fixing real issues in real software projects, judged by whether the project's own tests pass; now also used as a training environment.
An open, flexible framework for reinforcement learning on language models, running fast generation and training on the same cluster.
An open framework for learning from human feedback and reasoning reinforcement learning at scale.
Distillation and compression
Training a student on the teacher's full generated outputs works better than matching word by word, and lets a small model run without beam search.
Distillation during pretraining made a model 40 percent smaller and 60 percent faster while keeping 97 percent of its ability.
Using reverse KL makes the student focus on the teacher's most likely outputs instead of spreading thin, giving better long answers.
Training the student on its own generated sequences, scored by the teacher, fixes the mismatch between training and use.
Pruning width and depth from a large model and then distilling recovered quality with up to 40 times fewer training tokens than training from scratch.
Structured pruning to a target shape, followed by continued pretraining with dynamic data mixing, produced strong small models cheaply.
Small models trained with distillation from a larger teacher's predictions instead of next-token targets beat same-size models trained normally.
Reviews methods where the student generates and the teacher gives token-level feedback, and when they beat plain fine-tuning or reinforcement learning.
Studies where on-policy distillation helps and where it hurts, depending on the gap between student and teacher.
Analyzes which tokens carry the teacher's advantage during on-policy distillation.
Running models efficiently
Stores the key-value cache in fixed-size pages, nearly eliminating wasted memory and raising serving throughput several times.
A small model drafts tokens and the large model checks them in parallel, with output identical to the large model alone.
Adds extra decoding heads to a model to propose several next tokens at once, speeding generation without a separate draft model.
Drafts at the level of the model's internal features rather than tokens, giving higher acceptance and bigger speedups.
Quantizes weights to 3 or 4 bits one layer at a time using second-order information, with little quality loss.
Protects the small fraction of weights that matter most, chosen by activation size, for accurate 4-bit models.
Moves the difficulty of outliers from activations into weights so both can use 8-bit math.
Found that a few outlier features break 8-bit math in large models and handled them separately in 16-bit.
Freezes the model and trains small low-rank matrices beside each layer, cutting trainable weights by thousands of times.
Fine-tunes adapters on top of a frozen 4-bit model, making it possible to tune a 65-billion-parameter model on a single chip.
Evaluation
A multiple-choice exam across 57 subjects that became the standard knowledge test.
A Chinese evaluation of nearly 14,000 multiple-choice questions across 52 subjects at four difficulty levels.
A Chinese multitask test across 67 subjects, many specific to Chinese culture, law and history.
Measures code generation by running hidden unit tests, and introduced the pass@k measure.
A set of 8,500 grade-school math word problems, and early evidence that checking answers with a trained verifier helps.
12,500 competition math problems with step-by-step solutions.
Very hard science questions written by experts, where skilled non-experts with web access still score low.
Learning resources (Chinese and English)
A Chinese open project that trains a 26-million-parameter model from scratch, covering pretraining, fine-tuning, preference learning and distillation, in about two hours on one consumer graphics card.
A free Chinese course that explains the transformer and walks through building, pretraining and fine-tuning a small model step by step.
Chinese course notes on how large language models work: data, architecture, training, adaptation and risks.
Chinese step-by-step guides for running and fine-tuning many open models on a single machine.
An open fine-tuning toolkit, documented in Chinese and English, supporting full tuning, adapters, preference learning and reinforcement learning for hundreds of models.
Open documentation for running, quantizing and fine-tuning an open model family, available in Chinese and English.
Updated December 2026.