# Nlp Project Setup

> Set up Python environment for NLP and preference optimization projects.

- **Type:** Skill
- **Install:** `agentstack add skill-cxcscmu-skilllearnbench-nlp-project-setup`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [cxcscmu](https://agentstack.voostack.com/s/cxcscmu)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [cxcscmu](https://github.com/cxcscmu)
- **Source:** https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/nlp-paper-reproduction/nlp-project-setup
- **Website:** https://cxcscmu.github.io/SkillLearnBench

## Install

```sh
agentstack add skill-cxcscmu-skilllearnbench-nlp-project-setup
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# NLP Project Environment Setup

## 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
```bash
python --version  # Should be 3.8+
python -VV        # Detailed version info
```

### 2. Create Virtual Environment (Optional)
```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

### 3. Install Core Dependencies
```bash
# 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
```bash
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:
```bash
pip install -r requirements.txt
```

## Logging Installed Packages
```bash
# 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
```bash
# 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
```bash
# Install specific package
pip install 

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

### Version Conflicts
```bash
# Show package version
pip show 

# Check compatibility
pip check
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [cxcscmu](https://github.com/cxcscmu)
- **Source:** [cxcscmu/SkillLearnBench](https://github.com/cxcscmu/SkillLearnBench)
- **License:** MIT
- **Homepage:** https://cxcscmu.github.io/SkillLearnBench

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-cxcscmu-skilllearnbench-nlp-project-setup
- Seller: https://agentstack.voostack.com/s/cxcscmu
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
