neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
torchtitan은 PyTorch 기반 생성 AI 모델 학습을 위한 플랫폼입니다
A PyTorch native platform for training generative AI models
개발 도구Python · ShellGitHub @pytorch직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗A PyTorch-native platform for pretraining and post-training generative AI models at scale
Quick start · Models · Features · RL · Docs · Contributing
torchtitan is a clean-room, PyTorch-native implementation of large-scale
training. One readable codebase takes a model from pretraining through
supervised fine-tuning to reinforcement learning, composing FSDP, tensor,
pipeline, context, and expert parallelism without rewriting the model.
DeviceMesh and DTensor.[!NOTE]
torchtitanis under active development. To use the latest features, use a recent PyTorch nightly.
torchtitan for AMD GPUs.torchtitan v0.2.0.torchtitan! See the tutorial.torchtitan.1. Install with a PyTorch nightly (Python 3.11+). Replace cu132 with your CUDA or ROCm build.
git clone https://github.com/pytorch/torchtitan && cd torchtitan
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu132
pip install -r requirements.txt
2. Train a debug model. It uses the tokenizer bundled with the tests, so no download is needed.
NGPU=1 ./run_train.sh # Llama 3 debug model, 10 steps
3. Train a real model. Download the tokenizer (Llama weights require access on Hugging Face), then select a recipe by module and function name:
python scripts/download_hf_assets.py --repo_id meta-llama/Llama-3.1-8B --assets tokenizer --hf_token=...
MODULE=torchtitan_recipes.models.llama3 CONFIG=llama3_8b ./run_train.sh # 8 GPUs
4. Make it yours. A recipe is a Python function returning a complete config, so changing a run means writing a function, not passing flags:
# my_recipes.py
from torchtitan_recipes.models.llama3 import llama3_8b
def llama3_8b_tp2():
config = llama3_8b()
config.parallelism.tensor_parallel_degree = 2
return config
MODULE=my_recipes CONFIG=llama3_8b_tp2 ./run_train.sh
See the configuration guide for the full model,
and torchtitan_recipes for the verified recipes.
| Model | Sizes | Modality | Verified recipes | RL |
|---|---|---|---|---|
| Llama 3 | 1B – 405B | Text | llama3_8b, llama3_70b | ✅ |
| Qwen3 | 0.6B – 32B dense; 30B-A3B, 235B-A22B MoE | Text | qwen3_14b | ✅ |
| Qwen3.5 / 3.6 / 3.8 | 0.8B – 397B-A17B; 2.4T-A95B (3.8) | Text, vision | ✅ text | |
| DeepSeek V3 | 16B, 236B, 671B | Text | deepseek_v3_671b (+ Dist-MoE, NVFP4) | |
| DeepSeek V4 | Flash, Pro | Text | Soon | |
| gpt-oss | 20B, 120B | Text | ✅ | |
| Kimi K2.7 | Moonlight-16B-A3B, Kimi-VL-A3B, K2.5 | Text, vision | ||
Every model has debug configurations exercised in CI. Verified recipes have been run in training, convergence, or performance workflows. To add a model, see the model guide.
Parallelism
torch.distributed.pipelining schedulesMemory and performance
torch.compile and CUDA graphsTraining
Post-training with TitanRL
Checkpointing
Debugging and observability
Extensibility
--module and --configWe report performance on up to 512 GPUs and verify loss convergence across parallelisms and techniques.
| Hardware | Integration tests | Unit tests |
|---|---|---|
| CPU | ||
| NVIDIA GPU | ||
| AMD GPU (ROCm) | ||
| RL (NVIDIA GPU) |
The quick start installs from source, which is the recommended way to get the latest features. Other options:
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu132 --force-reinstall
pip install --pre torchtitan --index-url https://download.pytorch.org/whl/nightly/cu132
Replace cu132 with another CUDA version or a ROCm build (e.g. rocm10.0).
pip install torchtitan
# or
conda install conda-forge::torchtitan
Each stable release pins the nightly versions of torch and torchao it was
validated against; see RELEASE.md.
torchao nightly matching your
torch build. It is not in requirements.txt so it cannot be resolved
against a different torch:
USE_CPP=0 pip install --pre --upgrade torchao --index-url https://download.pytorch.org/whl/nightly/cu132
scripts/install_rl_env.sh installs the vLLM, Monarch, and TorchStore
nightlies and the FlashAttention build for your GPU. See the
RL quick start.pip install -e ".[vlm,flux,rl,dev]".torchtitan from another directory, install it in editable mode without
re-resolving dependencies: pip install -e . --no-deps.Submit scripts/multinode_trainer.slurm with
sbatch from the repository root. Set the node count in both the #SBATCH
header and the torchrun --nnodes argument:
#SBATCH --ntasks=2
#SBATCH --nodes=2
srun torchrun --nnodes 2 ...
If a node does not have 8 GPUs, also adjust --nproc_per_node and
#SBATCH --gpus-per-task.
| Topic | Where |
|---|---|
| Configuring runs and writing recipes | torchtitan/config |
| Adding a model | torchtitan/models |
| Parallelisms and distributed techniques | torchtitan/distributed |
| Datasets and data loading | torchtitan/components/data |
| Checkpointing and HF conversion | torchtitan/components/checkpointer |
| Reinforcement learning | torchtitan/rl |
| Debugging, reproducibility, and validating numerics | docs/debugging.md |
| Validation and evaluation | docs/evaluation.md |
| Benchmarks | docs/benchmarks |
| Tests and CI | tests |
We look forward to your contributions!
experiments folder;
follow the experiments guidelines.Our paper gives a detailed look at the parallelisms and optimizations in
torchtitan, with advice on when to use each technique:
TorchTitan: One-stop PyTorch native solution for production ready LLM pre-training.
@inproceedings{
liang2025torchtitan,
title={TorchTitan: One-stop PyTorch native solution for production ready {LLM} pretraining},
author={Wanchao Liang and Tianyu Liu and Less Wright and Will Constable and Andrew Gu and Chien-Chin Huang and Iris Zhang and Wei Feng and Howard Huang and Junjie Wang and Sanket Purandare and Gokul Nadathur and Stratos Idreos},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=SFN6Wm7YBI}
}
Source code is made available under a BSD 3 license. You may have other legal obligations that govern your use of other content linked in this repository, such as the license or terms of service for third-party data and models.
| Kimi K3 |
| K3 |
| Text, vision |
| Soon |
| Muse Glimmer | 30B | Text, vision | muse_glimmer_30b | ✅ |
| Muse-Spark-Open | 816B-A42B | Text, vision, audio | muse_spark_816b_a42b | ✅ text |
| FLUX | dev, schnell | Text-to-image | flux_dev, flux_schnell |