SwaFlow-150M
Training states of SwaFlow-150M, a hyperspherical (Riemannian) flow language model with 175M parameters trained from scratch on Dolma 3 Mix. It is part of the SwaFlow suite, models trained under one recipe on the same data in the same order.
Each state is a full torchtitan checkpoint: fp32 weights, AdamW moments, learning-rate schedule, data-loader position and step counter. Training can be resumed from any of them, and the weights can be loaded on their own.
Contents
| Folder | States |
|---|---|
uniform/step-<N> |
pretraining, one α per sequence drawn from [0, 0.150]: every 40B tokens (4,768 steps) from step 4,768 (40B) to 224,096 (1.88T), then every 20B tokens (2,384 steps) from 226,480 (1.90T) to 238,400 (2.00T) |
clean-prefix-2t/step-<N> |
clean-prefix mid-training branched from uniform/step-226480 (1.90T): every 20B tokens (2,384 steps) from 228,864 (1.92T) to 238,400 (2.00T) |
Step N corresponds to N × 8,388,608 training tokens. states.csv lists every state with its token count, number of files and size. Each state holds 256 shards and a .metadata file (2.27 GB).
Loading the weights
Install the SwaFlow code, then:
from torchtitan.models.swaflow.hf import from_pretrained
model = from_pretrained("tokyotech-llm/SwaFlow-150M", subfolder="uniform/step-238400", device="cuda")
Only the given folder is downloaded, and the optimizer state is skipped.
Resuming training
hf download tokyotech-llm/SwaFlow-150M --include "uniform/step-238400/*" --local-dir hub
mkdir -p $SWAFLOW_OUTPUTS/flow_150m/checkpoint
mv hub/uniform/step-238400 $SWAFLOW_OUTPUTS/flow_150m/checkpoint/
scripts/launch/train.sh torchtitan/models/swaflow/train_configs/flow_150m.toml flow_150m
Use midtrain_150m.toml for a clean-prefix-2t state. The data build must be the one the states were trained on (production_6t, made with the data pipeline in the code); its name and checksum are checked on load.
The number of GPUs does not have to match the original run (256 data-parallel ranks, 32 nodes × 8 GPUs). The original number of ranks is read from the state, and:
- weights and AdamW moments are resharded on load, and the learning-rate schedule follows the step counter;
- gradient accumulation keeps the global batch at 4,096 sequences (4096 / (16 × GPUs) microbatches per step, so the number of GPUs must divide 256);
- the data-loader position is converted to the new number of ranks, so every step reads the same 4,096 sequences as the same step of the original run.
A resumed run is therefore not a bit-exact continuation of the original one:
- the random-number state is not included, so each sequence gets a different, identically distributed α and noise;
- on a different number of GPUs, floating-point sums over ranks and microbatches are taken in a different order, so the weights drift apart from the original run in the last bits, and the difference grows over training.
See Resuming a training state in the code for details.
Model details
| Parameters | 175M (width 768, 12 layers, 12 heads, FFN 2048) |
| Vocabulary | 49,152 (SmolLM2 tokenizer) |
| Context length | 2,048 tokens |
| Time convention | α = 1 is clean data, α = 0 is pure noise |
| Batch | 4,096 × 2,048 tokens per step |
| Optimizer | AdamW (β = 0.9, 0.95; weight decay 0.1), LR 6e-4 constant after a 2,000-step warmup, clip 2.5 |
| Hardware | 32 nodes × 8 NVIDIA H200 |
Training data
Dolma 3 Mix by the Allen Institute for AI, licensed under ODC-By 1.0, with its mixture weights unchanged.
Scope and limitations
SwaFlow is built to make Riemannian flow language models open to study across training and scale: several sizes trained under one recipe, their full states along training, a data order shared by all runs, and autoregressive twins trained on the same data. It is not meant to provide models for applications. Flow language models are still at an early stage, and the twins show how far: on multiple-choice tasks every autoregressive twin, the 150M one included, scores higher on average than the final 3B flow model. Text generated by the flow models, the instruction-tuned ones included, is often incoherent, and none of the models is tuned to avoid harmful content.
Acknowledgements
This model was built by AIST and Institute of Science Tokyo under FRONTia, a Japanese national program led by the Ministry of Economy, Trade and Industry of Japan (METI) and the New Energy and Industrial Technology Development Organization (NEDO), aimed at developing a domestic multimodal foundation model for AI robots and physical AI.
License
The weights and training states are released under the Apache License 2.0. The tokenizer is that of SmolLM2 (Apache License 2.0). The training data is licensed under ODC-By 1.0.
Citation
@misc{swaflow2026,
title = {SwaFlow: A Fully Open Suite for Studying Riemannian Flow Language Models Across Training and Scale},
author = {Oba, Daisuke and Mizuki, Sakae and Takamura, Hiroya and Okazaki, Naoaki},
year = {2026},
note = {coming soon}
}
- Downloads last month
- 83