A complete, self-contained package for deploying SmolVLA vision-language-action models in MuJoCo simulations.
This standalone package contains everything you need to run SmolVLA experiments:
smolvla_standalone/
βββ README.md # This file
βββ setup.sh # Automated setup script
βββ requirements.txt # Python dependencies
βββ DIRECTORY_STRUCTURE.txt # Complete directory tree
β
βββ scripts/ # Executable scripts
β βββ run_smolvla.py # Main script (full CLI)
β βββ run_smolvla_experiment.py
β βββ run_smolvla_with_env.sh
β
βββ examples/ # Example scripts
β βββ README.md # Examples documentation
β βββ quick_test.sh # Quick functionality test
β βββ batch_experiments.sh # Batch evaluation
β βββ custom_task.sh # Custom task examples
β βββ use_finetuned_model.sh # Finetuned model usage
β
βββ config/ # Configuration files
β βββ smolvla_omy.yaml # SmolVLA config
β βββ pi0_omy.yaml # Pi0 config
β
βββ mujoco_env/ # Environment code
β βββ y_env2.py # Main environment
β βββ ik.py # Inverse kinematics
β βββ utils.py # Utilities
β βββ ...
β
βββ asset/ # MuJoCo scenes & models
βββ example_scene_y2.xml # Default scene
βββ robotis_omy/ # Robot model
βββ objaverse/ # Objects
βββ tabletop/ # Table models
# Navigate to the standalone directory
cd smolvla_standalone
# Run automated setup
./setup.shThis will:
- β Check Python version (3.8+ required)
- β Create virtual environment
- β Install all dependencies
- β Check GPU availability
- β Verify setup
source venv/bin/activate# Option A: Use example script
cd examples
./quick_test.sh
# Option B: Use main script directly
cd scripts
python run_smolvla.py --pretrain --episodes 5 --timeout 30That's it! Your first experiment is running.
cd examples
./quick_test.shDuration: 2-5 minutes
Purpose: Verify setup works
cd scripts
python run_smolvla.py \
--pretrain \
--task "Place the red mug on the plate" \
--episodes 10 \
--timeout 60Purpose: Test specific task
cd examples
./batch_experiments.shDuration: 30-60 minutes
Purpose: Comprehensive evaluation
# First, copy your model to this directory
cp -r /path/to/your/smolvla_model ./
# Then run
cd scripts
python run_smolvla.py \
--model ../smolvla_model \
--episodes 20 \
--timeout 60Purpose: Production evaluation
python run_smolvla.py --helpKey Arguments:
| Argument | Default | Description |
|---|---|---|
--pretrain |
False | Use pretrained model from HuggingFace |
--model |
./smolvla_model |
Path to local model |
--task |
None | Custom task instruction |
--episodes |
20 | Number of episodes |
--timeout |
60 | Timeout in seconds |
--hz |
20 | Control frequency |
--seed |
42 | Random seed |
Examples:
# Pretrained model, quick test
python run_smolvla.py --pretrain --episodes 5
# Finetuned model, long timeout
python run_smolvla.py --model ../smolvla_model --timeout 120
# Custom task
python run_smolvla.py --pretrain --task "Your task here"
# High frequency control
python run_smolvla.py --hz 30 --episodes 10Pretrained Model (--pretrain):
- Success Rate: ~5-10%
- Why: Not trained on specific task
- When to use: Testing, exploration
Finetuned Model (local):
- Success Rate: ~60-80%
- Why: Trained on specific task
- When to use: Production, evaluation
=================================================
Experiment Statistics
=================================================
Total Episodes: 20
Successes: 15 (75.0%)
Timeouts: 3 (15.0%)
Failures: 2
Total Steps: 4521
Average Steps/Episode: 226.1
=================================================
- OS: macOS, Linux
- Python: 3.8+
- RAM: 8GB+
- Storage: 5GB free
- OS: macOS with Apple Silicon, or Linux with NVIDIA GPU
- Python: 3.10+
- RAM: 16GB+
- GPU: Apple M1/M2/M3 or NVIDIA GPU
- Storage: 10GB free
- CUDA: NVIDIA GPUs (automatic)
- MPS: Apple Silicon Macs (see
docs/MPS_GUIDE.md) - CPU: Fallback (slower)
To use a finetuned model, copy these to the standalone directory:
# Copy your trained model
cp -r /path/to/smolvla_model ./smolvla_standalone/
# Copy dataset (optional, for correct statistics)
cp -r /path/to/omy_pnp_language ./smolvla_standalone/Directory structure after copying:
smolvla_standalone/
βββ smolvla_model/ # Your finetuned model
β βββ config.json
β βββ model.safetensors
βββ omy_pnp_language/ # Training dataset
βββ data/
βββ meta/
# Check Python version
python3 --version # Should be 3.8+
# Try manual installation
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt# Make sure virtual environment is activated
source venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txt --force-reinstall# Check if display is available
echo $DISPLAY
# On macOS, ensure XQuartz is running
# Or run without GUI (if supported)This is expected! Pretrained models have ~5-10% success rate.
Solutions:
- Use a finetuned model (
--model ../smolvla_model) - Increase timeout (
--timeout 120) - Reduce number of episodes for quick tests
# Check internet connection
ping huggingface.co
# Try again with explicit model name
python run_smolvla.py --model lerobot/smolvla_base --pretrain
# Or use local model
python run_smolvla.py --model ../smolvla_modelTo update the package:
# Pull latest changes (if using git)
git pull
# Reinstall dependencies
source venv/bin/activate
pip install -r requirements.txt --upgrade# Script help
cd scripts && python run_smolvla.py --help
# Setup help
./setup.sh
# Example help
cd examples && cat README.md
# Check GPU
python3 -c "import torch; print('Device:', 'CUDA' if torch.cuda.is_available() else 'MPS' if torch.backends.mps.is_available() else 'CPU')"# 1. Complete setup
./setup.sh
# 2. Activate environment
source venv/bin/activate
# 3. Read quick start
cat docs/QUICKSTART.md
# 4. Run your first test
cd examples && ./quick_test.sh
# 5. Explore more
cd examples && cat README.md