Implementation:Princeton nlp SimPO Conda Environment Create
| Knowledge Sources | |
|---|---|
| Domains | MLOps, Environment_Management |
| Last Updated | 2026-02-08 04:30 GMT |
Overview
External CLI tool for creating the SimPO training environment from a Conda specification file.
Description
The environment.yml file defines a complete Conda environment named simpo with Python 3.10.14, PyTorch 2.2.2 (CUDA 12.1), and all training dependencies. The environment is created using the conda env create command, followed by an editable install of the project package.
Usage
Use this before any training or inference script. The environment must be created once per machine or container. Activate with conda activate simpo before running training commands.
Code Reference
Source Location
- Repository: SimPO
- File: environment.yml (Lines 1-260)
Signature
# Step 1: Create the conda environment
conda env create -f environment.yml
# Step 2: Activate the environment
conda activate simpo
# Step 3: Install the project in editable mode
pip install -e .
Import
# No Python import — this is a CLI tool
# After environment creation, activate with:
conda activate simpo
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| environment.yml | File | Yes | Conda environment specification with all dependencies |
Outputs
| Name | Type | Description |
|---|---|---|
| simpo environment | Conda env | Fully configured Python 3.10 environment with all training libraries |
Usage Examples
Full Environment Setup
# Clone the repository
git clone https://github.com/princeton-nlp/SimPO.git
cd SimPO
# Create the conda environment from the specification
conda env create -f environment.yml
# Activate the environment
conda activate simpo
# Install the project in editable mode
pip install -e .
# Verify key packages
python -c "import torch; print(torch.__version__)" # 2.2.2
python -c "import transformers; print(transformers.__version__)" # 4.44.2
python -c "import trl; print(trl.__version__)" # 0.9.6
Key Dependencies
python==3.10.14
torch==2.2.2 (with CUDA 12.1)
transformers==4.44.2
trl==0.9.6
accelerate==0.29.2
peft==0.7.1
deepspeed==0.12.2
flash-attn==2.5.7
bitsandbytes==0.41.2.post2
datasets==2.18.0
wandb==0.13.11