Skip to content

Hn title generator #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
435 changes: 435 additions & 0 deletions examples/hn_title_generator/reference_grpo_trainer.py

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions examples/hn_title_generator/skypilot-reference-grpo-trainer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# To launch, run the following command from the root directory of the art repository:
# `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`

resources:
image_id: pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
cloud: runpod
region: US
accelerators:
- "H100-SXM"

workdir: .

envs:
HF_HUB_ENABLE_HF_TRANSFER: 1
VLLM_CONFIGURE_LOGGING: 0
REWARD_MODEL_URL:

setup: |
apt-get update && apt-get install -y git

curl -LsSf https://astral.sh/uv/install.sh | sh

# Source the environment to make uv available
source $HOME/.local/bin/env

uv pip install --system \
unsloth==2025.3.19 \
vllm==0.8.2 \
bitsandbytes==0.45.4 \
datasets==3.3.2 \
s3fs==2024.12.0 \
hf-transfer==0.1.9 \
typer==0.15.2 \
fastapi==0.115.11 \
python-dotenv==1.0.1 \
polars==1.24.0 \
wandb==0.19.8 \
git+https://github.com/corbt/panza.git \

echo "Setup complete"

run: |
echo "Running train_grpo.py"
uv run python examples/hn_title_generator/reference_grpo_trainer.py
20 changes: 20 additions & 0 deletions examples/hn_title_generator/skypilot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To launch, run the following command from the root directory of the art repository:
# `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`

workdir: .
resources:
accelerators: ["H100-SXM:1"]
envs:
HF_HUB_ENABLE_HF_TRANSFER: 1
REWARD_MODEL_URL:

setup: |
curl -LsSf https://astral.sh/uv/install.sh | sh

source $HOME/.local/bin/env

uv sync

run: |
echo "Running training script..."
uv run python examples/hn_title_generator/train.py
Loading