スキル一覧に戻る
chrisvoncsefalvay

funsloth-hfjobs

by chrisvoncsefalvay

The fun way to manage fine-tuning with Unsloth.

4🍴 0📅 2025年12月18日
GitHubで見るManusで実行

SKILL.md


name: funsloth-hfjobs description: Training manager for Hugging Face Jobs - launch fine-tuning on HF cloud GPUs with optional WandB monitoring

Hugging Face Jobs Training Manager

Run Unsloth training on Hugging Face Jobs (cloud GPU training).

Prerequisites

  1. HF Authentication: huggingface-cli whoami (login if needed)
  2. HF Jobs Access: Requires PRO subscription or org compute access
  3. Training notebook/script: From funsloth-train

Workflow

1. Select Hardware

GPUVRAMCostBest For
A10G24GB~$1.50/hr7-14B LoRA
A100 40GB40GB~$4/hr14-34B
A100 80GB80GB~$6/hr70B
H10080GB~$8/hrFastest

See references/HARDWARE_GUIDE.md for model-to-GPU mapping.

2. Convert Notebook to Script

HF Jobs requires PEP 723 script format:

# /// script
# requires-python = ">=3.10"
# dependencies = [
#     "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git",
#     "torch>=2.0",
#     "transformers>=4.45",
#     "trl>=0.12",
#     "peft>=0.13",
#     "datasets>=2.18",
# ]
# ///

Use scripts/train_sft.py as a template.

3. Optional: WandB Integration

Add to script:

import wandb
wandb.init(project="funsloth-training")
# Add report_to="wandb" in TrainingArguments

Set: export WANDB_API_KEY="your-key"

4. Estimate Costs

Use the cost estimator:

python scripts/estimate_cost.py --tokens {total_tokens} --platform hfjobs

5. Launch Job

# Create job config
cat > job_config.yaml << 'EOF'
compute:
  gpu: {gpu_type}
  gpu_count: 1
script: train_hfjobs.py
outputs:
  - /outputs/*
EOF

# Submit
huggingface-cli jobs create --config job_config.yaml

6. Monitor Progress

huggingface-cli jobs status {job_id}
huggingface-cli jobs logs {job_id} --follow

WandB: https://wandb.ai/{username}/funsloth-training

7. Download Artifacts

from huggingface_hub import snapshot_download
snapshot_download(repo_id="{username}/funsloth-job", local_dir="./outputs")

8. Handoff

Offer funsloth-upload for Hub upload with model card.

Error Handling

ErrorResolution
No HF Jobs accessGet PRO subscription
OOMReduce batch size or upgrade GPU
Job timeoutEnable checkpointing
Script errorCheck PEP 723 dependencies

Bundled Resources

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です