TokyoTech-LLM Releases SwaFlow-500M and SwaFlow-AR-500M

TokyoTech-LLM Releases SwaFlow-500M and SwaFlow-AR-500M

At a Glance

Item Value
Repository tokyotech-llm/SwaFlow-500M
Family guide SwaFlow guide (5 articles)
Publisher guide Swallow (Institute of Science Tokyo): models and licenses
Published 2026-11-28
License apache-2.0
Source type Primary source (the publisher itself)

Values determined by this site’s code when the information was collected. Dates are JST.

Overview

tokyotech-llm has simultaneously released “SwaFlow-500M", a hyperspherical (Riemannian) flow language model, and its autoregressive counterpart “SwaFlow-AR-500M". SwaFlow-500M is a non-autoregressive model with 686M parameters, while SwaFlow-AR-500M is a 613M-parameter Transformer model. Both models follow the same data ordering and training recipe, and are trained from scratch using the Allen Institute for AI’s “Dolma 3 Mix" dataset.

This release is intended for open research into the training processes and scale-dependent changes of flow language models, rather than for integration into applications. Each state is saved as a complete torchtitan checkpoint containing fp32 weights, AdamW moments, learning rate scheduler, data loader position, and step counter, making it possible to resume training from any checkpoint or load the weights standalone.

Specifications

The specifications of each model listed in the documentation are as follows.

SwaFlow-500M:
– Parameters: 686M (width 1280, 24 layers, 10 heads, FFN 3584)
– Context length: 2,048 tokens
– Vocabulary size: 49,152 (SmolLM2 tokenizer)

SwaFlow-AR-500M:
– Parameters: 613M

Performance

While the model cards for this model group do not include a detailed comparison table of benchmark scores, the “Scope and limitations" section reports qualitative evaluation results comparing autoregressive and flow models.

According to the model card description, on multiple-choice tasks, all autoregressive twin models, including the 150M parameter configuration, outperform the final 3B scale flow model in average score. Furthermore, text generated by flow models, including instruction-tuned variants, is often reported to be incoherent. Note that neither model has been tuned to avoid generating harmful content.

These measurement results indicate that the flow language model technology is still in its early stages, with autoregressive models clearly maintaining superiority in standard text generation performance and multiple-choice tasks. This model group is positioned not as a practical generation engine, but as an academic foundation for comparing and verifying the behavioral differences between flow models and autoregressive models under identical data environments.

Strengths and Use Cases

SwaFlow-500M and SwaFlow-AR-500M were not developed to be used like general applications or chatbots. These models are constructed as a research foundation for openly investigating, analyzing, and researching the mechanisms, training processes, and behavior changes associated with model scaling in hyperspherical (Riemannian) flow language models.

Specifically, they are suited for research and verification use cases such as:

  • Detailed comparisons of behavior and performance differences between Riemannian flow language models and autoregressive (Transformer) models trained on identical data and training order.
  • Resuming training from intermediate states (checkpoints) and analyzing weight progression or the internal state of the optimization algorithm (AdamW).
  • Verifying characteristic changes associated with scaling across the entire “SwaFlow suite" built with the same training recipe and data order.

On the other hand, they are not suited for practical application use such as general text generation tasks, dialogue processing, or harmful content filtering. As mentioned in the model card, text generated by flow models is frequently incoherent, and safety tuning has not been applied, so caution is required when using them.

How to Get It

Both models are released under the Apache 2.0 license and can be obtained by anyone without requiring prior license agreement procedures on Hugging Face.

To use them, you must first install the dedicated code (SwaFlow code) from the official SwaFlow repository. If you want to load only specific checkpoint weights from Python code, run the following procedure.

To load SwaFlow-500M weights:

from torchtitan.models.swaflow.hf import from_pretrained

model = from_pretrained("tokyotech-llm/SwaFlow-500M", subfolder="uniform/step-238400", device="cuda")

To load SwaFlow-AR-500M weights:

from torchtitan.models.swaflow.hf import from_pretrained

model = from_pretrained("tokyotech-llm/SwaFlow-AR-500M", subfolder="uniform/step-238400", device="cuda")

This method downloads only the specified subfolder and skips the optimizer states.

Resuming and Executing Training

To obtain the entire checkpoint including optimizer states and resume training from an intermediate point, download the checkpoint via the CLI, place it in the designated directory, and run the startup script.

Resuming SwaFlow-500M training:

hf download tokyotech-llm/SwaFlow-500M --include "uniform/step-238400/*" --local-dir hub
mkdir -p $SWAFLOW_OUTPUTS/flow_500m/checkpoint
mv hub/uniform/step-238400 $SWAFLOW_OUTPUTS/flow_500m/checkpoint/
scripts/launch/train.sh torchtitan/models/swaflow/train_configs/flow_500m.toml flow_500m

Resuming SwaFlow-AR-500M training:

hf download tokyotech-llm/SwaFlow-AR-500M --include "uniform/step-238400/*" --local-dir hub
mkdir -p $SWAFLOW_OUTPUTS/ar_500m/checkpoint
mv hub/uniform/step-238400 $SWAFLOW_OUTPUTS/ar_500m/checkpoint/
scripts/launch/train.sh torchtitan/models/swaflow/train_configs/ar_500m.toml ar_500m

When resuming from the clean-prefix-2t state, use midtrain_500m.toml as the configuration file.

Notes on Resuming Training

When resuming training, several prerequisites and operational specifications apply:

  • Training Data Environment: Because checksums and names are verified when loading the model, a production_6t data build created using the data pipeline in the code is required.
  • GPU Configuration Conditions: It is possible to resume with a different number of GPUs than the original training environment (32 nodes × 8 GPUs for 256 ranks for SwaFlow-500M, 16 nodes × 8 GPUs for 128 ranks for SwaFlow-AR-500M). However, due to gradient accumulation constraints that fix the global batch size (4,096 sequences), the number of GPUs used must evenly divide 256.
  • Regarding Reproducibility: When resumed in an environment with a different number of GPUs, the order of floating-point additions across ranks and microbatches changes, causing weights to begin deviating from the original run in the last few bits of calculation results, with the difference widening as training progresses. Note that random number states are not included in checkpoints, meaning this will not be a bit-wise perfectly matching reproducible run.

Can You Run It Locally?

License — apache-2.0 (Commercial use allowed): Permits commercial use, modification and redistribution. Redistribution requires including the license and stating changes; includes a patent grant.

Compiled by this site’s code from the published formats and the license field. License summaries are not legal advice — check the publisher’s original terms before relying on them.

Related Articles

What to Read Next

Sources