Back to Skills

funsloth-local

verified

Training manager for local GPU training - validate CUDA, manage GPU selection, monitor progress, handle checkpoints

View on GitHub

Marketplace

funsloth

chrisvoncsefalvay/funsloth

Plugin

funsloth

machine-learning

Repository

chrisvoncsefalvay/funsloth
4stars

skills/funsloth-local/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/chrisvoncsefalvay/funsloth/blob/main/skills/funsloth-local/SKILL.md -a claude-code --skill funsloth-local

Installation paths:

Claude
.claude/skills/funsloth-local/
Powered by add-skill CLI

Instructions

# Local GPU Training Manager

Run Unsloth training on your local GPU.

## Prerequisites Check

### 1. Verify CUDA

```python
import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU: {torch.cuda.get_device_name(0)}")
print(f"VRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB")
```

If CUDA not available:
- Check NVIDIA drivers: `nvidia-smi`
- Check CUDA: `nvcc --version`
- Reinstall PyTorch: `pip install torch --index-url https://download.pytorch.org/whl/cu121`

### 2. Check VRAM

See [references/HARDWARE_GUIDE.md](references/HARDWARE_GUIDE.md) for requirements:

| VRAM | Recommended Setup |
|------|-------------------|
| 8GB | 7B, 4-bit, batch=1, LoRA r=8 |
| 12GB | 7B, 4-bit, batch=2, LoRA r=16 |
| 16GB | 7-13B, 4-bit, batch=2, LoRA r=16-32 |
| 24GB | 7-14B, 4-bit, batch=4, LoRA r=32 |

### 3. Check Dependencies

```bash
pip install unsloth torch transformers trl peft datasets accelerate bitsandbytes
```

## Docker Option

Use the [official Unsloth Docker image](https://docs.unsloth.ai/new/how-to-fine-tune-llms-with-unsloth-and-docker) for a pre-configured environment (supports all GPUs including Blackwell/50-series):

```bash
docker run -d \
  -e JUPYTER_PASSWORD="unsloth" \
  -p 8888:8888 \
  -v $(pwd)/work:/workspace/work \
  --gpus all \
  unsloth/unsloth
```

Access Jupyter at `http://localhost:8888`. Example notebooks are in `/workspace/unsloth-notebooks/`.

Environment variables:

- `JUPYTER_PASSWORD` - Jupyter auth (default: `unsloth`)
- `JUPYTER_PORT` - Port (default: `8888`)
- `USER_PASSWORD` - User/sudo password (default: `unsloth`)

## Run Training

### Option 1: Notebook

```bash
jupyter notebook notebooks/sft_template.ipynb
```

### Option 2: Script

```bash
# Edit configuration in script, then run
python scripts/train_sft.py
```

### GPU Selection (Multi-GPU)

```python
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"  # Use first GPU
```

## Monitor Training

### Terminal

```bash
# Watch GPU usage
watch -

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3943 chars