THUDM/SwissArmyTransformer
SwissArmyTransformer is a flexible and powerful library to develop your own Transformer variants. observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 1792
- days_rel: n/a
- days_push: 615
- n_releases_24m: 0
Adoption not part of the score
1121 stars · 99 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
SwissArmyTransformer (sat) is a PyTorch library for developing custom Transformer model variants where models like BERT, GPT, T5, GLM, and ViT share a common backbone code extended via lightweight mixins. It integrates DeepSpeed ZeRO and model parallelism to support pretraining and finetuning of large models from 100M to 20B parameters.
Use cases
- develop custom transformer model variants
- finetune large pretrained language models
- add prefix-tuning or p-tuning to existing models
- pretrain large models up to 20B parameters
- build autoregressive text generation with beam search
- add classification heads to pretrained transformers
When to choose
- you want to experiment with transformer architecture modifications without rewriting backbone code
- you need efficient pretraining or finetuning of large models with deepspeed and model parallelism
- you want to apply parameter-efficient techniques like prefix-tuning across different model families
- you need cached autoregressive inference for generation tasks
When to avoid
- you need a general-purpose deep learning framework rather than a transformer-specific library
- your models are not transformer-based
- you prefer higher-level abstractions like huggingface transformers for standard finetuning workflows
- you work without gpu resources since the library targets large-scale training
Facets
library · maturity active
llm-training machine-learning deep-learning llm-inference deep-learning large-language-models machine-learning python transformer pytorch pretrained-models model-parallelism deepspeed finetuning mixin-architecture large-models natural-language-processing gpu linux
3 sources
- readme: https://github.com/THUDM/SwissArmyTransformer · fetched 2026-08-28 · 1e1f12cea0b7
- homepage: https://THUDM.github.io/SwissArmyTransformer · fetched 2026-08-29 · dbb4343a6440
- registry_pypi: https://pypi.org/pypi/swissarmytransformer/json · fetched 2026-08-29 · 31c965633e38
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| THUDM/SwissArmyTransformer | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="THUDM/SwissArmyTransformer")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem