NVIDIA/cosmos-framework
Our inference and training framework to run on the Cosmos Models
What it solves
Building and running world models — AI systems that process and generate several kinds of data at once (language, images, video, audio, and action sequences). Traditionally these capabilities live in separate tools (vision-language models, video generators, world simulators, world-action models); this framework unifies them into a single end-to-end pipeline for training, serving, and post-training. It also covers deploying robot policies and fine-tuning models with techniques like preference optimization, reinforcement learning, and distillation.
How it works
Everything lives in one Python package, cosmos_framework/, with several parts:
- Training — a distributed trainer using parallelism strategies (FSDP, TP, CP, PP), native DCP checkpoints with HuggingFace
safetensorsimport/export, and dataset adapters for JSONL, WebDataset, and LeRobot formats. Entry point:cosmos_framework.scripts.train. - Inference — multiple backends (Diffusers, Transformers, vLLM) supporting offline batch generation and online serving via Ray + Gradio. Entry point:
cosmos_framework.scripts.inference. - Policy serving — a server-client pipeline for deploying Cosmos3 policies to act on real-world tasks.
- Post-training and RL — a common runtime for offline and online post-training, from single-host recipes to distributed Ray execution, supporting algorithms like DPO, GRPO, PPO, OPD, DiffusionNFT, and SFT.
- Agent Skills — bundled
SKILL.mdfiles that coding agents (Claude Code, Codex CLI, Cursor, etc.) load automatically for setup, codebase navigation, inference, post-training, and troubleshooting.
The Cosmos 3 model family itself is a suite of omnimodal world models built on a unified Mixture-of-Transformers architecture that jointly processes and generates language, images, video, audio, and action sequences.
Who it's for
Researchers and engineers working on Physical AI — building, fine-tuning, and deploying world models and robot policies. It's also aimed at developers who use coding agents to work with the codebase, since it ships task-specific agent skills and a repo map for agents.
Highlights
- End-to-end coverage: training, inference, policy serving, and post-training/RL in one package
- Distributed training with FSDP/TP/CP/PP parallelism and DCP checkpoints with safetensors import/export
- Multiple inference backends (Diffusers, Transformers, vLLM) with offline batch generation and online serving
- Post-training runtime supporting DPO, GRPO, PPO, OPD, DiffusionNFT, and SFT
- Model integrations include Cosmos3, GR00T-N1.7, π0.5, Alpamayo, Qwen, and Qwen-VL families
- Bundled Agent Skills that coding agents load automatically
- Shipped 8-GPU training recipes tested on 8× H100 80 GB
Related
- Project
- Project
- Project
- Project
- Project