NLP Project Environment Setup

SkillDev tools

Set up Python environment for NLP and preference optimization projects.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the NLP Project Environment Setup skill

What this skill tells your AI

The instructions your AI receives, as published by cxcscmu/skilllearnbench in skills/b1-one-shot-claude-haiku-4-5/nlp-paper-reproduction/nlp-project-setup/SKILL.md and read by ahel’s review.

Environment Requirements for SimPO

Core Dependencies

  • PyTorch: Deep learning framework (torch, torchvision, torchaudio)
  • Transformers: Hugging Face library for LLMs
  • NumPy: Numerical computing
  • SciPy: Scientific computing utilities
  • tqdm: Progress bars for training loops

Optional but Recommended

  • wandb: Experiment tracking
  • accelerate: Distributed training
  • bitsandbytes: 8-bit optimization
  • Flash-Attn: Efficient attention

Installation Steps

1. Check Python Version

python --version  # Should be 3.8+
python -VV        # Detailed version info

2. Create Virtual Environment (Optional)

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install Core Dependencies

# PyTorch (CUDA 12.1 example)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

# Transformers
pip install transformers

# Other essentials
pip install numpy scipy tqdm

4. Verify Installation

python -c "import torch; print(torch.__version__)"
python -c "import transformers; print(transformers.__version__)"

Dependency Version Considerations

For SimPO Specifically

  • transformers >= 4.30.0 (for AutoTokenizer, model loading)
  • torch >= 1.13.0 (for modern PyTorch features)
  • numpy (for .npz file saving)

Compatibility Notes

  • Different CUDA versions may require different torch builds
  • GPU memory requirements: typically 10-20GB for 7B models
  • CPU-only mode works but is much slower

Requirements File

Create requirements.txt:

torch>=1.13.0
transformers>=4.30.0
numpy
scipy
tqdm
accelerate>=0.20.0

Then install:

pip install -r requirements.txt

Logging Installed Packages

# Save package list
python -m pip freeze > /root/python_info.txt

# Or capture with version info
python -VV >> /root/python_info.txt
python -m pip freeze >> /root/python_info.txt

Troubleshooting

CUDA/GPU Issues

# Check if CUDA available
python -c "import torch; print(torch.cuda.is_available())"

# Find CUDA version
nvidia-smi  # Shows CUDA version

# Match PyTorch to CUDA version
# Visit: https://pytorch.org/get-started/locally/

Missing Dependencies

# Install specific package
pip install <package_name>

# Or reinstall all from requirements
pip install --force-reinstall -r requirements.txt

Version Conflicts

# Show package version
pip show <package_name>

# Check compatibility
pip check

Signals

GitHub stars
83
Forks
5
Last commit
Jul 2026
Advanced
Catalog kind
skill
Gateway key
nlp-project-setup
Source
github.com/cxcscmu/skilllearnbench