Primus documentation

July 15, 2026 ยท View on GitHub

Production documentation for Primus, a large-scale foundation model training framework for AMD GPUs.


Choose your starting point

I am a...Start here
New userGetting started
User running training jobsUser guide
User writing YAML configurationsConfiguration reference
Engineer tuning performanceTechnical guides
Operator deploying to productionOperations
Contributor to the codebaseDeveloper guide

Documentation structure

Getting started

Start here if you are new to Primus.

User guide

Core workflows and day-to-day usage.

  • CLI reference: primus-cli modes, flags, and subcommands
  • Configuration system: YAML configuration model, presets, overrides, inheritance
  • Pretraining: pretraining concepts: backends, YAML structure, parallelism, configuration inventory
  • Backend training recipes: pretraining commands: copy-paste, GPU-arch-specific run commands
  • Post-training: SFT and LoRA fine-tuning via Megatron Bridge
  • Benchmarking: GEMM, RCCL, and dense-GEMM benchmark suites
  • Preflight: cluster diagnostics and environment validation
  • Projection: memory and performance projection tools
  • Tuning agent: LLM-driven search for an optimal training configuration (uses projection as an oracle)
  • Primus tools: catalog of all Primus tools and ecosystem projects with how-to starting points

Configuration reference

Parameter references for Primus presets, backend-facing keys, and commonly used environment variables.

Technical guides

Deep technical topics for advanced users.

Operations

Production deployment and operational guidance.

Developer guide

For contributors and maintainers.


Common use cases

I want to...

GoalDocument
Understand what Primus isOverview
Browse all Primus toolsPrimus tools
Install PrimusInstallation
Run my first trainingQuickstart
Get an exact run command for my model/GPUBackend training recipes
Write a training YAML configurationConfiguration system
Look up a Megatron parameterMegatron parameters
Look up a TorchTitan parameterTorchTitan parameters
Look up an environment variableEnvironment variables
Understand parallelism strategiesParallelism strategies
Configure parallelism for my modelParallelism configuration
Tune training performancePerformance tuning
Train a Mixture-of-Experts modelMoE training deep-dive
Train a diffusion (Flux) modelDiffusion models
Fine-tune with native SFT / LoRANative SFT and LoRA
Auto-tune my training configurationTuning agent
Profile a training runProfiling and observability
Track experiments (WandB/MLflow/TensorBoard)Logging and experiment tracking
Survive node failures on long runsFault tolerance and elastic training
Reproduce results bit-for-bitDeterminism and reproducibility
Prepare training dataData preparation
Deploy to a Slurm clusterDeployment
Debug a training failureTroubleshooting
Contribute to PrimusContributing
Understand the code architectureArchitecture
Add a new training backendExtending backends

External resources


Need help? Open an issue on GitHub.