Skip to content

Commit ea2f855

Browse files
authored
feat: Add HN title generator example
1 parent a44da43 commit ea2f855

File tree

15 files changed

+1395
-100
lines changed

15 files changed

+1395
-100
lines changed

examples/hn_title_generator/reference_grpo_trainer.py

Lines changed: 435 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# To launch, run the following command from the root directory of the art repository:
2+
# `uv run sky launch examples/hn_title_generator/skypilot-reference-grpo-trainer.yaml --cluster=kyle-hn-title-generator-002 --env-file=.env --yes --retry-until-up --down --idle-minutes-to-autostop 60`
3+
4+
resources:
5+
image_id: pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
6+
cloud: runpod
7+
region: US
8+
accelerators:
9+
- "H100-SXM"
10+
11+
workdir: .
12+
13+
envs:
14+
HF_HUB_ENABLE_HF_TRANSFER: 1
15+
VLLM_CONFIGURE_LOGGING: 0
16+
REWARD_MODEL_URL:
17+
18+
setup: |
19+
apt-get update && apt-get install -y git
20+
21+
curl -LsSf https://astral.sh/uv/install.sh | sh
22+
23+
# Source the environment to make uv available
24+
source $HOME/.local/bin/env
25+
26+
uv pip install --system \
27+
unsloth==2025.3.19 \
28+
vllm==0.8.2 \
29+
bitsandbytes==0.45.4 \
30+
datasets==3.3.2 \
31+
s3fs==2024.12.0 \
32+
hf-transfer==0.1.9 \
33+
typer==0.15.2 \
34+
fastapi==0.115.11 \
35+
python-dotenv==1.0.1 \
36+
polars==1.24.0 \
37+
wandb==0.19.8 \
38+
git+https://github.com/corbt/panza.git \
39+
40+
echo "Setup complete"
41+
42+
run: |
43+
echo "Running train_grpo.py"
44+
uv run python examples/hn_title_generator/reference_grpo_trainer.py
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To launch, run the following command from the root directory of the art repository:
2+
# `uv run sky launch examples/hn_title_generator/skypilot.yaml --cluster=kyle-hn-title-generator-001 --env-file=.env --yes --retry-until-up --down --idle-minutes-to-autostop 60`
3+
4+
workdir: .
5+
resources:
6+
accelerators: ["H100-SXM:1"]
7+
envs:
8+
HF_HUB_ENABLE_HF_TRANSFER: 1
9+
REWARD_MODEL_URL:
10+
11+
setup: |
12+
curl -LsSf https://astral.sh/uv/install.sh | sh
13+
14+
source $HOME/.local/bin/env
15+
16+
uv sync
17+
18+
run: |
19+
echo "Running training script..."
20+
uv run python examples/hn_title_generator/train.py

0 commit comments

Comments
 (0)