LeRobot: AI models and datasets for robotics
PyTorch library for robot imitation learning and sim-to-real transfer.
Learn more about lerobot
LeRobot is a PyTorch-based library for robot learning that provides pre-trained models and datasets for imitation learning and sim-to-real transfer applications. The framework implements policy learning architectures such as diffusion models that accept multi-modal observations including image and state data, applying configurable normalization strategies like mean-std for vision inputs and min-max scaling for state vectors. Training occurs through standard PyTorch optimization loops where batched data from HuggingFace-hosted robot demonstration datasets flows through the policy network to compute loss values for gradient descent updates. The library supports distributed data loading with configurable worker processes and enables GPU acceleration by moving tensors and model parameters to CUDA devices. Trained policies can be serialized and stored using the pretrained model format for subsequent deployment or fine-tuning.
Multiple policy architectures
Implements several learning approaches including action chunking transformers, model predictive control, and diffusion policies, allowing users to select methods suited to different manipulation tasks.
Hardware integration focus
Provides documentation and tutorials for building and training specific robot platforms like SO-101 and HopeJR, with emphasis on affordable, accessible hardware designs.
Centralized model and dataset hub
Hosts pretrained models and demonstration datasets on Hugging Face, enabling transfer learning and reducing the need for users to collect their own training data from scratch.
from lerobot.common.policies.diffusion.modeling_diffusion import DiffusionPolicy
import torch
# Load a pretrained policy model
policy = DiffusionPolicy.from_pretrained("lerobot/diffusion_pusht")
policy.eval()
# Move model to GPU if available
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
policy.to(device)Patch release fixing critical dataset bottleneck and feature-modification bug; adds EnvHub for loading environments from Hugging Face Hub.
- –Apply data-access fix to eliminate training bottleneck and improve throughput.
- –Use EnvHub to load simulation environments directly from the Hub; libero now available via PyPI.
Major refactor introducing Dataset v3, streaming datasets, and pipeline-based image processors; scripts reorganized to top-level directories.
- –Migrate to Dataset v3 format and adopt pipeline-based image transforms across the codebase for data processing.
- –Update import paths as scripts moved to top-level directories (async, rl, scripts) and constants/errors relocated to utils.
Maintenance release capping PyTorch dependency versions and introducing a universal processor for LeRobot pipelines.
- –Pin torch package versions to ceiling bounds to prevent compatibility issues with future PyTorch releases.
- –Adopt the new universal processor for LeRobot pipelines to standardize data handling across models.
See how people are using lerobot
Related Repositories
Discover similar tools and frameworks used by developers
stable-diffusion
CLIP-conditioned latent diffusion model for text-to-image synthesis.
openpose
Multi-person 135-keypoint anatomical detection in C++.
ComfyUI-Manager
Graphical package manager for ComfyUI custom nodes.
ControlNet
Dual-branch architecture for conditional diffusion model control.
pix2pix
Torch implementation for paired image-to-image translation using cGANs.