[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-huggingface-llm-trainer":3,"mdc-icx822-key":39,"related-org-openai-huggingface-llm-trainer":5476,"related-repo-openai-huggingface-llm-trainer":5683},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":28,"repoUrl":29,"updatedAt":30,"license":31,"forks":32,"topics":33,"repo":34,"sourceUrl":37,"mdContent":38},"huggingface-llm-trainer","train and fine-tune LLMs with TRL","This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs package, UV scripts with PEP 723 format, dataset preparation and validation, hardware selection, cost estimation, Trackio monitoring, Hub authentication, and model persistence. Should be invoked for tasks involving cloud GPU training, GGUF conversion, or when users mention training on Hugging Face Jobs without local GPU setup.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22,25],{"name":13,"slug":14,"type":15},"Hugging Face","hugging-face","tag",{"name":17,"slug":18,"type":15},"LLM","llm",{"name":20,"slug":21,"type":15},"Deep Learning","deep-learning",{"name":23,"slug":24,"type":15},"Python","python",{"name":26,"slug":27,"type":15},"AI Infrastructure","ai-infrastructure",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-06T18:41:51.816513",null,465,[],{"repoUrl":29,"stars":28,"forks":32,"topics":35,"description":36},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fhugging-face\u002Fskills\u002Fllm-trainer","---\nname: huggingface-llm-trainer\ndescription: This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs package, UV scripts with PEP 723 format, dataset preparation and validation, hardware selection, cost estimation, Trackio monitoring, Hub authentication, and model persistence. Should be invoked for tasks involving cloud GPU training, GGUF conversion, or when users mention training on Hugging Face Jobs without local GPU setup.\n---\n\n# TRL Training on Hugging Face Jobs\n\n## Overview\n\nTrain language models using TRL (Transformer Reinforcement Learning) on fully managed Hugging Face infrastructure. No local GPU setup required—models train on cloud GPUs and results are automatically saved to the Hugging Face Hub.\n\n**TRL provides multiple training methods:**\n- **SFT** (Supervised Fine-Tuning) - Standard instruction tuning\n- **DPO** (Direct Preference Optimization) - Alignment from preference data\n- **GRPO** (Group Relative Policy Optimization) - Online RL training\n- **Reward Modeling** - Train reward models for RLHF\n\n**For detailed TRL method documentation:**\n```python\nhf_doc_search(\"your query\", product=\"trl\")\nhf_doc_fetch(\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fsft_trainer\")  # SFT\nhf_doc_fetch(\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fdpo_trainer\")  # DPO\n# etc.\n```\n\n**See also:** `references\u002Ftraining_methods.md` for method overviews and selection guidance\n\n## When to Use This Skill\n\nUse this skill when users want to:\n- Fine-tune language models on cloud GPUs without local infrastructure\n- Train with TRL methods (SFT, DPO, GRPO, etc.)\n- Run training jobs on Hugging Face Jobs infrastructure\n- Convert trained models to GGUF for local deployment (Ollama, LM Studio, llama.cpp)\n- Ensure trained models are permanently saved to the Hub\n- Use modern workflows with optimized defaults\n\n### When to Use Unsloth\n\nUse **Unsloth** (`references\u002Funsloth.md`) instead of standard TRL when:\n- **Limited GPU memory** - Unsloth uses ~60% less VRAM\n- **Speed matters** - Unsloth is ~2x faster\n- Training **large models (>13B)** - memory efficiency is critical\n- Training **Vision-Language Models (VLMs)** - Unsloth has `FastVisionModel` support\n\nSee `references\u002Funsloth.md` for complete Unsloth documentation and `scripts\u002Funsloth_sft_example.py` for a production-ready training script.\n\n## Key Directives\n\nWhen assisting with training jobs:\n\n1. **ALWAYS use `hf_jobs()` MCP tool** - Submit jobs using `hf_jobs(\"uv\", {...})`, NOT bash `trl-jobs` commands. The `script` parameter accepts Python code directly. Do NOT save to local files unless the user explicitly requests it. Pass the script content as a string to `hf_jobs()`. If user asks to \"train a model\", \"fine-tune\", or similar requests, you MUST create the training script AND submit the job immediately using `hf_jobs()`.\n\n2. **Always include Trackio** - Every training script should include Trackio for real-time monitoring. Use example scripts in `scripts\u002F` as templates.\n\n3. **Provide job details after submission** - After submitting, provide job ID, monitoring URL, estimated time, and note that the user can request status checks later.\n\n4. **Use example scripts as templates** - Reference `scripts\u002Ftrain_sft_example.py`, `scripts\u002Ftrain_dpo_example.py`, etc. as starting points.\n\n## Local Script Execution\n\nRepository scripts use PEP 723 inline dependencies. Run them with `uv run`:\n```bash\nuv run scripts\u002Festimate_cost.py --help\nuv run scripts\u002Fdataset_inspector.py --help\n```\n\n## Prerequisites Checklist\n\nBefore starting any training job, verify:\n\n### ✅ **Account & Authentication**\n- Hugging Face Account with [Pro](https:\u002F\u002Fhf.co\u002Fpro), [Team](https:\u002F\u002Fhf.co\u002Fenterprise), or [Enterprise](https:\u002F\u002Fhf.co\u002Fenterprise) plan (Jobs require paid plan)\n- Authenticated login: Check with `hf_whoami()`\n- **HF_TOKEN for Hub Push** ⚠️ CRITICAL - Training environment is ephemeral, must push to Hub or ALL training results are lost\n- Token must have write permissions  \n- **MUST pass `secrets={\"HF_TOKEN\": \"$HF_TOKEN\"}` in job config** to make token available (the `$HF_TOKEN` syntax\n  references your actual token value)\n\n### ✅ **Dataset Requirements**\n- Dataset must exist on Hub or be loadable via `datasets.load_dataset()`\n- Format must match training method (SFT: \"messages\"\u002Ftext\u002Fprompt-completion; DPO: chosen\u002Frejected; GRPO: prompt-only)\n- **ALWAYS validate unknown datasets** before GPU training to prevent format failures (see Dataset Validation section below)\n- Size appropriate for hardware (Demo: 50-100 examples on t4-small; Production: 1K-10K+ on a10g-large\u002Fa100-large)\n\n### ⚠️ **Critical Settings**\n- **Timeout must exceed expected training time** - Default 30min is TOO SHORT for most training. Minimum recommended: 1-2 hours. Job fails and loses all progress if timeout is exceeded.\n- **Hub push must be enabled** - Config: `push_to_hub=True`, `hub_model_id=\"username\u002Fmodel-name\"`; Job: `secrets={\"HF_TOKEN\": \"$HF_TOKEN\"}`\n\n## Asynchronous Job Guidelines\n\n**⚠️ IMPORTANT: Training jobs run asynchronously and can take hours**\n\n### Action Required\n\n**When user requests training:**\n1. **Create the training script** with Trackio included (use `scripts\u002Ftrain_sft_example.py` as template)\n2. **Submit immediately** using `hf_jobs()` MCP tool with script content inline - don't save to file unless user requests\n3. **Report submission** with job ID, monitoring URL, and estimated time\n4. **Wait for user** to request status checks - don't poll automatically\n\n### Ground Rules\n- **Jobs run in background** - Submission returns immediately; training continues independently\n- **Initial logs delayed** - Can take 30-60 seconds for logs to appear\n- **User checks status** - Wait for user to request status updates\n- **Avoid polling** - Check logs only on user request; provide monitoring links instead\n\n### After Submission\n\n**Provide to user:**\n- ✅ Job ID and monitoring URL\n- ✅ Expected completion time\n- ✅ Trackio dashboard URL\n- ✅ Note that user can request status checks later\n\n**Example Response:**\n```\n✅ Job submitted successfully!\n\nJob ID: abc123xyz\nMonitor: https:\u002F\u002Fhuggingface.co\u002Fjobs\u002Fusername\u002Fabc123xyz\n\nExpected time: ~2 hours\nEstimated cost: ~$10\n\nThe job is running in the background. Ask me to check status\u002Flogs when ready!\n```\n\n## Quick Start: Three Approaches\n\n**💡 Tip for Demos:** For quick demos on smaller GPUs (t4-small), omit `eval_dataset` and `eval_strategy` to save ~40% memory. You'll still see training loss and learning progress.\n\n### Sequence Length Configuration\n\n**TRL config classes use `max_length` (not `max_seq_length`)** to control tokenized sequence length:\n\n```python\n# ✅ CORRECT - If you need to set sequence length\nSFTConfig(max_length=512)   # Truncate sequences to 512 tokens\nDPOConfig(max_length=2048)  # Longer context (2048 tokens)\n\n# ❌ WRONG - This parameter doesn't exist\nSFTConfig(max_seq_length=512)  # TypeError!\n```\n\n**Default behavior:** `max_length=1024` (truncates from right). This works well for most training.\n\n**When to override:**\n- **Longer context**: Set higher (e.g., `max_length=2048`)\n- **Memory constraints**: Set lower (e.g., `max_length=512`)\n- **Vision models**: Set `max_length=None` (prevents cutting image tokens)\n\n**Usually you don't need to set this parameter at all** - the examples below use the sensible default.\n\n### Approach 1: UV Scripts (Recommended—Default Choice)\n\nUV scripts use PEP 723 inline dependencies for clean, self-contained training. **This is the primary approach for Codex.**\n\n```python\nhf_jobs(\"uv\", {\n    \"script\": \"\"\"\n# \u002F\u002F\u002F script\n# dependencies = [\"trl>=0.12.0\", \"peft>=0.7.0\", \"trackio\"]\n# \u002F\u002F\u002F\n\nfrom datasets import load_dataset\nfrom peft import LoraConfig\nfrom trl import SFTTrainer, SFTConfig\nimport trackio\n\ndataset = load_dataset(\"trl-lib\u002FCapybara\", split=\"train\")\n\n# Create train\u002Feval split for monitoring\ndataset_split = dataset.train_test_split(test_size=0.1, seed=42)\n\ntrainer = SFTTrainer(\n    model=\"Qwen\u002FQwen2.5-0.5B\",\n    train_dataset=dataset_split[\"train\"],\n    eval_dataset=dataset_split[\"test\"],\n    peft_config=LoraConfig(r=16, lora_alpha=32),\n    args=SFTConfig(\n        output_dir=\"my-model\",\n        push_to_hub=True,\n        hub_model_id=\"username\u002Fmy-model\",\n        num_train_epochs=3,\n        eval_strategy=\"steps\",\n        eval_steps=50,\n        report_to=\"trackio\",\n        project=\"meaningful_prject_name\", # project name for the training name (trackio)\n        run_name=\"meaningful_run_name\",   # descriptive name for the specific training run (trackio)\n    )\n)\n\ntrainer.train()\ntrainer.push_to_hub()\n\"\"\",\n    \"flavor\": \"a10g-large\",\n    \"timeout\": \"2h\",\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}\n})\n```\n\n**Benefits:** Direct MCP tool usage, clean code, dependencies declared inline (PEP 723), no file saving required, full control\n**When to use:** Default choice for all training tasks in Codex, custom training logic, any scenario requiring `hf_jobs()`\n\n#### Working with Scripts\n\n⚠️ **Important:** The `script` parameter accepts either inline code (as shown above) OR a URL. **Local file paths do NOT work.**\n\n**Why local paths don't work:**\nJobs run in isolated Docker containers without access to your local filesystem. Scripts must be:\n- Inline code (recommended for custom training)\n- Publicly accessible URLs\n- Private repo URLs (with HF_TOKEN)\n\n**Common mistakes:**\n```python\n# ❌ These will all fail\nhf_jobs(\"uv\", {\"script\": \"train.py\"})\nhf_jobs(\"uv\", {\"script\": \".\u002Fscripts\u002Ftrain.py\"})\nhf_jobs(\"uv\", {\"script\": \"\u002Fpath\u002Fto\u002Ftrain.py\"})\n```\n\n**Correct approaches:**\n```python\n# ✅ Inline code (recommended)\nhf_jobs(\"uv\", {\"script\": \"# \u002F\u002F\u002F script\\n# dependencies = [...]\\n# \u002F\u002F\u002F\\n\\n\u003Cyour code>\"})\n\n# ✅ From Hugging Face Hub\nhf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fhuggingface.co\u002Fuser\u002Frepo\u002Fresolve\u002Fmain\u002Ftrain.py\"})\n\n# ✅ From GitHub\nhf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fuser\u002Frepo\u002Fmain\u002Ftrain.py\"})\n\n# ✅ From Gist\nhf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fgist.githubusercontent.com\u002Fuser\u002Fid\u002Fraw\u002Ftrain.py\"})\n```\n\n**To use local scripts:** Upload to HF Hub first:\n```bash\nhf repos create my-training-scripts --type model\nhf upload my-training-scripts .\u002Ftrain.py train.py\n# Use: https:\u002F\u002Fhuggingface.co\u002FUSERNAME\u002Fmy-training-scripts\u002Fresolve\u002Fmain\u002Ftrain.py\n```\n\n### Approach 2: TRL Maintained Scripts (Official Examples)\n\nTRL provides battle-tested scripts for all methods. Can be run from URLs:\n\n```python\nhf_jobs(\"uv\", {\n    \"script\": \"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl\u002Fblob\u002Fmain\u002Ftrl\u002Fscripts\u002Fsft.py\",\n    \"script_args\": [\n        \"--model_name_or_path\", \"Qwen\u002FQwen2.5-0.5B\",\n        \"--dataset_name\", \"trl-lib\u002FCapybara\",\n        \"--output_dir\", \"my-model\",\n        \"--push_to_hub\",\n        \"--hub_model_id\", \"username\u002Fmy-model\"\n    ],\n    \"flavor\": \"a10g-large\",\n    \"timeout\": \"2h\",\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}\n})\n```\n\n**Benefits:** No code to write, maintained by TRL team, production-tested\n**When to use:** Standard TRL training, quick experiments, don't need custom code\n**Available:** Scripts are available from https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl\u002Ftree\u002Fmain\u002Fexamples\u002Fscripts\n\n### Finding More UV Scripts on Hub\n\nThe `uv-scripts` organization provides ready-to-use UV scripts stored as datasets on Hugging Face Hub:\n\n```python\n# Discover available UV script collections\ndataset_search({\"author\": \"uv-scripts\", \"sort\": \"downloads\", \"limit\": 20})\n\n# Explore a specific collection\nhub_repo_details([\"uv-scripts\u002Fclassification\"], repo_type=\"dataset\", include_readme=True)\n```\n\n**Popular collections:** ocr, classification, synthetic-data, vllm, dataset-creation\n\n### Approach 3: HF Jobs CLI (Direct Terminal Commands)\n\nWhen the `hf_jobs()` MCP tool is unavailable, use the `hf jobs` CLI directly.\n\n**⚠️ CRITICAL: CLI Syntax Rules**\n\n```bash\n# ✅ CORRECT syntax - flags BEFORE script URL\nhf jobs uv run --flavor a10g-large --timeout 2h --secrets HF_TOKEN \"https:\u002F\u002Fexample.com\u002Ftrain.py\"\n\n# ❌ WRONG - \"run uv\" instead of \"uv run\"\nhf jobs run uv \"https:\u002F\u002Fexample.com\u002Ftrain.py\" --flavor a10g-large\n\n# ❌ WRONG - flags AFTER script URL (will be ignored!)\nhf jobs uv run \"https:\u002F\u002Fexample.com\u002Ftrain.py\" --flavor a10g-large\n\n# ❌ WRONG - \"--secret\" instead of \"--secrets\" (plural)\nhf jobs uv run --secret HF_TOKEN \"https:\u002F\u002Fexample.com\u002Ftrain.py\"\n```\n\n**Key syntax rules:**\n1. Command order is `hf jobs uv run` (NOT `hf jobs run uv`)\n2. All flags (`--flavor`, `--timeout`, `--secrets`) must come BEFORE the script URL\n3. Use `--secrets` (plural), not `--secret`\n4. Script URL must be the last positional argument\n\n**Complete CLI example:**\n```bash\nhf jobs uv run \\\n  --flavor a10g-large \\\n  --timeout 2h \\\n  --secrets HF_TOKEN \\\n  \"https:\u002F\u002Fhuggingface.co\u002Fuser\u002Frepo\u002Fresolve\u002Fmain\u002Ftrain.py\"\n```\n\n**Check job status via CLI:**\n```bash\nhf jobs ps                        # List all jobs\nhf jobs logs \u003Cjob-id>             # View logs\nhf jobs inspect \u003Cjob-id>          # Job details\nhf jobs cancel \u003Cjob-id>           # Cancel a job\n```\n\n### Approach 4: TRL Jobs Package (Simplified Training)\n\nThe `trl-jobs` package provides optimized defaults and one-liner training.\n\n```bash\nuvx trl-jobs sft \\\n  --model_name Qwen\u002FQwen2.5-0.5B \\\n  --dataset_name trl-lib\u002FCapybara\n\n```\n\n**Benefits:** Pre-configured settings, automatic Trackio integration, automatic Hub push, one-line commands\n**When to use:** User working in terminal directly (not Codex context), quick local experimentation\n**Repository:** https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl-jobs\n\n⚠️ **In Codex context, prefer using `hf_jobs()` MCP tool (Approach 1) when available.**\n\n## Hardware Selection\n\n| Model Size | Recommended Hardware | Cost (approx\u002Fhr) | Use Case |\n|------------|---------------------|------------------|----------|\n| \u003C1B params | `t4-small` | ~$0.75 | Demos, quick tests only without eval steps |\n| 1-3B params | `t4-medium`, `l4x1` | ~$1.50-2.50 | Development |\n| 3-7B params | `a10g-small`, `a10g-large` | ~$3.50-5.00 | Production training |\n| 7-13B params | `a10g-large`, `a100-large` | ~$5-10 | Large models (use LoRA) |\n| 13B+ params | `a100-large`, `a10g-largex2` | ~$10-20 | Very large (use LoRA) |\n\n**GPU Flavors:** cpu-basic\u002Fupgrade\u002Fperformance\u002Fxl, t4-small\u002Fmedium, l4x1\u002Fx4, a10g-small\u002Flarge\u002Flargex2\u002Flargex4, a100-large, h100\u002Fh100x8\n\n**Guidelines:**\n- Use **LoRA\u002FPEFT** for models >7B to reduce memory\n- Multi-GPU automatically handled by TRL\u002FAccelerate\n- Start with smaller hardware for testing\n\n**See:** `references\u002Fhardware_guide.md` for detailed specifications\n\n## Critical: Saving Results to Hub\n\n**⚠️ EPHEMERAL ENVIRONMENT—MUST PUSH TO HUB**\n\nThe Jobs environment is temporary. All files are deleted when the job ends. If the model isn't pushed to Hub, **ALL TRAINING IS LOST**.\n\n### Required Configuration\n\n**In training script\u002Fconfig:**\n```python\nSFTConfig(\n    push_to_hub=True,\n    hub_model_id=\"username\u002Fmodel-name\",  # MUST specify\n    hub_strategy=\"every_save\",  # Optional: push checkpoints\n)\n```\n\n**In job submission:**\n```python\n{\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}  # Enables authentication\n}\n```\n\n### Verification Checklist\n\nBefore submitting:\n- [ ] `push_to_hub=True` set in config\n- [ ] `hub_model_id` includes username\u002Frepo-name\n- [ ] `secrets` parameter includes HF_TOKEN\n- [ ] User has write access to target repo\n\n**See:** `references\u002Fhub_saving.md` for detailed troubleshooting\n\n## Timeout Management\n\n**⚠️ DEFAULT: 30 MINUTES—TOO SHORT FOR TRAINING**\n\n### Setting Timeouts\n\n```python\n{\n    \"timeout\": \"2h\"   # 2 hours (formats: \"90m\", \"2h\", \"1.5h\", or seconds as integer)\n}\n```\n\n### Timeout Guidelines\n\n| Scenario | Recommended | Notes |\n|----------|-------------|-------|\n| Quick demo (50-100 examples) | 10-30 min | Verify setup |\n| Development training | 1-2 hours | Small datasets |\n| Production (3-7B model) | 4-6 hours | Full datasets |\n| Large model with LoRA | 3-6 hours | Depends on dataset |\n\n**Always add 20-30% buffer** for model\u002Fdataset loading, checkpoint saving, Hub push operations, and network delays.\n\n**On timeout:** Job killed immediately, all unsaved progress lost, must restart from beginning\n\n## Cost Estimation\n\n**Offer to estimate cost when planning jobs with known parameters.** Use `scripts\u002Festimate_cost.py`:\n\n```bash\nuv run scripts\u002Festimate_cost.py \\\n  --model meta-llama\u002FLlama-2-7b-hf \\\n  --dataset trl-lib\u002FCapybara \\\n  --hardware a10g-large \\\n  --dataset-size 16000 \\\n  --epochs 3\n```\n\nOutput includes estimated time, cost, recommended timeout (with buffer), and optimization suggestions.\n\n**When to offer:** User planning a job, asks about cost\u002Ftime, choosing hardware, job will run >1 hour or cost >$5\n\n## Example Training Scripts\n\n**Production-ready templates with all best practices:**\n\nLoad these scripts for correctly:\n\n- **`scripts\u002Ftrain_sft_example.py`** - Complete SFT training with Trackio, LoRA, checkpoints\n- **`scripts\u002Ftrain_dpo_example.py`** - DPO training for preference learning\n- **`scripts\u002Ftrain_grpo_example.py`** - GRPO training for online RL\n\nThese scripts demonstrate proper Hub saving, Trackio integration, checkpoint management, and optimized parameters. Pass their content inline to `hf_jobs()` or use as templates for custom scripts.\n\n## Monitoring and Tracking\n\n**Trackio** provides real-time metrics visualization. See `references\u002Ftrackio_guide.md` for complete setup guide.\n\n**Key points:**\n- Add `trackio` to dependencies\n- Configure trainer with `report_to=\"trackio\" and run_name=\"meaningful_name\"`\n\n### Trackio Configuration Defaults\n\n**Use sensible defaults unless user specifies otherwise.** When generating training scripts with Trackio:\n\n**Default Configuration:**\n- **Space ID**: `{username}\u002Ftrackio` (use \"trackio\" as default space name)\n- **Run naming**: Unless otherwise specified, name the run in a way the user will recognize (e.g., descriptive of the task, model, or purpose)\n- **Config**: Keep minimal - only include hyperparameters and model\u002Fdataset info\n- **Project Name**: Use a Project Name to associate runs with a particular Project \n\n**User overrides:** If user requests specific trackio configuration (custom space, run naming, grouping, or additional config), apply their preferences instead of defaults.\n\n\nThis is useful for managing multiple jobs with the same configuration or keeping training scripts portable.\n\nSee `references\u002Ftrackio_guide.md` for complete documentation including grouping runs for experiments.\n\n### Check Job Status\n\n```python\n# List all jobs\nhf_jobs(\"ps\")\n\n# Inspect specific job\nhf_jobs(\"inspect\", {\"job_id\": \"your-job-id\"})\n\n# View logs\nhf_jobs(\"logs\", {\"job_id\": \"your-job-id\"})\n```\n\n**Remember:** Wait for user to request status checks. Avoid polling repeatedly.\n\n## Dataset Validation\n\n**Validate dataset format BEFORE launching GPU training to prevent the #1 cause of training failures: format mismatches.**\n\n### Why Validate\n\n- 50%+ of training failures are due to dataset format issues\n- DPO especially strict: requires exact column names (`prompt`, `chosen`, `rejected`)\n- Failed GPU jobs waste $1-10 and 30-60 minutes\n- Validation on CPU costs ~$0.01 and takes \u003C1 minute\n\n### When to Validate\n\n**ALWAYS validate for:**\n- Unknown or custom datasets\n- DPO training (CRITICAL - 90% of datasets need mapping)\n- Any dataset not explicitly TRL-compatible\n\n**Skip validation for known TRL datasets:**\n- `trl-lib\u002Fultrachat_200k`, `trl-lib\u002FCapybara`, `HuggingFaceH4\u002Fultrachat_200k`, etc.\n\n### Usage\n\n```python\nhf_jobs(\"uv\", {\n    \"script\": \"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py\",\n    \"script_args\": [\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"]\n})\n```\n\nThe script is fast, and will usually complete synchronously.\n\n### Reading Results\n\nThe output shows compatibility for each training method:\n\n- **`✓ READY`** - Dataset is compatible, use directly\n- **`✗ NEEDS MAPPING`** - Compatible but needs preprocessing (mapping code provided)\n- **`✗ INCOMPATIBLE`** - Cannot be used for this method\n\nWhen mapping is needed, the output includes a **\"MAPPING CODE\"** section with copy-paste ready Python code.\n\n### Example Workflow\n\n```python\n# 1. Inspect dataset (costs ~$0.01, \u003C1 min on CPU)\nhf_jobs(\"uv\", {\n    \"script\": \"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py\",\n    \"script_args\": [\"--dataset\", \"argilla\u002Fdistilabel-math-preference-dpo\", \"--split\", \"train\"]\n})\n\n# 2. Check output markers:\n#    ✓ READY → proceed with training\n#    ✗ NEEDS MAPPING → apply mapping code below\n#    ✗ INCOMPATIBLE → choose different method\u002Fdataset\n\n# 3. If mapping needed, apply before training:\ndef format_for_dpo(example):\n    return {\n        'prompt': example['instruction'],\n        'chosen': example['chosen_response'],\n        'rejected': example['rejected_response'],\n    }\ndataset = dataset.map(format_for_dpo, remove_columns=dataset.column_names)\n\n# 4. Launch training job with confidence\n```\n\n### Common Scenario: DPO Format Mismatch\n\nMost DPO datasets use non-standard column names. Example:\n\n```\nDataset has: instruction, chosen_response, rejected_response\nDPO expects: prompt, chosen, rejected\n```\n\nThe validator detects this and provides exact mapping code to fix it.\n\n## Converting Models to GGUF\n\nAfter training, convert models to **GGUF format** for use with llama.cpp, Ollama, LM Studio, and other local inference tools.\n\n**What is GGUF:**\n- Optimized for CPU\u002FGPU inference with llama.cpp\n- Supports quantization (4-bit, 5-bit, 8-bit) to reduce model size\n- Compatible with Ollama, LM Studio, Jan, GPT4All, llama.cpp\n- Typically 2-8GB for 7B models (vs 14GB unquantized)\n\n**When to convert:**\n- Running models locally with Ollama or LM Studio\n- Reducing model size with quantization\n- Deploying to edge devices\n- Sharing models for local-first use\n\n**See:** `references\u002Fgguf_conversion.md` for complete conversion guide, including production-ready conversion script, quantization options, hardware requirements, usage examples, and troubleshooting.\n\n**Quick conversion:**\n```python\nhf_jobs(\"uv\", {\n    \"script\": \"\u003Csee references\u002Fgguf_conversion.md for complete script>\",\n    \"flavor\": \"a10g-large\",\n    \"timeout\": \"45m\",\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"},\n    \"env\": {\n        \"ADAPTER_MODEL\": \"username\u002Fmy-finetuned-model\",\n        \"BASE_MODEL\": \"Qwen\u002FQwen2.5-0.5B\",\n        \"OUTPUT_REPO\": \"username\u002Fmy-model-gguf\"\n    }\n})\n```\n\n## Common Training Patterns\n\nSee `references\u002Ftraining_patterns.md` for detailed examples including:\n- Quick demo (5-10 minutes)\n- Production with checkpoints\n- Multi-GPU training\n- DPO training (preference learning)\n- GRPO training (online RL)\n\n## Common Failure Modes\n\n### Out of Memory (OOM)\n\n**Fix (try in order):**\n1. Reduce batch size: `per_device_train_batch_size=1`, increase `gradient_accumulation_steps=8`. Effective batch size is `per_device_train_batch_size` x `gradient_accumulation_steps`. For best performance keep effective batch size close to 128. \n2. Enable: `gradient_checkpointing=True`\n3. Upgrade hardware: t4-small → l4x1, a10g-small → a10g-large etc. \n\n### Dataset Misformatted\n\n**Fix:**\n1. Validate first with dataset inspector:\n   ```bash\n   uv run https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py \\\n     --dataset name --split train\n   ```\n2. Check output for compatibility markers (✓ READY, ✗ NEEDS MAPPING, ✗ INCOMPATIBLE)\n3. Apply mapping code from inspector output if needed\n\n### Job Timeout\n\n**Fix:**\n1. Check logs for actual runtime: `hf_jobs(\"logs\", {\"job_id\": \"...\"})`\n2. Increase timeout with buffer: `\"timeout\": \"3h\"` (add 30% to estimated time)\n3. Or reduce training: lower `num_train_epochs`, use smaller dataset, enable `max_steps`\n4. Save checkpoints: `save_strategy=\"steps\"`, `save_steps=500`, `hub_strategy=\"every_save\"`\n\n**Note:** Default 30min is insufficient for real training. Minimum 1-2 hours.\n\n### Hub Push Failures\n\n**Fix:**\n1. Add to job: `secrets={\"HF_TOKEN\": \"$HF_TOKEN\"}`\n2. Add to config: `push_to_hub=True`, `hub_model_id=\"username\u002Fmodel-name\"`\n3. Verify auth: `hf_whoami()`\n4. Check token has write permissions and repo exists (or set `hub_private_repo=True`)\n\n### Missing Dependencies\n\n**Fix:**\nAdd to PEP 723 header:\n```python\n# \u002F\u002F\u002F script\n# dependencies = [\"trl>=0.12.0\", \"peft>=0.7.0\", \"trackio\", \"missing-package\"]\n# \u002F\u002F\u002F\n```\n\n## Troubleshooting\n\n**Common issues:**\n- Job times out → Increase timeout, reduce epochs\u002Fdataset, use smaller model\u002FLoRA\n- Model not saved to Hub → Check push_to_hub=True, hub_model_id, secrets=HF_TOKEN\n- Out of Memory (OOM) → Reduce batch size, increase gradient accumulation, enable LoRA, use larger GPU\n- Dataset format error → Validate with dataset inspector (see Dataset Validation section)\n- Import\u002Fmodule errors → Add PEP 723 header with dependencies, verify format\n- Authentication errors → Check `hf_whoami()`, token permissions, secrets parameter\n\n**See:** `references\u002Ftroubleshooting.md` for complete troubleshooting guide\n\n## Resources\n\n### References (In This Skill)\n- `references\u002Ftraining_methods.md` - Overview of SFT, DPO, GRPO, KTO, PPO, Reward Modeling\n- `references\u002Ftraining_patterns.md` - Common training patterns and examples\n- `references\u002Funsloth.md` - Unsloth for fast VLM training (~2x speed, 60% less VRAM)\n- `references\u002Fgguf_conversion.md` - Complete GGUF conversion guide\n- `references\u002Ftrackio_guide.md` - Trackio monitoring setup\n- `references\u002Fhardware_guide.md` - Hardware specs and selection\n- `references\u002Fhub_saving.md` - Hub authentication troubleshooting\n- `references\u002Ftroubleshooting.md` - Common issues and solutions\n- `references\u002Flocal_training_macos.md` - Local training on macOS\n\n### Scripts (In This Skill)\n- `scripts\u002Ftrain_sft_example.py` - Production SFT template\n- `scripts\u002Ftrain_dpo_example.py` - Production DPO template\n- `scripts\u002Ftrain_grpo_example.py` - Production GRPO template\n- `scripts\u002Funsloth_sft_example.py` - Unsloth text LLM training template (faster, less VRAM)\n- `scripts\u002Festimate_cost.py` - Estimate time and cost (offer when appropriate)\n- `scripts\u002Fconvert_to_gguf.py` - Complete GGUF conversion script\n\n### External Scripts\n- [Dataset Inspector](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py) - Validate dataset format before training (use via `uv run` or `hf_jobs`)\n\n### External Links\n- [TRL Documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl)\n- [TRL Jobs Training Guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fen\u002Fjobs_training)\n- [TRL Jobs Package](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl-jobs)\n- [HF Jobs Documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fguides\u002Fjobs)\n- [TRL Example Scripts](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl\u002Ftree\u002Fmain\u002Fexamples\u002Fscripts)\n- [UV Scripts Guide](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fguides\u002Fscripts\u002F)\n- [UV Scripts Organization](https:\u002F\u002Fhuggingface.co\u002Fuv-scripts)\n\n## Key Takeaways\n\n1. **Submit scripts inline** - The `script` parameter accepts Python code directly; no file saving required unless user requests\n2. **Jobs are asynchronous** - Don't wait\u002Fpoll; let user check when ready\n3. **Always set timeout** - Default 30 min is insufficient; minimum 1-2 hours recommended\n4. **Always enable Hub push** - Environment is ephemeral; without push, all results lost\n5. **Include Trackio** - Use example scripts as templates for real-time monitoring\n6. **Offer cost estimation** - When parameters are known, use `scripts\u002Festimate_cost.py`\n7. **Use UV scripts (Approach 1)** - Default to `hf_jobs(\"uv\", {...})` with inline scripts; TRL maintained scripts for standard training; avoid bash `trl-jobs` commands in Codex\n8. **Use hf_doc_fetch\u002Fhf_doc_search** for latest TRL documentation\n9. **Validate dataset format** before training with dataset inspector (see Dataset Validation section)\n10. **Choose appropriate hardware** for model size; use LoRA for models >7B\n",{"data":40,"body":41},{"name":4,"description":6},{"type":42,"children":43},"root",[44,53,60,66,75,120,128,177,195,201,206,239,246,266,320,340,346,351,465,471,484,538,544,549,560,647,657,691,702,745,751,759,765,773,830,836,879,885,893,916,924,934,940,966,972,998,1056,1073,1081,1136,1146,1152,1162,1536,1558,1565,1588,1598,1616,1624,1663,1671,1763,1773,1848,1854,1859,1965,1993,1999,2012,2058,2068,2074,2094,2102,2349,2357,2429,2437,2534,2542,2685,2691,2702,2761,2788,2804,2810,3009,3019,3027,3051,3068,3074,3082,3093,3099,3107,3153,3161,3192,3198,3203,3267,3283,3289,3297,3303,3332,3338,3437,3447,3457,3463,3480,3587,3592,3602,3608,3616,3621,3664,3676,3682,3700,3708,3735,3741,3751,3759,3810,3820,3825,3836,3842,3911,3921,3927,3935,3941,3985,3991,3999,4017,4025,4053,4059,4096,4101,4107,4112,4157,4169,4175,4344,4350,4355,4364,4369,4375,4387,4395,4418,4426,4449,4465,4473,4564,4570,4582,4610,4616,4622,4630,4686,4692,4700,4767,4773,4780,4851,4861,4867,4874,4925,4931,4940,4977,4983,4991,5031,5047,5053,5059,5153,5159,5223,5229,5258,5264,5335,5341,5470],{"type":45,"tag":46,"props":47,"children":49},"element","h1",{"id":48},"trl-training-on-hugging-face-jobs",[50],{"type":51,"value":52},"text","TRL Training on Hugging Face Jobs",{"type":45,"tag":54,"props":55,"children":57},"h2",{"id":56},"overview",[58],{"type":51,"value":59},"Overview",{"type":45,"tag":61,"props":62,"children":63},"p",{},[64],{"type":51,"value":65},"Train language models using TRL (Transformer Reinforcement Learning) on fully managed Hugging Face infrastructure. No local GPU setup required—models train on cloud GPUs and results are automatically saved to the Hugging Face Hub.",{"type":45,"tag":61,"props":67,"children":68},{},[69],{"type":45,"tag":70,"props":71,"children":72},"strong",{},[73],{"type":51,"value":74},"TRL provides multiple training methods:",{"type":45,"tag":76,"props":77,"children":78},"ul",{},[79,90,100,110],{"type":45,"tag":80,"props":81,"children":82},"li",{},[83,88],{"type":45,"tag":70,"props":84,"children":85},{},[86],{"type":51,"value":87},"SFT",{"type":51,"value":89}," (Supervised Fine-Tuning) - Standard instruction tuning",{"type":45,"tag":80,"props":91,"children":92},{},[93,98],{"type":45,"tag":70,"props":94,"children":95},{},[96],{"type":51,"value":97},"DPO",{"type":51,"value":99}," (Direct Preference Optimization) - Alignment from preference data",{"type":45,"tag":80,"props":101,"children":102},{},[103,108],{"type":45,"tag":70,"props":104,"children":105},{},[106],{"type":51,"value":107},"GRPO",{"type":51,"value":109}," (Group Relative Policy Optimization) - Online RL training",{"type":45,"tag":80,"props":111,"children":112},{},[113,118],{"type":45,"tag":70,"props":114,"children":115},{},[116],{"type":51,"value":117},"Reward Modeling",{"type":51,"value":119}," - Train reward models for RLHF",{"type":45,"tag":61,"props":121,"children":122},{},[123],{"type":45,"tag":70,"props":124,"children":125},{},[126],{"type":51,"value":127},"For detailed TRL method documentation:",{"type":45,"tag":129,"props":130,"children":134},"pre",{"className":131,"code":132,"language":24,"meta":133,"style":133},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","hf_doc_search(\"your query\", product=\"trl\")\nhf_doc_fetch(\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fsft_trainer\")  # SFT\nhf_doc_fetch(\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fdpo_trainer\")  # DPO\n# etc.\n","",[135],{"type":45,"tag":136,"props":137,"children":138},"code",{"__ignoreMap":133},[139,150,159,168],{"type":45,"tag":140,"props":141,"children":144},"span",{"class":142,"line":143},"line",1,[145],{"type":45,"tag":140,"props":146,"children":147},{},[148],{"type":51,"value":149},"hf_doc_search(\"your query\", product=\"trl\")\n",{"type":45,"tag":140,"props":151,"children":153},{"class":142,"line":152},2,[154],{"type":45,"tag":140,"props":155,"children":156},{},[157],{"type":51,"value":158},"hf_doc_fetch(\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fsft_trainer\")  # SFT\n",{"type":45,"tag":140,"props":160,"children":162},{"class":142,"line":161},3,[163],{"type":45,"tag":140,"props":164,"children":165},{},[166],{"type":51,"value":167},"hf_doc_fetch(\"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fdpo_trainer\")  # DPO\n",{"type":45,"tag":140,"props":169,"children":171},{"class":142,"line":170},4,[172],{"type":45,"tag":140,"props":173,"children":174},{},[175],{"type":51,"value":176},"# etc.\n",{"type":45,"tag":61,"props":178,"children":179},{},[180,185,187,193],{"type":45,"tag":70,"props":181,"children":182},{},[183],{"type":51,"value":184},"See also:",{"type":51,"value":186}," ",{"type":45,"tag":136,"props":188,"children":190},{"className":189},[],[191],{"type":51,"value":192},"references\u002Ftraining_methods.md",{"type":51,"value":194}," for method overviews and selection guidance",{"type":45,"tag":54,"props":196,"children":198},{"id":197},"when-to-use-this-skill",[199],{"type":51,"value":200},"When to Use This Skill",{"type":45,"tag":61,"props":202,"children":203},{},[204],{"type":51,"value":205},"Use this skill when users want to:",{"type":45,"tag":76,"props":207,"children":208},{},[209,214,219,224,229,234],{"type":45,"tag":80,"props":210,"children":211},{},[212],{"type":51,"value":213},"Fine-tune language models on cloud GPUs without local infrastructure",{"type":45,"tag":80,"props":215,"children":216},{},[217],{"type":51,"value":218},"Train with TRL methods (SFT, DPO, GRPO, etc.)",{"type":45,"tag":80,"props":220,"children":221},{},[222],{"type":51,"value":223},"Run training jobs on Hugging Face Jobs infrastructure",{"type":45,"tag":80,"props":225,"children":226},{},[227],{"type":51,"value":228},"Convert trained models to GGUF for local deployment (Ollama, LM Studio, llama.cpp)",{"type":45,"tag":80,"props":230,"children":231},{},[232],{"type":51,"value":233},"Ensure trained models are permanently saved to the Hub",{"type":45,"tag":80,"props":235,"children":236},{},[237],{"type":51,"value":238},"Use modern workflows with optimized defaults",{"type":45,"tag":240,"props":241,"children":243},"h3",{"id":242},"when-to-use-unsloth",[244],{"type":51,"value":245},"When to Use Unsloth",{"type":45,"tag":61,"props":247,"children":248},{},[249,251,256,258,264],{"type":51,"value":250},"Use ",{"type":45,"tag":70,"props":252,"children":253},{},[254],{"type":51,"value":255},"Unsloth",{"type":51,"value":257}," (",{"type":45,"tag":136,"props":259,"children":261},{"className":260},[],[262],{"type":51,"value":263},"references\u002Funsloth.md",{"type":51,"value":265},") instead of standard TRL when:",{"type":45,"tag":76,"props":267,"children":268},{},[269,279,289,301],{"type":45,"tag":80,"props":270,"children":271},{},[272,277],{"type":45,"tag":70,"props":273,"children":274},{},[275],{"type":51,"value":276},"Limited GPU memory",{"type":51,"value":278}," - Unsloth uses ~60% less VRAM",{"type":45,"tag":80,"props":280,"children":281},{},[282,287],{"type":45,"tag":70,"props":283,"children":284},{},[285],{"type":51,"value":286},"Speed matters",{"type":51,"value":288}," - Unsloth is ~2x faster",{"type":45,"tag":80,"props":290,"children":291},{},[292,294,299],{"type":51,"value":293},"Training ",{"type":45,"tag":70,"props":295,"children":296},{},[297],{"type":51,"value":298},"large models (>13B)",{"type":51,"value":300}," - memory efficiency is critical",{"type":45,"tag":80,"props":302,"children":303},{},[304,305,310,312,318],{"type":51,"value":293},{"type":45,"tag":70,"props":306,"children":307},{},[308],{"type":51,"value":309},"Vision-Language Models (VLMs)",{"type":51,"value":311}," - Unsloth has ",{"type":45,"tag":136,"props":313,"children":315},{"className":314},[],[316],{"type":51,"value":317},"FastVisionModel",{"type":51,"value":319}," support",{"type":45,"tag":61,"props":321,"children":322},{},[323,325,330,332,338],{"type":51,"value":324},"See ",{"type":45,"tag":136,"props":326,"children":328},{"className":327},[],[329],{"type":51,"value":263},{"type":51,"value":331}," for complete Unsloth documentation and ",{"type":45,"tag":136,"props":333,"children":335},{"className":334},[],[336],{"type":51,"value":337},"scripts\u002Funsloth_sft_example.py",{"type":51,"value":339}," for a production-ready training script.",{"type":45,"tag":54,"props":341,"children":343},{"id":342},"key-directives",[344],{"type":51,"value":345},"Key Directives",{"type":45,"tag":61,"props":347,"children":348},{},[349],{"type":51,"value":350},"When assisting with training jobs:",{"type":45,"tag":352,"props":353,"children":354},"ol",{},[355,411,429,439],{"type":45,"tag":80,"props":356,"children":357},{},[358,371,373,379,381,387,389,395,397,402,404,409],{"type":45,"tag":70,"props":359,"children":360},{},[361,363,369],{"type":51,"value":362},"ALWAYS use ",{"type":45,"tag":136,"props":364,"children":366},{"className":365},[],[367],{"type":51,"value":368},"hf_jobs()",{"type":51,"value":370}," MCP tool",{"type":51,"value":372}," - Submit jobs using ",{"type":45,"tag":136,"props":374,"children":376},{"className":375},[],[377],{"type":51,"value":378},"hf_jobs(\"uv\", {...})",{"type":51,"value":380},", NOT bash ",{"type":45,"tag":136,"props":382,"children":384},{"className":383},[],[385],{"type":51,"value":386},"trl-jobs",{"type":51,"value":388}," commands. The ",{"type":45,"tag":136,"props":390,"children":392},{"className":391},[],[393],{"type":51,"value":394},"script",{"type":51,"value":396}," parameter accepts Python code directly. Do NOT save to local files unless the user explicitly requests it. Pass the script content as a string to ",{"type":45,"tag":136,"props":398,"children":400},{"className":399},[],[401],{"type":51,"value":368},{"type":51,"value":403},". If user asks to \"train a model\", \"fine-tune\", or similar requests, you MUST create the training script AND submit the job immediately using ",{"type":45,"tag":136,"props":405,"children":407},{"className":406},[],[408],{"type":51,"value":368},{"type":51,"value":410},".",{"type":45,"tag":80,"props":412,"children":413},{},[414,419,421,427],{"type":45,"tag":70,"props":415,"children":416},{},[417],{"type":51,"value":418},"Always include Trackio",{"type":51,"value":420}," - Every training script should include Trackio for real-time monitoring. Use example scripts in ",{"type":45,"tag":136,"props":422,"children":424},{"className":423},[],[425],{"type":51,"value":426},"scripts\u002F",{"type":51,"value":428}," as templates.",{"type":45,"tag":80,"props":430,"children":431},{},[432,437],{"type":45,"tag":70,"props":433,"children":434},{},[435],{"type":51,"value":436},"Provide job details after submission",{"type":51,"value":438}," - After submitting, provide job ID, monitoring URL, estimated time, and note that the user can request status checks later.",{"type":45,"tag":80,"props":440,"children":441},{},[442,447,449,455,457,463],{"type":45,"tag":70,"props":443,"children":444},{},[445],{"type":51,"value":446},"Use example scripts as templates",{"type":51,"value":448}," - Reference ",{"type":45,"tag":136,"props":450,"children":452},{"className":451},[],[453],{"type":51,"value":454},"scripts\u002Ftrain_sft_example.py",{"type":51,"value":456},", ",{"type":45,"tag":136,"props":458,"children":460},{"className":459},[],[461],{"type":51,"value":462},"scripts\u002Ftrain_dpo_example.py",{"type":51,"value":464},", etc. as starting points.",{"type":45,"tag":54,"props":466,"children":468},{"id":467},"local-script-execution",[469],{"type":51,"value":470},"Local Script Execution",{"type":45,"tag":61,"props":472,"children":473},{},[474,476,482],{"type":51,"value":475},"Repository scripts use PEP 723 inline dependencies. Run them with ",{"type":45,"tag":136,"props":477,"children":479},{"className":478},[],[480],{"type":51,"value":481},"uv run",{"type":51,"value":483},":",{"type":45,"tag":129,"props":485,"children":489},{"className":486,"code":487,"language":488,"meta":133,"style":133},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","uv run scripts\u002Festimate_cost.py --help\nuv run scripts\u002Fdataset_inspector.py --help\n","bash",[490],{"type":45,"tag":136,"props":491,"children":492},{"__ignoreMap":133},[493,518],{"type":45,"tag":140,"props":494,"children":495},{"class":142,"line":143},[496,502,508,513],{"type":45,"tag":140,"props":497,"children":499},{"style":498},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[500],{"type":51,"value":501},"uv",{"type":45,"tag":140,"props":503,"children":505},{"style":504},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[506],{"type":51,"value":507}," run",{"type":45,"tag":140,"props":509,"children":510},{"style":504},[511],{"type":51,"value":512}," scripts\u002Festimate_cost.py",{"type":45,"tag":140,"props":514,"children":515},{"style":504},[516],{"type":51,"value":517}," --help\n",{"type":45,"tag":140,"props":519,"children":520},{"class":142,"line":152},[521,525,529,534],{"type":45,"tag":140,"props":522,"children":523},{"style":498},[524],{"type":51,"value":501},{"type":45,"tag":140,"props":526,"children":527},{"style":504},[528],{"type":51,"value":507},{"type":45,"tag":140,"props":530,"children":531},{"style":504},[532],{"type":51,"value":533}," scripts\u002Fdataset_inspector.py",{"type":45,"tag":140,"props":535,"children":536},{"style":504},[537],{"type":51,"value":517},{"type":45,"tag":54,"props":539,"children":541},{"id":540},"prerequisites-checklist",[542],{"type":51,"value":543},"Prerequisites Checklist",{"type":45,"tag":61,"props":545,"children":546},{},[547],{"type":51,"value":548},"Before starting any training job, verify:",{"type":45,"tag":240,"props":550,"children":552},{"id":551},"account-authentication",[553,555],{"type":51,"value":554},"✅ ",{"type":45,"tag":70,"props":556,"children":557},{},[558],{"type":51,"value":559},"Account & Authentication",{"type":45,"tag":76,"props":561,"children":562},{},[563,595,606,616,621],{"type":45,"tag":80,"props":564,"children":565},{},[566,568,577,578,585,587,593],{"type":51,"value":567},"Hugging Face Account with ",{"type":45,"tag":569,"props":570,"children":574},"a",{"href":571,"rel":572},"https:\u002F\u002Fhf.co\u002Fpro",[573],"nofollow",[575],{"type":51,"value":576},"Pro",{"type":51,"value":456},{"type":45,"tag":569,"props":579,"children":582},{"href":580,"rel":581},"https:\u002F\u002Fhf.co\u002Fenterprise",[573],[583],{"type":51,"value":584},"Team",{"type":51,"value":586},", or ",{"type":45,"tag":569,"props":588,"children":590},{"href":580,"rel":589},[573],[591],{"type":51,"value":592},"Enterprise",{"type":51,"value":594}," plan (Jobs require paid plan)",{"type":45,"tag":80,"props":596,"children":597},{},[598,600],{"type":51,"value":599},"Authenticated login: Check with ",{"type":45,"tag":136,"props":601,"children":603},{"className":602},[],[604],{"type":51,"value":605},"hf_whoami()",{"type":45,"tag":80,"props":607,"children":608},{},[609,614],{"type":45,"tag":70,"props":610,"children":611},{},[612],{"type":51,"value":613},"HF_TOKEN for Hub Push",{"type":51,"value":615}," ⚠️ CRITICAL - Training environment is ephemeral, must push to Hub or ALL training results are lost",{"type":45,"tag":80,"props":617,"children":618},{},[619],{"type":51,"value":620},"Token must have write permissions",{"type":45,"tag":80,"props":622,"children":623},{},[624,637,639,645],{"type":45,"tag":70,"props":625,"children":626},{},[627,629,635],{"type":51,"value":628},"MUST pass ",{"type":45,"tag":136,"props":630,"children":632},{"className":631},[],[633],{"type":51,"value":634},"secrets={\"HF_TOKEN\": \"$HF_TOKEN\"}",{"type":51,"value":636}," in job config",{"type":51,"value":638}," to make token available (the ",{"type":45,"tag":136,"props":640,"children":642},{"className":641},[],[643],{"type":51,"value":644},"$HF_TOKEN",{"type":51,"value":646}," syntax\nreferences your actual token value)",{"type":45,"tag":240,"props":648,"children":650},{"id":649},"dataset-requirements",[651,652],{"type":51,"value":554},{"type":45,"tag":70,"props":653,"children":654},{},[655],{"type":51,"value":656},"Dataset Requirements",{"type":45,"tag":76,"props":658,"children":659},{},[660,671,676,686],{"type":45,"tag":80,"props":661,"children":662},{},[663,665],{"type":51,"value":664},"Dataset must exist on Hub or be loadable via ",{"type":45,"tag":136,"props":666,"children":668},{"className":667},[],[669],{"type":51,"value":670},"datasets.load_dataset()",{"type":45,"tag":80,"props":672,"children":673},{},[674],{"type":51,"value":675},"Format must match training method (SFT: \"messages\"\u002Ftext\u002Fprompt-completion; DPO: chosen\u002Frejected; GRPO: prompt-only)",{"type":45,"tag":80,"props":677,"children":678},{},[679,684],{"type":45,"tag":70,"props":680,"children":681},{},[682],{"type":51,"value":683},"ALWAYS validate unknown datasets",{"type":51,"value":685}," before GPU training to prevent format failures (see Dataset Validation section below)",{"type":45,"tag":80,"props":687,"children":688},{},[689],{"type":51,"value":690},"Size appropriate for hardware (Demo: 50-100 examples on t4-small; Production: 1K-10K+ on a10g-large\u002Fa100-large)",{"type":45,"tag":240,"props":692,"children":694},{"id":693},"️-critical-settings",[695,697],{"type":51,"value":696},"⚠️ ",{"type":45,"tag":70,"props":698,"children":699},{},[700],{"type":51,"value":701},"Critical Settings",{"type":45,"tag":76,"props":703,"children":704},{},[705,715],{"type":45,"tag":80,"props":706,"children":707},{},[708,713],{"type":45,"tag":70,"props":709,"children":710},{},[711],{"type":51,"value":712},"Timeout must exceed expected training time",{"type":51,"value":714}," - Default 30min is TOO SHORT for most training. Minimum recommended: 1-2 hours. Job fails and loses all progress if timeout is exceeded.",{"type":45,"tag":80,"props":716,"children":717},{},[718,723,725,731,732,738,740],{"type":45,"tag":70,"props":719,"children":720},{},[721],{"type":51,"value":722},"Hub push must be enabled",{"type":51,"value":724}," - Config: ",{"type":45,"tag":136,"props":726,"children":728},{"className":727},[],[729],{"type":51,"value":730},"push_to_hub=True",{"type":51,"value":456},{"type":45,"tag":136,"props":733,"children":735},{"className":734},[],[736],{"type":51,"value":737},"hub_model_id=\"username\u002Fmodel-name\"",{"type":51,"value":739},"; Job: ",{"type":45,"tag":136,"props":741,"children":743},{"className":742},[],[744],{"type":51,"value":634},{"type":45,"tag":54,"props":746,"children":748},{"id":747},"asynchronous-job-guidelines",[749],{"type":51,"value":750},"Asynchronous Job Guidelines",{"type":45,"tag":61,"props":752,"children":753},{},[754],{"type":45,"tag":70,"props":755,"children":756},{},[757],{"type":51,"value":758},"⚠️ IMPORTANT: Training jobs run asynchronously and can take hours",{"type":45,"tag":240,"props":760,"children":762},{"id":761},"action-required",[763],{"type":51,"value":764},"Action Required",{"type":45,"tag":61,"props":766,"children":767},{},[768],{"type":45,"tag":70,"props":769,"children":770},{},[771],{"type":51,"value":772},"When user requests training:",{"type":45,"tag":352,"props":774,"children":775},{},[776,793,810,820],{"type":45,"tag":80,"props":777,"children":778},{},[779,784,786,791],{"type":45,"tag":70,"props":780,"children":781},{},[782],{"type":51,"value":783},"Create the training script",{"type":51,"value":785}," with Trackio included (use ",{"type":45,"tag":136,"props":787,"children":789},{"className":788},[],[790],{"type":51,"value":454},{"type":51,"value":792}," as template)",{"type":45,"tag":80,"props":794,"children":795},{},[796,801,803,808],{"type":45,"tag":70,"props":797,"children":798},{},[799],{"type":51,"value":800},"Submit immediately",{"type":51,"value":802}," using ",{"type":45,"tag":136,"props":804,"children":806},{"className":805},[],[807],{"type":51,"value":368},{"type":51,"value":809}," MCP tool with script content inline - don't save to file unless user requests",{"type":45,"tag":80,"props":811,"children":812},{},[813,818],{"type":45,"tag":70,"props":814,"children":815},{},[816],{"type":51,"value":817},"Report submission",{"type":51,"value":819}," with job ID, monitoring URL, and estimated time",{"type":45,"tag":80,"props":821,"children":822},{},[823,828],{"type":45,"tag":70,"props":824,"children":825},{},[826],{"type":51,"value":827},"Wait for user",{"type":51,"value":829}," to request status checks - don't poll automatically",{"type":45,"tag":240,"props":831,"children":833},{"id":832},"ground-rules",[834],{"type":51,"value":835},"Ground Rules",{"type":45,"tag":76,"props":837,"children":838},{},[839,849,859,869],{"type":45,"tag":80,"props":840,"children":841},{},[842,847],{"type":45,"tag":70,"props":843,"children":844},{},[845],{"type":51,"value":846},"Jobs run in background",{"type":51,"value":848}," - Submission returns immediately; training continues independently",{"type":45,"tag":80,"props":850,"children":851},{},[852,857],{"type":45,"tag":70,"props":853,"children":854},{},[855],{"type":51,"value":856},"Initial logs delayed",{"type":51,"value":858}," - Can take 30-60 seconds for logs to appear",{"type":45,"tag":80,"props":860,"children":861},{},[862,867],{"type":45,"tag":70,"props":863,"children":864},{},[865],{"type":51,"value":866},"User checks status",{"type":51,"value":868}," - Wait for user to request status updates",{"type":45,"tag":80,"props":870,"children":871},{},[872,877],{"type":45,"tag":70,"props":873,"children":874},{},[875],{"type":51,"value":876},"Avoid polling",{"type":51,"value":878}," - Check logs only on user request; provide monitoring links instead",{"type":45,"tag":240,"props":880,"children":882},{"id":881},"after-submission",[883],{"type":51,"value":884},"After Submission",{"type":45,"tag":61,"props":886,"children":887},{},[888],{"type":45,"tag":70,"props":889,"children":890},{},[891],{"type":51,"value":892},"Provide to user:",{"type":45,"tag":76,"props":894,"children":895},{},[896,901,906,911],{"type":45,"tag":80,"props":897,"children":898},{},[899],{"type":51,"value":900},"✅ Job ID and monitoring URL",{"type":45,"tag":80,"props":902,"children":903},{},[904],{"type":51,"value":905},"✅ Expected completion time",{"type":45,"tag":80,"props":907,"children":908},{},[909],{"type":51,"value":910},"✅ Trackio dashboard URL",{"type":45,"tag":80,"props":912,"children":913},{},[914],{"type":51,"value":915},"✅ Note that user can request status checks later",{"type":45,"tag":61,"props":917,"children":918},{},[919],{"type":45,"tag":70,"props":920,"children":921},{},[922],{"type":51,"value":923},"Example Response:",{"type":45,"tag":129,"props":925,"children":929},{"className":926,"code":928,"language":51},[927],"language-text","✅ Job submitted successfully!\n\nJob ID: abc123xyz\nMonitor: https:\u002F\u002Fhuggingface.co\u002Fjobs\u002Fusername\u002Fabc123xyz\n\nExpected time: ~2 hours\nEstimated cost: ~$10\n\nThe job is running in the background. Ask me to check status\u002Flogs when ready!\n",[930],{"type":45,"tag":136,"props":931,"children":932},{"__ignoreMap":133},[933],{"type":51,"value":928},{"type":45,"tag":54,"props":935,"children":937},{"id":936},"quick-start-three-approaches",[938],{"type":51,"value":939},"Quick Start: Three Approaches",{"type":45,"tag":61,"props":941,"children":942},{},[943,948,950,956,958,964],{"type":45,"tag":70,"props":944,"children":945},{},[946],{"type":51,"value":947},"💡 Tip for Demos:",{"type":51,"value":949}," For quick demos on smaller GPUs (t4-small), omit ",{"type":45,"tag":136,"props":951,"children":953},{"className":952},[],[954],{"type":51,"value":955},"eval_dataset",{"type":51,"value":957}," and ",{"type":45,"tag":136,"props":959,"children":961},{"className":960},[],[962],{"type":51,"value":963},"eval_strategy",{"type":51,"value":965}," to save ~40% memory. You'll still see training loss and learning progress.",{"type":45,"tag":240,"props":967,"children":969},{"id":968},"sequence-length-configuration",[970],{"type":51,"value":971},"Sequence Length Configuration",{"type":45,"tag":61,"props":973,"children":974},{},[975,996],{"type":45,"tag":70,"props":976,"children":977},{},[978,980,986,988,994],{"type":51,"value":979},"TRL config classes use ",{"type":45,"tag":136,"props":981,"children":983},{"className":982},[],[984],{"type":51,"value":985},"max_length",{"type":51,"value":987}," (not ",{"type":45,"tag":136,"props":989,"children":991},{"className":990},[],[992],{"type":51,"value":993},"max_seq_length",{"type":51,"value":995},")",{"type":51,"value":997}," to control tokenized sequence length:",{"type":45,"tag":129,"props":999,"children":1001},{"className":131,"code":1000,"language":24,"meta":133,"style":133},"# ✅ CORRECT - If you need to set sequence length\nSFTConfig(max_length=512)   # Truncate sequences to 512 tokens\nDPOConfig(max_length=2048)  # Longer context (2048 tokens)\n\n# ❌ WRONG - This parameter doesn't exist\nSFTConfig(max_seq_length=512)  # TypeError!\n",[1002],{"type":45,"tag":136,"props":1003,"children":1004},{"__ignoreMap":133},[1005,1013,1021,1029,1038,1047],{"type":45,"tag":140,"props":1006,"children":1007},{"class":142,"line":143},[1008],{"type":45,"tag":140,"props":1009,"children":1010},{},[1011],{"type":51,"value":1012},"# ✅ CORRECT - If you need to set sequence length\n",{"type":45,"tag":140,"props":1014,"children":1015},{"class":142,"line":152},[1016],{"type":45,"tag":140,"props":1017,"children":1018},{},[1019],{"type":51,"value":1020},"SFTConfig(max_length=512)   # Truncate sequences to 512 tokens\n",{"type":45,"tag":140,"props":1022,"children":1023},{"class":142,"line":161},[1024],{"type":45,"tag":140,"props":1025,"children":1026},{},[1027],{"type":51,"value":1028},"DPOConfig(max_length=2048)  # Longer context (2048 tokens)\n",{"type":45,"tag":140,"props":1030,"children":1031},{"class":142,"line":170},[1032],{"type":45,"tag":140,"props":1033,"children":1035},{"emptyLinePlaceholder":1034},true,[1036],{"type":51,"value":1037},"\n",{"type":45,"tag":140,"props":1039,"children":1041},{"class":142,"line":1040},5,[1042],{"type":45,"tag":140,"props":1043,"children":1044},{},[1045],{"type":51,"value":1046},"# ❌ WRONG - This parameter doesn't exist\n",{"type":45,"tag":140,"props":1048,"children":1050},{"class":142,"line":1049},6,[1051],{"type":45,"tag":140,"props":1052,"children":1053},{},[1054],{"type":51,"value":1055},"SFTConfig(max_seq_length=512)  # TypeError!\n",{"type":45,"tag":61,"props":1057,"children":1058},{},[1059,1064,1065,1071],{"type":45,"tag":70,"props":1060,"children":1061},{},[1062],{"type":51,"value":1063},"Default behavior:",{"type":51,"value":186},{"type":45,"tag":136,"props":1066,"children":1068},{"className":1067},[],[1069],{"type":51,"value":1070},"max_length=1024",{"type":51,"value":1072}," (truncates from right). This works well for most training.",{"type":45,"tag":61,"props":1074,"children":1075},{},[1076],{"type":45,"tag":70,"props":1077,"children":1078},{},[1079],{"type":51,"value":1080},"When to override:",{"type":45,"tag":76,"props":1082,"children":1083},{},[1084,1101,1118],{"type":45,"tag":80,"props":1085,"children":1086},{},[1087,1092,1094,1100],{"type":45,"tag":70,"props":1088,"children":1089},{},[1090],{"type":51,"value":1091},"Longer context",{"type":51,"value":1093},": Set higher (e.g., ",{"type":45,"tag":136,"props":1095,"children":1097},{"className":1096},[],[1098],{"type":51,"value":1099},"max_length=2048",{"type":51,"value":995},{"type":45,"tag":80,"props":1102,"children":1103},{},[1104,1109,1111,1117],{"type":45,"tag":70,"props":1105,"children":1106},{},[1107],{"type":51,"value":1108},"Memory constraints",{"type":51,"value":1110},": Set lower (e.g., ",{"type":45,"tag":136,"props":1112,"children":1114},{"className":1113},[],[1115],{"type":51,"value":1116},"max_length=512",{"type":51,"value":995},{"type":45,"tag":80,"props":1119,"children":1120},{},[1121,1126,1128,1134],{"type":45,"tag":70,"props":1122,"children":1123},{},[1124],{"type":51,"value":1125},"Vision models",{"type":51,"value":1127},": Set ",{"type":45,"tag":136,"props":1129,"children":1131},{"className":1130},[],[1132],{"type":51,"value":1133},"max_length=None",{"type":51,"value":1135}," (prevents cutting image tokens)",{"type":45,"tag":61,"props":1137,"children":1138},{},[1139,1144],{"type":45,"tag":70,"props":1140,"children":1141},{},[1142],{"type":51,"value":1143},"Usually you don't need to set this parameter at all",{"type":51,"value":1145}," - the examples below use the sensible default.",{"type":45,"tag":240,"props":1147,"children":1149},{"id":1148},"approach-1-uv-scripts-recommendeddefault-choice",[1150],{"type":51,"value":1151},"Approach 1: UV Scripts (Recommended—Default Choice)",{"type":45,"tag":61,"props":1153,"children":1154},{},[1155,1157],{"type":51,"value":1156},"UV scripts use PEP 723 inline dependencies for clean, self-contained training. ",{"type":45,"tag":70,"props":1158,"children":1159},{},[1160],{"type":51,"value":1161},"This is the primary approach for Codex.",{"type":45,"tag":129,"props":1163,"children":1165},{"className":131,"code":1164,"language":24,"meta":133,"style":133},"hf_jobs(\"uv\", {\n    \"script\": \"\"\"\n# \u002F\u002F\u002F script\n# dependencies = [\"trl>=0.12.0\", \"peft>=0.7.0\", \"trackio\"]\n# \u002F\u002F\u002F\n\nfrom datasets import load_dataset\nfrom peft import LoraConfig\nfrom trl import SFTTrainer, SFTConfig\nimport trackio\n\ndataset = load_dataset(\"trl-lib\u002FCapybara\", split=\"train\")\n\n# Create train\u002Feval split for monitoring\ndataset_split = dataset.train_test_split(test_size=0.1, seed=42)\n\ntrainer = SFTTrainer(\n    model=\"Qwen\u002FQwen2.5-0.5B\",\n    train_dataset=dataset_split[\"train\"],\n    eval_dataset=dataset_split[\"test\"],\n    peft_config=LoraConfig(r=16, lora_alpha=32),\n    args=SFTConfig(\n        output_dir=\"my-model\",\n        push_to_hub=True,\n        hub_model_id=\"username\u002Fmy-model\",\n        num_train_epochs=3,\n        eval_strategy=\"steps\",\n        eval_steps=50,\n        report_to=\"trackio\",\n        project=\"meaningful_prject_name\", # project name for the training name (trackio)\n        run_name=\"meaningful_run_name\",   # descriptive name for the specific training run (trackio)\n    )\n)\n\ntrainer.train()\ntrainer.push_to_hub()\n\"\"\",\n    \"flavor\": \"a10g-large\",\n    \"timeout\": \"2h\",\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}\n})\n",[1166],{"type":45,"tag":136,"props":1167,"children":1168},{"__ignoreMap":133},[1169,1177,1185,1198,1206,1218,1225,1234,1243,1252,1261,1269,1278,1286,1295,1304,1312,1321,1330,1339,1348,1357,1366,1375,1384,1393,1402,1411,1420,1429,1438,1447,1456,1465,1473,1482,1491,1500,1509,1518,1527],{"type":45,"tag":140,"props":1170,"children":1171},{"class":142,"line":143},[1172],{"type":45,"tag":140,"props":1173,"children":1174},{},[1175],{"type":51,"value":1176},"hf_jobs(\"uv\", {\n",{"type":45,"tag":140,"props":1178,"children":1179},{"class":142,"line":152},[1180],{"type":45,"tag":140,"props":1181,"children":1182},{},[1183],{"type":51,"value":1184},"    \"script\": \"\"\"\n",{"type":45,"tag":140,"props":1186,"children":1187},{"class":142,"line":161},[1188,1193],{"type":45,"tag":140,"props":1189,"children":1190},{},[1191],{"type":51,"value":1192},"#",{"type":45,"tag":140,"props":1194,"children":1195},{},[1196],{"type":51,"value":1197}," \u002F\u002F\u002F script\n",{"type":45,"tag":140,"props":1199,"children":1200},{"class":142,"line":170},[1201],{"type":45,"tag":140,"props":1202,"children":1203},{},[1204],{"type":51,"value":1205},"# dependencies = [\"trl>=0.12.0\", \"peft>=0.7.0\", \"trackio\"]\n",{"type":45,"tag":140,"props":1207,"children":1208},{"class":142,"line":1040},[1209,1213],{"type":45,"tag":140,"props":1210,"children":1211},{},[1212],{"type":51,"value":1192},{"type":45,"tag":140,"props":1214,"children":1215},{},[1216],{"type":51,"value":1217}," \u002F\u002F\u002F\n",{"type":45,"tag":140,"props":1219,"children":1220},{"class":142,"line":1049},[1221],{"type":45,"tag":140,"props":1222,"children":1223},{"emptyLinePlaceholder":1034},[1224],{"type":51,"value":1037},{"type":45,"tag":140,"props":1226,"children":1228},{"class":142,"line":1227},7,[1229],{"type":45,"tag":140,"props":1230,"children":1231},{},[1232],{"type":51,"value":1233},"from datasets import load_dataset\n",{"type":45,"tag":140,"props":1235,"children":1237},{"class":142,"line":1236},8,[1238],{"type":45,"tag":140,"props":1239,"children":1240},{},[1241],{"type":51,"value":1242},"from peft import LoraConfig\n",{"type":45,"tag":140,"props":1244,"children":1246},{"class":142,"line":1245},9,[1247],{"type":45,"tag":140,"props":1248,"children":1249},{},[1250],{"type":51,"value":1251},"from trl import SFTTrainer, SFTConfig\n",{"type":45,"tag":140,"props":1253,"children":1255},{"class":142,"line":1254},10,[1256],{"type":45,"tag":140,"props":1257,"children":1258},{},[1259],{"type":51,"value":1260},"import trackio\n",{"type":45,"tag":140,"props":1262,"children":1264},{"class":142,"line":1263},11,[1265],{"type":45,"tag":140,"props":1266,"children":1267},{"emptyLinePlaceholder":1034},[1268],{"type":51,"value":1037},{"type":45,"tag":140,"props":1270,"children":1272},{"class":142,"line":1271},12,[1273],{"type":45,"tag":140,"props":1274,"children":1275},{},[1276],{"type":51,"value":1277},"dataset = load_dataset(\"trl-lib\u002FCapybara\", split=\"train\")\n",{"type":45,"tag":140,"props":1279,"children":1281},{"class":142,"line":1280},13,[1282],{"type":45,"tag":140,"props":1283,"children":1284},{"emptyLinePlaceholder":1034},[1285],{"type":51,"value":1037},{"type":45,"tag":140,"props":1287,"children":1289},{"class":142,"line":1288},14,[1290],{"type":45,"tag":140,"props":1291,"children":1292},{},[1293],{"type":51,"value":1294},"# Create train\u002Feval split for monitoring\n",{"type":45,"tag":140,"props":1296,"children":1298},{"class":142,"line":1297},15,[1299],{"type":45,"tag":140,"props":1300,"children":1301},{},[1302],{"type":51,"value":1303},"dataset_split = dataset.train_test_split(test_size=0.1, seed=42)\n",{"type":45,"tag":140,"props":1305,"children":1307},{"class":142,"line":1306},16,[1308],{"type":45,"tag":140,"props":1309,"children":1310},{"emptyLinePlaceholder":1034},[1311],{"type":51,"value":1037},{"type":45,"tag":140,"props":1313,"children":1315},{"class":142,"line":1314},17,[1316],{"type":45,"tag":140,"props":1317,"children":1318},{},[1319],{"type":51,"value":1320},"trainer = SFTTrainer(\n",{"type":45,"tag":140,"props":1322,"children":1324},{"class":142,"line":1323},18,[1325],{"type":45,"tag":140,"props":1326,"children":1327},{},[1328],{"type":51,"value":1329},"    model=\"Qwen\u002FQwen2.5-0.5B\",\n",{"type":45,"tag":140,"props":1331,"children":1333},{"class":142,"line":1332},19,[1334],{"type":45,"tag":140,"props":1335,"children":1336},{},[1337],{"type":51,"value":1338},"    train_dataset=dataset_split[\"train\"],\n",{"type":45,"tag":140,"props":1340,"children":1342},{"class":142,"line":1341},20,[1343],{"type":45,"tag":140,"props":1344,"children":1345},{},[1346],{"type":51,"value":1347},"    eval_dataset=dataset_split[\"test\"],\n",{"type":45,"tag":140,"props":1349,"children":1351},{"class":142,"line":1350},21,[1352],{"type":45,"tag":140,"props":1353,"children":1354},{},[1355],{"type":51,"value":1356},"    peft_config=LoraConfig(r=16, lora_alpha=32),\n",{"type":45,"tag":140,"props":1358,"children":1360},{"class":142,"line":1359},22,[1361],{"type":45,"tag":140,"props":1362,"children":1363},{},[1364],{"type":51,"value":1365},"    args=SFTConfig(\n",{"type":45,"tag":140,"props":1367,"children":1369},{"class":142,"line":1368},23,[1370],{"type":45,"tag":140,"props":1371,"children":1372},{},[1373],{"type":51,"value":1374},"        output_dir=\"my-model\",\n",{"type":45,"tag":140,"props":1376,"children":1378},{"class":142,"line":1377},24,[1379],{"type":45,"tag":140,"props":1380,"children":1381},{},[1382],{"type":51,"value":1383},"        push_to_hub=True,\n",{"type":45,"tag":140,"props":1385,"children":1387},{"class":142,"line":1386},25,[1388],{"type":45,"tag":140,"props":1389,"children":1390},{},[1391],{"type":51,"value":1392},"        hub_model_id=\"username\u002Fmy-model\",\n",{"type":45,"tag":140,"props":1394,"children":1396},{"class":142,"line":1395},26,[1397],{"type":45,"tag":140,"props":1398,"children":1399},{},[1400],{"type":51,"value":1401},"        num_train_epochs=3,\n",{"type":45,"tag":140,"props":1403,"children":1405},{"class":142,"line":1404},27,[1406],{"type":45,"tag":140,"props":1407,"children":1408},{},[1409],{"type":51,"value":1410},"        eval_strategy=\"steps\",\n",{"type":45,"tag":140,"props":1412,"children":1414},{"class":142,"line":1413},28,[1415],{"type":45,"tag":140,"props":1416,"children":1417},{},[1418],{"type":51,"value":1419},"        eval_steps=50,\n",{"type":45,"tag":140,"props":1421,"children":1423},{"class":142,"line":1422},29,[1424],{"type":45,"tag":140,"props":1425,"children":1426},{},[1427],{"type":51,"value":1428},"        report_to=\"trackio\",\n",{"type":45,"tag":140,"props":1430,"children":1432},{"class":142,"line":1431},30,[1433],{"type":45,"tag":140,"props":1434,"children":1435},{},[1436],{"type":51,"value":1437},"        project=\"meaningful_prject_name\", # project name for the training name (trackio)\n",{"type":45,"tag":140,"props":1439,"children":1441},{"class":142,"line":1440},31,[1442],{"type":45,"tag":140,"props":1443,"children":1444},{},[1445],{"type":51,"value":1446},"        run_name=\"meaningful_run_name\",   # descriptive name for the specific training run (trackio)\n",{"type":45,"tag":140,"props":1448,"children":1450},{"class":142,"line":1449},32,[1451],{"type":45,"tag":140,"props":1452,"children":1453},{},[1454],{"type":51,"value":1455},"    )\n",{"type":45,"tag":140,"props":1457,"children":1459},{"class":142,"line":1458},33,[1460],{"type":45,"tag":140,"props":1461,"children":1462},{},[1463],{"type":51,"value":1464},")\n",{"type":45,"tag":140,"props":1466,"children":1468},{"class":142,"line":1467},34,[1469],{"type":45,"tag":140,"props":1470,"children":1471},{"emptyLinePlaceholder":1034},[1472],{"type":51,"value":1037},{"type":45,"tag":140,"props":1474,"children":1476},{"class":142,"line":1475},35,[1477],{"type":45,"tag":140,"props":1478,"children":1479},{},[1480],{"type":51,"value":1481},"trainer.train()\n",{"type":45,"tag":140,"props":1483,"children":1485},{"class":142,"line":1484},36,[1486],{"type":45,"tag":140,"props":1487,"children":1488},{},[1489],{"type":51,"value":1490},"trainer.push_to_hub()\n",{"type":45,"tag":140,"props":1492,"children":1494},{"class":142,"line":1493},37,[1495],{"type":45,"tag":140,"props":1496,"children":1497},{},[1498],{"type":51,"value":1499},"\"\"\",\n",{"type":45,"tag":140,"props":1501,"children":1503},{"class":142,"line":1502},38,[1504],{"type":45,"tag":140,"props":1505,"children":1506},{},[1507],{"type":51,"value":1508},"    \"flavor\": \"a10g-large\",\n",{"type":45,"tag":140,"props":1510,"children":1512},{"class":142,"line":1511},39,[1513],{"type":45,"tag":140,"props":1514,"children":1515},{},[1516],{"type":51,"value":1517},"    \"timeout\": \"2h\",\n",{"type":45,"tag":140,"props":1519,"children":1521},{"class":142,"line":1520},40,[1522],{"type":45,"tag":140,"props":1523,"children":1524},{},[1525],{"type":51,"value":1526},"    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}\n",{"type":45,"tag":140,"props":1528,"children":1530},{"class":142,"line":1529},41,[1531],{"type":45,"tag":140,"props":1532,"children":1533},{},[1534],{"type":51,"value":1535},"})\n",{"type":45,"tag":61,"props":1537,"children":1538},{},[1539,1544,1546,1551,1553],{"type":45,"tag":70,"props":1540,"children":1541},{},[1542],{"type":51,"value":1543},"Benefits:",{"type":51,"value":1545}," Direct MCP tool usage, clean code, dependencies declared inline (PEP 723), no file saving required, full control\n",{"type":45,"tag":70,"props":1547,"children":1548},{},[1549],{"type":51,"value":1550},"When to use:",{"type":51,"value":1552}," Default choice for all training tasks in Codex, custom training logic, any scenario requiring ",{"type":45,"tag":136,"props":1554,"children":1556},{"className":1555},[],[1557],{"type":51,"value":368},{"type":45,"tag":1559,"props":1560,"children":1562},"h4",{"id":1561},"working-with-scripts",[1563],{"type":51,"value":1564},"Working with Scripts",{"type":45,"tag":61,"props":1566,"children":1567},{},[1568,1569,1574,1576,1581,1583],{"type":51,"value":696},{"type":45,"tag":70,"props":1570,"children":1571},{},[1572],{"type":51,"value":1573},"Important:",{"type":51,"value":1575}," The ",{"type":45,"tag":136,"props":1577,"children":1579},{"className":1578},[],[1580],{"type":51,"value":394},{"type":51,"value":1582}," parameter accepts either inline code (as shown above) OR a URL. ",{"type":45,"tag":70,"props":1584,"children":1585},{},[1586],{"type":51,"value":1587},"Local file paths do NOT work.",{"type":45,"tag":61,"props":1589,"children":1590},{},[1591,1596],{"type":45,"tag":70,"props":1592,"children":1593},{},[1594],{"type":51,"value":1595},"Why local paths don't work:",{"type":51,"value":1597},"\nJobs run in isolated Docker containers without access to your local filesystem. Scripts must be:",{"type":45,"tag":76,"props":1599,"children":1600},{},[1601,1606,1611],{"type":45,"tag":80,"props":1602,"children":1603},{},[1604],{"type":51,"value":1605},"Inline code (recommended for custom training)",{"type":45,"tag":80,"props":1607,"children":1608},{},[1609],{"type":51,"value":1610},"Publicly accessible URLs",{"type":45,"tag":80,"props":1612,"children":1613},{},[1614],{"type":51,"value":1615},"Private repo URLs (with HF_TOKEN)",{"type":45,"tag":61,"props":1617,"children":1618},{},[1619],{"type":45,"tag":70,"props":1620,"children":1621},{},[1622],{"type":51,"value":1623},"Common mistakes:",{"type":45,"tag":129,"props":1625,"children":1627},{"className":131,"code":1626,"language":24,"meta":133,"style":133},"# ❌ These will all fail\nhf_jobs(\"uv\", {\"script\": \"train.py\"})\nhf_jobs(\"uv\", {\"script\": \".\u002Fscripts\u002Ftrain.py\"})\nhf_jobs(\"uv\", {\"script\": \"\u002Fpath\u002Fto\u002Ftrain.py\"})\n",[1628],{"type":45,"tag":136,"props":1629,"children":1630},{"__ignoreMap":133},[1631,1639,1647,1655],{"type":45,"tag":140,"props":1632,"children":1633},{"class":142,"line":143},[1634],{"type":45,"tag":140,"props":1635,"children":1636},{},[1637],{"type":51,"value":1638},"# ❌ These will all fail\n",{"type":45,"tag":140,"props":1640,"children":1641},{"class":142,"line":152},[1642],{"type":45,"tag":140,"props":1643,"children":1644},{},[1645],{"type":51,"value":1646},"hf_jobs(\"uv\", {\"script\": \"train.py\"})\n",{"type":45,"tag":140,"props":1648,"children":1649},{"class":142,"line":161},[1650],{"type":45,"tag":140,"props":1651,"children":1652},{},[1653],{"type":51,"value":1654},"hf_jobs(\"uv\", {\"script\": \".\u002Fscripts\u002Ftrain.py\"})\n",{"type":45,"tag":140,"props":1656,"children":1657},{"class":142,"line":170},[1658],{"type":45,"tag":140,"props":1659,"children":1660},{},[1661],{"type":51,"value":1662},"hf_jobs(\"uv\", {\"script\": \"\u002Fpath\u002Fto\u002Ftrain.py\"})\n",{"type":45,"tag":61,"props":1664,"children":1665},{},[1666],{"type":45,"tag":70,"props":1667,"children":1668},{},[1669],{"type":51,"value":1670},"Correct approaches:",{"type":45,"tag":129,"props":1672,"children":1674},{"className":131,"code":1673,"language":24,"meta":133,"style":133},"# ✅ Inline code (recommended)\nhf_jobs(\"uv\", {\"script\": \"# \u002F\u002F\u002F script\\n# dependencies = [...]\\n# \u002F\u002F\u002F\\n\\n\u003Cyour code>\"})\n\n# ✅ From Hugging Face Hub\nhf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fhuggingface.co\u002Fuser\u002Frepo\u002Fresolve\u002Fmain\u002Ftrain.py\"})\n\n# ✅ From GitHub\nhf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fuser\u002Frepo\u002Fmain\u002Ftrain.py\"})\n\n# ✅ From Gist\nhf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fgist.githubusercontent.com\u002Fuser\u002Fid\u002Fraw\u002Ftrain.py\"})\n",[1675],{"type":45,"tag":136,"props":1676,"children":1677},{"__ignoreMap":133},[1678,1686,1694,1701,1709,1717,1724,1732,1740,1747,1755],{"type":45,"tag":140,"props":1679,"children":1680},{"class":142,"line":143},[1681],{"type":45,"tag":140,"props":1682,"children":1683},{},[1684],{"type":51,"value":1685},"# ✅ Inline code (recommended)\n",{"type":45,"tag":140,"props":1687,"children":1688},{"class":142,"line":152},[1689],{"type":45,"tag":140,"props":1690,"children":1691},{},[1692],{"type":51,"value":1693},"hf_jobs(\"uv\", {\"script\": \"# \u002F\u002F\u002F script\\n# dependencies = [...]\\n# \u002F\u002F\u002F\\n\\n\u003Cyour code>\"})\n",{"type":45,"tag":140,"props":1695,"children":1696},{"class":142,"line":161},[1697],{"type":45,"tag":140,"props":1698,"children":1699},{"emptyLinePlaceholder":1034},[1700],{"type":51,"value":1037},{"type":45,"tag":140,"props":1702,"children":1703},{"class":142,"line":170},[1704],{"type":45,"tag":140,"props":1705,"children":1706},{},[1707],{"type":51,"value":1708},"# ✅ From Hugging Face Hub\n",{"type":45,"tag":140,"props":1710,"children":1711},{"class":142,"line":1040},[1712],{"type":45,"tag":140,"props":1713,"children":1714},{},[1715],{"type":51,"value":1716},"hf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fhuggingface.co\u002Fuser\u002Frepo\u002Fresolve\u002Fmain\u002Ftrain.py\"})\n",{"type":45,"tag":140,"props":1718,"children":1719},{"class":142,"line":1049},[1720],{"type":45,"tag":140,"props":1721,"children":1722},{"emptyLinePlaceholder":1034},[1723],{"type":51,"value":1037},{"type":45,"tag":140,"props":1725,"children":1726},{"class":142,"line":1227},[1727],{"type":45,"tag":140,"props":1728,"children":1729},{},[1730],{"type":51,"value":1731},"# ✅ From GitHub\n",{"type":45,"tag":140,"props":1733,"children":1734},{"class":142,"line":1236},[1735],{"type":45,"tag":140,"props":1736,"children":1737},{},[1738],{"type":51,"value":1739},"hf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fuser\u002Frepo\u002Fmain\u002Ftrain.py\"})\n",{"type":45,"tag":140,"props":1741,"children":1742},{"class":142,"line":1245},[1743],{"type":45,"tag":140,"props":1744,"children":1745},{"emptyLinePlaceholder":1034},[1746],{"type":51,"value":1037},{"type":45,"tag":140,"props":1748,"children":1749},{"class":142,"line":1254},[1750],{"type":45,"tag":140,"props":1751,"children":1752},{},[1753],{"type":51,"value":1754},"# ✅ From Gist\n",{"type":45,"tag":140,"props":1756,"children":1757},{"class":142,"line":1263},[1758],{"type":45,"tag":140,"props":1759,"children":1760},{},[1761],{"type":51,"value":1762},"hf_jobs(\"uv\", {\"script\": \"https:\u002F\u002Fgist.githubusercontent.com\u002Fuser\u002Fid\u002Fraw\u002Ftrain.py\"})\n",{"type":45,"tag":61,"props":1764,"children":1765},{},[1766,1771],{"type":45,"tag":70,"props":1767,"children":1768},{},[1769],{"type":51,"value":1770},"To use local scripts:",{"type":51,"value":1772}," Upload to HF Hub first:",{"type":45,"tag":129,"props":1774,"children":1776},{"className":486,"code":1775,"language":488,"meta":133,"style":133},"hf repos create my-training-scripts --type model\nhf upload my-training-scripts .\u002Ftrain.py train.py\n# Use: https:\u002F\u002Fhuggingface.co\u002FUSERNAME\u002Fmy-training-scripts\u002Fresolve\u002Fmain\u002Ftrain.py\n",[1777],{"type":45,"tag":136,"props":1778,"children":1779},{"__ignoreMap":133},[1780,1813,1839],{"type":45,"tag":140,"props":1781,"children":1782},{"class":142,"line":143},[1783,1788,1793,1798,1803,1808],{"type":45,"tag":140,"props":1784,"children":1785},{"style":498},[1786],{"type":51,"value":1787},"hf",{"type":45,"tag":140,"props":1789,"children":1790},{"style":504},[1791],{"type":51,"value":1792}," repos",{"type":45,"tag":140,"props":1794,"children":1795},{"style":504},[1796],{"type":51,"value":1797}," create",{"type":45,"tag":140,"props":1799,"children":1800},{"style":504},[1801],{"type":51,"value":1802}," my-training-scripts",{"type":45,"tag":140,"props":1804,"children":1805},{"style":504},[1806],{"type":51,"value":1807}," --type",{"type":45,"tag":140,"props":1809,"children":1810},{"style":504},[1811],{"type":51,"value":1812}," model\n",{"type":45,"tag":140,"props":1814,"children":1815},{"class":142,"line":152},[1816,1820,1825,1829,1834],{"type":45,"tag":140,"props":1817,"children":1818},{"style":498},[1819],{"type":51,"value":1787},{"type":45,"tag":140,"props":1821,"children":1822},{"style":504},[1823],{"type":51,"value":1824}," upload",{"type":45,"tag":140,"props":1826,"children":1827},{"style":504},[1828],{"type":51,"value":1802},{"type":45,"tag":140,"props":1830,"children":1831},{"style":504},[1832],{"type":51,"value":1833}," .\u002Ftrain.py",{"type":45,"tag":140,"props":1835,"children":1836},{"style":504},[1837],{"type":51,"value":1838}," train.py\n",{"type":45,"tag":140,"props":1840,"children":1841},{"class":142,"line":161},[1842],{"type":45,"tag":140,"props":1843,"children":1845},{"style":1844},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1846],{"type":51,"value":1847},"# Use: https:\u002F\u002Fhuggingface.co\u002FUSERNAME\u002Fmy-training-scripts\u002Fresolve\u002Fmain\u002Ftrain.py\n",{"type":45,"tag":240,"props":1849,"children":1851},{"id":1850},"approach-2-trl-maintained-scripts-official-examples",[1852],{"type":51,"value":1853},"Approach 2: TRL Maintained Scripts (Official Examples)",{"type":45,"tag":61,"props":1855,"children":1856},{},[1857],{"type":51,"value":1858},"TRL provides battle-tested scripts for all methods. Can be run from URLs:",{"type":45,"tag":129,"props":1860,"children":1862},{"className":131,"code":1861,"language":24,"meta":133,"style":133},"hf_jobs(\"uv\", {\n    \"script\": \"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl\u002Fblob\u002Fmain\u002Ftrl\u002Fscripts\u002Fsft.py\",\n    \"script_args\": [\n        \"--model_name_or_path\", \"Qwen\u002FQwen2.5-0.5B\",\n        \"--dataset_name\", \"trl-lib\u002FCapybara\",\n        \"--output_dir\", \"my-model\",\n        \"--push_to_hub\",\n        \"--hub_model_id\", \"username\u002Fmy-model\"\n    ],\n    \"flavor\": \"a10g-large\",\n    \"timeout\": \"2h\",\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}\n})\n",[1863],{"type":45,"tag":136,"props":1864,"children":1865},{"__ignoreMap":133},[1866,1873,1881,1889,1897,1905,1913,1921,1929,1937,1944,1951,1958],{"type":45,"tag":140,"props":1867,"children":1868},{"class":142,"line":143},[1869],{"type":45,"tag":140,"props":1870,"children":1871},{},[1872],{"type":51,"value":1176},{"type":45,"tag":140,"props":1874,"children":1875},{"class":142,"line":152},[1876],{"type":45,"tag":140,"props":1877,"children":1878},{},[1879],{"type":51,"value":1880},"    \"script\": \"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl\u002Fblob\u002Fmain\u002Ftrl\u002Fscripts\u002Fsft.py\",\n",{"type":45,"tag":140,"props":1882,"children":1883},{"class":142,"line":161},[1884],{"type":45,"tag":140,"props":1885,"children":1886},{},[1887],{"type":51,"value":1888},"    \"script_args\": [\n",{"type":45,"tag":140,"props":1890,"children":1891},{"class":142,"line":170},[1892],{"type":45,"tag":140,"props":1893,"children":1894},{},[1895],{"type":51,"value":1896},"        \"--model_name_or_path\", \"Qwen\u002FQwen2.5-0.5B\",\n",{"type":45,"tag":140,"props":1898,"children":1899},{"class":142,"line":1040},[1900],{"type":45,"tag":140,"props":1901,"children":1902},{},[1903],{"type":51,"value":1904},"        \"--dataset_name\", \"trl-lib\u002FCapybara\",\n",{"type":45,"tag":140,"props":1906,"children":1907},{"class":142,"line":1049},[1908],{"type":45,"tag":140,"props":1909,"children":1910},{},[1911],{"type":51,"value":1912},"        \"--output_dir\", \"my-model\",\n",{"type":45,"tag":140,"props":1914,"children":1915},{"class":142,"line":1227},[1916],{"type":45,"tag":140,"props":1917,"children":1918},{},[1919],{"type":51,"value":1920},"        \"--push_to_hub\",\n",{"type":45,"tag":140,"props":1922,"children":1923},{"class":142,"line":1236},[1924],{"type":45,"tag":140,"props":1925,"children":1926},{},[1927],{"type":51,"value":1928},"        \"--hub_model_id\", \"username\u002Fmy-model\"\n",{"type":45,"tag":140,"props":1930,"children":1931},{"class":142,"line":1245},[1932],{"type":45,"tag":140,"props":1933,"children":1934},{},[1935],{"type":51,"value":1936},"    ],\n",{"type":45,"tag":140,"props":1938,"children":1939},{"class":142,"line":1254},[1940],{"type":45,"tag":140,"props":1941,"children":1942},{},[1943],{"type":51,"value":1508},{"type":45,"tag":140,"props":1945,"children":1946},{"class":142,"line":1263},[1947],{"type":45,"tag":140,"props":1948,"children":1949},{},[1950],{"type":51,"value":1517},{"type":45,"tag":140,"props":1952,"children":1953},{"class":142,"line":1271},[1954],{"type":45,"tag":140,"props":1955,"children":1956},{},[1957],{"type":51,"value":1526},{"type":45,"tag":140,"props":1959,"children":1960},{"class":142,"line":1280},[1961],{"type":45,"tag":140,"props":1962,"children":1963},{},[1964],{"type":51,"value":1535},{"type":45,"tag":61,"props":1966,"children":1967},{},[1968,1972,1974,1978,1980,1985,1987],{"type":45,"tag":70,"props":1969,"children":1970},{},[1971],{"type":51,"value":1543},{"type":51,"value":1973}," No code to write, maintained by TRL team, production-tested\n",{"type":45,"tag":70,"props":1975,"children":1976},{},[1977],{"type":51,"value":1550},{"type":51,"value":1979}," Standard TRL training, quick experiments, don't need custom code\n",{"type":45,"tag":70,"props":1981,"children":1982},{},[1983],{"type":51,"value":1984},"Available:",{"type":51,"value":1986}," Scripts are available from ",{"type":45,"tag":569,"props":1988,"children":1991},{"href":1989,"rel":1990},"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl\u002Ftree\u002Fmain\u002Fexamples\u002Fscripts",[573],[1992],{"type":51,"value":1989},{"type":45,"tag":240,"props":1994,"children":1996},{"id":1995},"finding-more-uv-scripts-on-hub",[1997],{"type":51,"value":1998},"Finding More UV Scripts on Hub",{"type":45,"tag":61,"props":2000,"children":2001},{},[2002,2004,2010],{"type":51,"value":2003},"The ",{"type":45,"tag":136,"props":2005,"children":2007},{"className":2006},[],[2008],{"type":51,"value":2009},"uv-scripts",{"type":51,"value":2011}," organization provides ready-to-use UV scripts stored as datasets on Hugging Face Hub:",{"type":45,"tag":129,"props":2013,"children":2015},{"className":131,"code":2014,"language":24,"meta":133,"style":133},"# Discover available UV script collections\ndataset_search({\"author\": \"uv-scripts\", \"sort\": \"downloads\", \"limit\": 20})\n\n# Explore a specific collection\nhub_repo_details([\"uv-scripts\u002Fclassification\"], repo_type=\"dataset\", include_readme=True)\n",[2016],{"type":45,"tag":136,"props":2017,"children":2018},{"__ignoreMap":133},[2019,2027,2035,2042,2050],{"type":45,"tag":140,"props":2020,"children":2021},{"class":142,"line":143},[2022],{"type":45,"tag":140,"props":2023,"children":2024},{},[2025],{"type":51,"value":2026},"# Discover available UV script collections\n",{"type":45,"tag":140,"props":2028,"children":2029},{"class":142,"line":152},[2030],{"type":45,"tag":140,"props":2031,"children":2032},{},[2033],{"type":51,"value":2034},"dataset_search({\"author\": \"uv-scripts\", \"sort\": \"downloads\", \"limit\": 20})\n",{"type":45,"tag":140,"props":2036,"children":2037},{"class":142,"line":161},[2038],{"type":45,"tag":140,"props":2039,"children":2040},{"emptyLinePlaceholder":1034},[2041],{"type":51,"value":1037},{"type":45,"tag":140,"props":2043,"children":2044},{"class":142,"line":170},[2045],{"type":45,"tag":140,"props":2046,"children":2047},{},[2048],{"type":51,"value":2049},"# Explore a specific collection\n",{"type":45,"tag":140,"props":2051,"children":2052},{"class":142,"line":1040},[2053],{"type":45,"tag":140,"props":2054,"children":2055},{},[2056],{"type":51,"value":2057},"hub_repo_details([\"uv-scripts\u002Fclassification\"], repo_type=\"dataset\", include_readme=True)\n",{"type":45,"tag":61,"props":2059,"children":2060},{},[2061,2066],{"type":45,"tag":70,"props":2062,"children":2063},{},[2064],{"type":51,"value":2065},"Popular collections:",{"type":51,"value":2067}," ocr, classification, synthetic-data, vllm, dataset-creation",{"type":45,"tag":240,"props":2069,"children":2071},{"id":2070},"approach-3-hf-jobs-cli-direct-terminal-commands",[2072],{"type":51,"value":2073},"Approach 3: HF Jobs CLI (Direct Terminal Commands)",{"type":45,"tag":61,"props":2075,"children":2076},{},[2077,2079,2084,2086,2092],{"type":51,"value":2078},"When the ",{"type":45,"tag":136,"props":2080,"children":2082},{"className":2081},[],[2083],{"type":51,"value":368},{"type":51,"value":2085}," MCP tool is unavailable, use the ",{"type":45,"tag":136,"props":2087,"children":2089},{"className":2088},[],[2090],{"type":51,"value":2091},"hf jobs",{"type":51,"value":2093}," CLI directly.",{"type":45,"tag":61,"props":2095,"children":2096},{},[2097],{"type":45,"tag":70,"props":2098,"children":2099},{},[2100],{"type":51,"value":2101},"⚠️ CRITICAL: CLI Syntax Rules",{"type":45,"tag":129,"props":2103,"children":2105},{"className":486,"code":2104,"language":488,"meta":133,"style":133},"# ✅ CORRECT syntax - flags BEFORE script URL\nhf jobs uv run --flavor a10g-large --timeout 2h --secrets HF_TOKEN \"https:\u002F\u002Fexample.com\u002Ftrain.py\"\n\n# ❌ WRONG - \"run uv\" instead of \"uv run\"\nhf jobs run uv \"https:\u002F\u002Fexample.com\u002Ftrain.py\" --flavor a10g-large\n\n# ❌ WRONG - flags AFTER script URL (will be ignored!)\nhf jobs uv run \"https:\u002F\u002Fexample.com\u002Ftrain.py\" --flavor a10g-large\n\n# ❌ WRONG - \"--secret\" instead of \"--secrets\" (plural)\nhf jobs uv run --secret HF_TOKEN \"https:\u002F\u002Fexample.com\u002Ftrain.py\"\n",[2106],{"type":45,"tag":136,"props":2107,"children":2108},{"__ignoreMap":133},[2109,2117,2184,2191,2199,2240,2247,2255,2294,2301,2309],{"type":45,"tag":140,"props":2110,"children":2111},{"class":142,"line":143},[2112],{"type":45,"tag":140,"props":2113,"children":2114},{"style":1844},[2115],{"type":51,"value":2116},"# ✅ CORRECT syntax - flags BEFORE script URL\n",{"type":45,"tag":140,"props":2118,"children":2119},{"class":142,"line":152},[2120,2124,2129,2134,2138,2143,2148,2153,2158,2163,2168,2174,2179],{"type":45,"tag":140,"props":2121,"children":2122},{"style":498},[2123],{"type":51,"value":1787},{"type":45,"tag":140,"props":2125,"children":2126},{"style":504},[2127],{"type":51,"value":2128}," jobs",{"type":45,"tag":140,"props":2130,"children":2131},{"style":504},[2132],{"type":51,"value":2133}," uv",{"type":45,"tag":140,"props":2135,"children":2136},{"style":504},[2137],{"type":51,"value":507},{"type":45,"tag":140,"props":2139,"children":2140},{"style":504},[2141],{"type":51,"value":2142}," --flavor",{"type":45,"tag":140,"props":2144,"children":2145},{"style":504},[2146],{"type":51,"value":2147}," a10g-large",{"type":45,"tag":140,"props":2149,"children":2150},{"style":504},[2151],{"type":51,"value":2152}," --timeout",{"type":45,"tag":140,"props":2154,"children":2155},{"style":504},[2156],{"type":51,"value":2157}," 2h",{"type":45,"tag":140,"props":2159,"children":2160},{"style":504},[2161],{"type":51,"value":2162}," --secrets",{"type":45,"tag":140,"props":2164,"children":2165},{"style":504},[2166],{"type":51,"value":2167}," HF_TOKEN",{"type":45,"tag":140,"props":2169,"children":2171},{"style":2170},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[2172],{"type":51,"value":2173}," \"",{"type":45,"tag":140,"props":2175,"children":2176},{"style":504},[2177],{"type":51,"value":2178},"https:\u002F\u002Fexample.com\u002Ftrain.py",{"type":45,"tag":140,"props":2180,"children":2181},{"style":2170},[2182],{"type":51,"value":2183},"\"\n",{"type":45,"tag":140,"props":2185,"children":2186},{"class":142,"line":161},[2187],{"type":45,"tag":140,"props":2188,"children":2189},{"emptyLinePlaceholder":1034},[2190],{"type":51,"value":1037},{"type":45,"tag":140,"props":2192,"children":2193},{"class":142,"line":170},[2194],{"type":45,"tag":140,"props":2195,"children":2196},{"style":1844},[2197],{"type":51,"value":2198},"# ❌ WRONG - \"run uv\" instead of \"uv run\"\n",{"type":45,"tag":140,"props":2200,"children":2201},{"class":142,"line":1040},[2202,2206,2210,2214,2218,2222,2226,2231,2235],{"type":45,"tag":140,"props":2203,"children":2204},{"style":498},[2205],{"type":51,"value":1787},{"type":45,"tag":140,"props":2207,"children":2208},{"style":504},[2209],{"type":51,"value":2128},{"type":45,"tag":140,"props":2211,"children":2212},{"style":504},[2213],{"type":51,"value":507},{"type":45,"tag":140,"props":2215,"children":2216},{"style":504},[2217],{"type":51,"value":2133},{"type":45,"tag":140,"props":2219,"children":2220},{"style":2170},[2221],{"type":51,"value":2173},{"type":45,"tag":140,"props":2223,"children":2224},{"style":504},[2225],{"type":51,"value":2178},{"type":45,"tag":140,"props":2227,"children":2228},{"style":2170},[2229],{"type":51,"value":2230},"\"",{"type":45,"tag":140,"props":2232,"children":2233},{"style":504},[2234],{"type":51,"value":2142},{"type":45,"tag":140,"props":2236,"children":2237},{"style":504},[2238],{"type":51,"value":2239}," a10g-large\n",{"type":45,"tag":140,"props":2241,"children":2242},{"class":142,"line":1049},[2243],{"type":45,"tag":140,"props":2244,"children":2245},{"emptyLinePlaceholder":1034},[2246],{"type":51,"value":1037},{"type":45,"tag":140,"props":2248,"children":2249},{"class":142,"line":1227},[2250],{"type":45,"tag":140,"props":2251,"children":2252},{"style":1844},[2253],{"type":51,"value":2254},"# ❌ WRONG - flags AFTER script URL (will be ignored!)\n",{"type":45,"tag":140,"props":2256,"children":2257},{"class":142,"line":1236},[2258,2262,2266,2270,2274,2278,2282,2286,2290],{"type":45,"tag":140,"props":2259,"children":2260},{"style":498},[2261],{"type":51,"value":1787},{"type":45,"tag":140,"props":2263,"children":2264},{"style":504},[2265],{"type":51,"value":2128},{"type":45,"tag":140,"props":2267,"children":2268},{"style":504},[2269],{"type":51,"value":2133},{"type":45,"tag":140,"props":2271,"children":2272},{"style":504},[2273],{"type":51,"value":507},{"type":45,"tag":140,"props":2275,"children":2276},{"style":2170},[2277],{"type":51,"value":2173},{"type":45,"tag":140,"props":2279,"children":2280},{"style":504},[2281],{"type":51,"value":2178},{"type":45,"tag":140,"props":2283,"children":2284},{"style":2170},[2285],{"type":51,"value":2230},{"type":45,"tag":140,"props":2287,"children":2288},{"style":504},[2289],{"type":51,"value":2142},{"type":45,"tag":140,"props":2291,"children":2292},{"style":504},[2293],{"type":51,"value":2239},{"type":45,"tag":140,"props":2295,"children":2296},{"class":142,"line":1245},[2297],{"type":45,"tag":140,"props":2298,"children":2299},{"emptyLinePlaceholder":1034},[2300],{"type":51,"value":1037},{"type":45,"tag":140,"props":2302,"children":2303},{"class":142,"line":1254},[2304],{"type":45,"tag":140,"props":2305,"children":2306},{"style":1844},[2307],{"type":51,"value":2308},"# ❌ WRONG - \"--secret\" instead of \"--secrets\" (plural)\n",{"type":45,"tag":140,"props":2310,"children":2311},{"class":142,"line":1263},[2312,2316,2320,2324,2328,2333,2337,2341,2345],{"type":45,"tag":140,"props":2313,"children":2314},{"style":498},[2315],{"type":51,"value":1787},{"type":45,"tag":140,"props":2317,"children":2318},{"style":504},[2319],{"type":51,"value":2128},{"type":45,"tag":140,"props":2321,"children":2322},{"style":504},[2323],{"type":51,"value":2133},{"type":45,"tag":140,"props":2325,"children":2326},{"style":504},[2327],{"type":51,"value":507},{"type":45,"tag":140,"props":2329,"children":2330},{"style":504},[2331],{"type":51,"value":2332}," --secret",{"type":45,"tag":140,"props":2334,"children":2335},{"style":504},[2336],{"type":51,"value":2167},{"type":45,"tag":140,"props":2338,"children":2339},{"style":2170},[2340],{"type":51,"value":2173},{"type":45,"tag":140,"props":2342,"children":2343},{"style":504},[2344],{"type":51,"value":2178},{"type":45,"tag":140,"props":2346,"children":2347},{"style":2170},[2348],{"type":51,"value":2183},{"type":45,"tag":61,"props":2350,"children":2351},{},[2352],{"type":45,"tag":70,"props":2353,"children":2354},{},[2355],{"type":51,"value":2356},"Key syntax rules:",{"type":45,"tag":352,"props":2358,"children":2359},{},[2360,2380,2407,2424],{"type":45,"tag":80,"props":2361,"children":2362},{},[2363,2365,2371,2373,2379],{"type":51,"value":2364},"Command order is ",{"type":45,"tag":136,"props":2366,"children":2368},{"className":2367},[],[2369],{"type":51,"value":2370},"hf jobs uv run",{"type":51,"value":2372}," (NOT ",{"type":45,"tag":136,"props":2374,"children":2376},{"className":2375},[],[2377],{"type":51,"value":2378},"hf jobs run uv",{"type":51,"value":995},{"type":45,"tag":80,"props":2381,"children":2382},{},[2383,2385,2391,2392,2398,2399,2405],{"type":51,"value":2384},"All flags (",{"type":45,"tag":136,"props":2386,"children":2388},{"className":2387},[],[2389],{"type":51,"value":2390},"--flavor",{"type":51,"value":456},{"type":45,"tag":136,"props":2393,"children":2395},{"className":2394},[],[2396],{"type":51,"value":2397},"--timeout",{"type":51,"value":456},{"type":45,"tag":136,"props":2400,"children":2402},{"className":2401},[],[2403],{"type":51,"value":2404},"--secrets",{"type":51,"value":2406},") must come BEFORE the script URL",{"type":45,"tag":80,"props":2408,"children":2409},{},[2410,2411,2416,2418],{"type":51,"value":250},{"type":45,"tag":136,"props":2412,"children":2414},{"className":2413},[],[2415],{"type":51,"value":2404},{"type":51,"value":2417}," (plural), not ",{"type":45,"tag":136,"props":2419,"children":2421},{"className":2420},[],[2422],{"type":51,"value":2423},"--secret",{"type":45,"tag":80,"props":2425,"children":2426},{},[2427],{"type":51,"value":2428},"Script URL must be the last positional argument",{"type":45,"tag":61,"props":2430,"children":2431},{},[2432],{"type":45,"tag":70,"props":2433,"children":2434},{},[2435],{"type":51,"value":2436},"Complete CLI example:",{"type":45,"tag":129,"props":2438,"children":2440},{"className":486,"code":2439,"language":488,"meta":133,"style":133},"hf jobs uv run \\\n  --flavor a10g-large \\\n  --timeout 2h \\\n  --secrets HF_TOKEN \\\n  \"https:\u002F\u002Fhuggingface.co\u002Fuser\u002Frepo\u002Fresolve\u002Fmain\u002Ftrain.py\"\n",[2441],{"type":45,"tag":136,"props":2442,"children":2443},{"__ignoreMap":133},[2444,2469,2485,2501,2517],{"type":45,"tag":140,"props":2445,"children":2446},{"class":142,"line":143},[2447,2451,2455,2459,2463],{"type":45,"tag":140,"props":2448,"children":2449},{"style":498},[2450],{"type":51,"value":1787},{"type":45,"tag":140,"props":2452,"children":2453},{"style":504},[2454],{"type":51,"value":2128},{"type":45,"tag":140,"props":2456,"children":2457},{"style":504},[2458],{"type":51,"value":2133},{"type":45,"tag":140,"props":2460,"children":2461},{"style":504},[2462],{"type":51,"value":507},{"type":45,"tag":140,"props":2464,"children":2466},{"style":2465},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[2467],{"type":51,"value":2468}," \\\n",{"type":45,"tag":140,"props":2470,"children":2471},{"class":142,"line":152},[2472,2477,2481],{"type":45,"tag":140,"props":2473,"children":2474},{"style":504},[2475],{"type":51,"value":2476},"  --flavor",{"type":45,"tag":140,"props":2478,"children":2479},{"style":504},[2480],{"type":51,"value":2147},{"type":45,"tag":140,"props":2482,"children":2483},{"style":2465},[2484],{"type":51,"value":2468},{"type":45,"tag":140,"props":2486,"children":2487},{"class":142,"line":161},[2488,2493,2497],{"type":45,"tag":140,"props":2489,"children":2490},{"style":504},[2491],{"type":51,"value":2492},"  --timeout",{"type":45,"tag":140,"props":2494,"children":2495},{"style":504},[2496],{"type":51,"value":2157},{"type":45,"tag":140,"props":2498,"children":2499},{"style":2465},[2500],{"type":51,"value":2468},{"type":45,"tag":140,"props":2502,"children":2503},{"class":142,"line":170},[2504,2509,2513],{"type":45,"tag":140,"props":2505,"children":2506},{"style":504},[2507],{"type":51,"value":2508},"  --secrets",{"type":45,"tag":140,"props":2510,"children":2511},{"style":504},[2512],{"type":51,"value":2167},{"type":45,"tag":140,"props":2514,"children":2515},{"style":2465},[2516],{"type":51,"value":2468},{"type":45,"tag":140,"props":2518,"children":2519},{"class":142,"line":1040},[2520,2525,2530],{"type":45,"tag":140,"props":2521,"children":2522},{"style":2170},[2523],{"type":51,"value":2524},"  \"",{"type":45,"tag":140,"props":2526,"children":2527},{"style":504},[2528],{"type":51,"value":2529},"https:\u002F\u002Fhuggingface.co\u002Fuser\u002Frepo\u002Fresolve\u002Fmain\u002Ftrain.py",{"type":45,"tag":140,"props":2531,"children":2532},{"style":2170},[2533],{"type":51,"value":2183},{"type":45,"tag":61,"props":2535,"children":2536},{},[2537],{"type":45,"tag":70,"props":2538,"children":2539},{},[2540],{"type":51,"value":2541},"Check job status via CLI:",{"type":45,"tag":129,"props":2543,"children":2545},{"className":486,"code":2544,"language":488,"meta":133,"style":133},"hf jobs ps                        # List all jobs\nhf jobs logs \u003Cjob-id>             # View logs\nhf jobs inspect \u003Cjob-id>          # Job details\nhf jobs cancel \u003Cjob-id>           # Cancel a job\n",[2546],{"type":45,"tag":136,"props":2547,"children":2548},{"__ignoreMap":133},[2549,2570,2611,2648],{"type":45,"tag":140,"props":2550,"children":2551},{"class":142,"line":143},[2552,2556,2560,2565],{"type":45,"tag":140,"props":2553,"children":2554},{"style":498},[2555],{"type":51,"value":1787},{"type":45,"tag":140,"props":2557,"children":2558},{"style":504},[2559],{"type":51,"value":2128},{"type":45,"tag":140,"props":2561,"children":2562},{"style":504},[2563],{"type":51,"value":2564}," ps",{"type":45,"tag":140,"props":2566,"children":2567},{"style":1844},[2568],{"type":51,"value":2569},"                        # List all jobs\n",{"type":45,"tag":140,"props":2571,"children":2572},{"class":142,"line":152},[2573,2577,2581,2586,2591,2596,2601,2606],{"type":45,"tag":140,"props":2574,"children":2575},{"style":498},[2576],{"type":51,"value":1787},{"type":45,"tag":140,"props":2578,"children":2579},{"style":504},[2580],{"type":51,"value":2128},{"type":45,"tag":140,"props":2582,"children":2583},{"style":504},[2584],{"type":51,"value":2585}," logs",{"type":45,"tag":140,"props":2587,"children":2588},{"style":2170},[2589],{"type":51,"value":2590}," \u003C",{"type":45,"tag":140,"props":2592,"children":2593},{"style":504},[2594],{"type":51,"value":2595},"job-i",{"type":45,"tag":140,"props":2597,"children":2598},{"style":2465},[2599],{"type":51,"value":2600},"d",{"type":45,"tag":140,"props":2602,"children":2603},{"style":2170},[2604],{"type":51,"value":2605},">",{"type":45,"tag":140,"props":2607,"children":2608},{"style":1844},[2609],{"type":51,"value":2610},"             # View logs\n",{"type":45,"tag":140,"props":2612,"children":2613},{"class":142,"line":161},[2614,2618,2622,2627,2631,2635,2639,2643],{"type":45,"tag":140,"props":2615,"children":2616},{"style":498},[2617],{"type":51,"value":1787},{"type":45,"tag":140,"props":2619,"children":2620},{"style":504},[2621],{"type":51,"value":2128},{"type":45,"tag":140,"props":2623,"children":2624},{"style":504},[2625],{"type":51,"value":2626}," inspect",{"type":45,"tag":140,"props":2628,"children":2629},{"style":2170},[2630],{"type":51,"value":2590},{"type":45,"tag":140,"props":2632,"children":2633},{"style":504},[2634],{"type":51,"value":2595},{"type":45,"tag":140,"props":2636,"children":2637},{"style":2465},[2638],{"type":51,"value":2600},{"type":45,"tag":140,"props":2640,"children":2641},{"style":2170},[2642],{"type":51,"value":2605},{"type":45,"tag":140,"props":2644,"children":2645},{"style":1844},[2646],{"type":51,"value":2647},"          # Job details\n",{"type":45,"tag":140,"props":2649,"children":2650},{"class":142,"line":170},[2651,2655,2659,2664,2668,2672,2676,2680],{"type":45,"tag":140,"props":2652,"children":2653},{"style":498},[2654],{"type":51,"value":1787},{"type":45,"tag":140,"props":2656,"children":2657},{"style":504},[2658],{"type":51,"value":2128},{"type":45,"tag":140,"props":2660,"children":2661},{"style":504},[2662],{"type":51,"value":2663}," cancel",{"type":45,"tag":140,"props":2665,"children":2666},{"style":2170},[2667],{"type":51,"value":2590},{"type":45,"tag":140,"props":2669,"children":2670},{"style":504},[2671],{"type":51,"value":2595},{"type":45,"tag":140,"props":2673,"children":2674},{"style":2465},[2675],{"type":51,"value":2600},{"type":45,"tag":140,"props":2677,"children":2678},{"style":2170},[2679],{"type":51,"value":2605},{"type":45,"tag":140,"props":2681,"children":2682},{"style":1844},[2683],{"type":51,"value":2684},"           # Cancel a job\n",{"type":45,"tag":240,"props":2686,"children":2688},{"id":2687},"approach-4-trl-jobs-package-simplified-training",[2689],{"type":51,"value":2690},"Approach 4: TRL Jobs Package (Simplified Training)",{"type":45,"tag":61,"props":2692,"children":2693},{},[2694,2695,2700],{"type":51,"value":2003},{"type":45,"tag":136,"props":2696,"children":2698},{"className":2697},[],[2699],{"type":51,"value":386},{"type":51,"value":2701}," package provides optimized defaults and one-liner training.",{"type":45,"tag":129,"props":2703,"children":2705},{"className":486,"code":2704,"language":488,"meta":133,"style":133},"uvx trl-jobs sft \\\n  --model_name Qwen\u002FQwen2.5-0.5B \\\n  --dataset_name trl-lib\u002FCapybara\n\n",[2706],{"type":45,"tag":136,"props":2707,"children":2708},{"__ignoreMap":133},[2709,2731,2748],{"type":45,"tag":140,"props":2710,"children":2711},{"class":142,"line":143},[2712,2717,2722,2727],{"type":45,"tag":140,"props":2713,"children":2714},{"style":498},[2715],{"type":51,"value":2716},"uvx",{"type":45,"tag":140,"props":2718,"children":2719},{"style":504},[2720],{"type":51,"value":2721}," trl-jobs",{"type":45,"tag":140,"props":2723,"children":2724},{"style":504},[2725],{"type":51,"value":2726}," sft",{"type":45,"tag":140,"props":2728,"children":2729},{"style":2465},[2730],{"type":51,"value":2468},{"type":45,"tag":140,"props":2732,"children":2733},{"class":142,"line":152},[2734,2739,2744],{"type":45,"tag":140,"props":2735,"children":2736},{"style":504},[2737],{"type":51,"value":2738},"  --model_name",{"type":45,"tag":140,"props":2740,"children":2741},{"style":504},[2742],{"type":51,"value":2743}," Qwen\u002FQwen2.5-0.5B",{"type":45,"tag":140,"props":2745,"children":2746},{"style":2465},[2747],{"type":51,"value":2468},{"type":45,"tag":140,"props":2749,"children":2750},{"class":142,"line":161},[2751,2756],{"type":45,"tag":140,"props":2752,"children":2753},{"style":504},[2754],{"type":51,"value":2755},"  --dataset_name",{"type":45,"tag":140,"props":2757,"children":2758},{"style":504},[2759],{"type":51,"value":2760}," trl-lib\u002FCapybara\n",{"type":45,"tag":61,"props":2762,"children":2763},{},[2764,2768,2770,2774,2776,2781,2782],{"type":45,"tag":70,"props":2765,"children":2766},{},[2767],{"type":51,"value":1543},{"type":51,"value":2769}," Pre-configured settings, automatic Trackio integration, automatic Hub push, one-line commands\n",{"type":45,"tag":70,"props":2771,"children":2772},{},[2773],{"type":51,"value":1550},{"type":51,"value":2775}," User working in terminal directly (not Codex context), quick local experimentation\n",{"type":45,"tag":70,"props":2777,"children":2778},{},[2779],{"type":51,"value":2780},"Repository:",{"type":51,"value":186},{"type":45,"tag":569,"props":2783,"children":2786},{"href":2784,"rel":2785},"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl-jobs",[573],[2787],{"type":51,"value":2784},{"type":45,"tag":61,"props":2789,"children":2790},{},[2791,2792],{"type":51,"value":696},{"type":45,"tag":70,"props":2793,"children":2794},{},[2795,2797,2802],{"type":51,"value":2796},"In Codex context, prefer using ",{"type":45,"tag":136,"props":2798,"children":2800},{"className":2799},[],[2801],{"type":51,"value":368},{"type":51,"value":2803}," MCP tool (Approach 1) when available.",{"type":45,"tag":54,"props":2805,"children":2807},{"id":2806},"hardware-selection",[2808],{"type":51,"value":2809},"Hardware Selection",{"type":45,"tag":2811,"props":2812,"children":2813},"table",{},[2814,2843],{"type":45,"tag":2815,"props":2816,"children":2817},"thead",{},[2818],{"type":45,"tag":2819,"props":2820,"children":2821},"tr",{},[2822,2828,2833,2838],{"type":45,"tag":2823,"props":2824,"children":2825},"th",{},[2826],{"type":51,"value":2827},"Model Size",{"type":45,"tag":2823,"props":2829,"children":2830},{},[2831],{"type":51,"value":2832},"Recommended Hardware",{"type":45,"tag":2823,"props":2834,"children":2835},{},[2836],{"type":51,"value":2837},"Cost (approx\u002Fhr)",{"type":45,"tag":2823,"props":2839,"children":2840},{},[2841],{"type":51,"value":2842},"Use Case",{"type":45,"tag":2844,"props":2845,"children":2846},"tbody",{},[2847,2875,2909,2943,2976],{"type":45,"tag":2819,"props":2848,"children":2849},{},[2850,2856,2865,2870],{"type":45,"tag":2851,"props":2852,"children":2853},"td",{},[2854],{"type":51,"value":2855},"\u003C1B params",{"type":45,"tag":2851,"props":2857,"children":2858},{},[2859],{"type":45,"tag":136,"props":2860,"children":2862},{"className":2861},[],[2863],{"type":51,"value":2864},"t4-small",{"type":45,"tag":2851,"props":2866,"children":2867},{},[2868],{"type":51,"value":2869},"~$0.75",{"type":45,"tag":2851,"props":2871,"children":2872},{},[2873],{"type":51,"value":2874},"Demos, quick tests only without eval steps",{"type":45,"tag":2819,"props":2876,"children":2877},{},[2878,2883,2899,2904],{"type":45,"tag":2851,"props":2879,"children":2880},{},[2881],{"type":51,"value":2882},"1-3B params",{"type":45,"tag":2851,"props":2884,"children":2885},{},[2886,2892,2893],{"type":45,"tag":136,"props":2887,"children":2889},{"className":2888},[],[2890],{"type":51,"value":2891},"t4-medium",{"type":51,"value":456},{"type":45,"tag":136,"props":2894,"children":2896},{"className":2895},[],[2897],{"type":51,"value":2898},"l4x1",{"type":45,"tag":2851,"props":2900,"children":2901},{},[2902],{"type":51,"value":2903},"~$1.50-2.50",{"type":45,"tag":2851,"props":2905,"children":2906},{},[2907],{"type":51,"value":2908},"Development",{"type":45,"tag":2819,"props":2910,"children":2911},{},[2912,2917,2933,2938],{"type":45,"tag":2851,"props":2913,"children":2914},{},[2915],{"type":51,"value":2916},"3-7B params",{"type":45,"tag":2851,"props":2918,"children":2919},{},[2920,2926,2927],{"type":45,"tag":136,"props":2921,"children":2923},{"className":2922},[],[2924],{"type":51,"value":2925},"a10g-small",{"type":51,"value":456},{"type":45,"tag":136,"props":2928,"children":2930},{"className":2929},[],[2931],{"type":51,"value":2932},"a10g-large",{"type":45,"tag":2851,"props":2934,"children":2935},{},[2936],{"type":51,"value":2937},"~$3.50-5.00",{"type":45,"tag":2851,"props":2939,"children":2940},{},[2941],{"type":51,"value":2942},"Production training",{"type":45,"tag":2819,"props":2944,"children":2945},{},[2946,2951,2966,2971],{"type":45,"tag":2851,"props":2947,"children":2948},{},[2949],{"type":51,"value":2950},"7-13B params",{"type":45,"tag":2851,"props":2952,"children":2953},{},[2954,2959,2960],{"type":45,"tag":136,"props":2955,"children":2957},{"className":2956},[],[2958],{"type":51,"value":2932},{"type":51,"value":456},{"type":45,"tag":136,"props":2961,"children":2963},{"className":2962},[],[2964],{"type":51,"value":2965},"a100-large",{"type":45,"tag":2851,"props":2967,"children":2968},{},[2969],{"type":51,"value":2970},"~$5-10",{"type":45,"tag":2851,"props":2972,"children":2973},{},[2974],{"type":51,"value":2975},"Large models (use LoRA)",{"type":45,"tag":2819,"props":2977,"children":2978},{},[2979,2984,2999,3004],{"type":45,"tag":2851,"props":2980,"children":2981},{},[2982],{"type":51,"value":2983},"13B+ params",{"type":45,"tag":2851,"props":2985,"children":2986},{},[2987,2992,2993],{"type":45,"tag":136,"props":2988,"children":2990},{"className":2989},[],[2991],{"type":51,"value":2965},{"type":51,"value":456},{"type":45,"tag":136,"props":2994,"children":2996},{"className":2995},[],[2997],{"type":51,"value":2998},"a10g-largex2",{"type":45,"tag":2851,"props":3000,"children":3001},{},[3002],{"type":51,"value":3003},"~$10-20",{"type":45,"tag":2851,"props":3005,"children":3006},{},[3007],{"type":51,"value":3008},"Very large (use LoRA)",{"type":45,"tag":61,"props":3010,"children":3011},{},[3012,3017],{"type":45,"tag":70,"props":3013,"children":3014},{},[3015],{"type":51,"value":3016},"GPU Flavors:",{"type":51,"value":3018}," cpu-basic\u002Fupgrade\u002Fperformance\u002Fxl, t4-small\u002Fmedium, l4x1\u002Fx4, a10g-small\u002Flarge\u002Flargex2\u002Flargex4, a100-large, h100\u002Fh100x8",{"type":45,"tag":61,"props":3020,"children":3021},{},[3022],{"type":45,"tag":70,"props":3023,"children":3024},{},[3025],{"type":51,"value":3026},"Guidelines:",{"type":45,"tag":76,"props":3028,"children":3029},{},[3030,3041,3046],{"type":45,"tag":80,"props":3031,"children":3032},{},[3033,3034,3039],{"type":51,"value":250},{"type":45,"tag":70,"props":3035,"children":3036},{},[3037],{"type":51,"value":3038},"LoRA\u002FPEFT",{"type":51,"value":3040}," for models >7B to reduce memory",{"type":45,"tag":80,"props":3042,"children":3043},{},[3044],{"type":51,"value":3045},"Multi-GPU automatically handled by TRL\u002FAccelerate",{"type":45,"tag":80,"props":3047,"children":3048},{},[3049],{"type":51,"value":3050},"Start with smaller hardware for testing",{"type":45,"tag":61,"props":3052,"children":3053},{},[3054,3059,3060,3066],{"type":45,"tag":70,"props":3055,"children":3056},{},[3057],{"type":51,"value":3058},"See:",{"type":51,"value":186},{"type":45,"tag":136,"props":3061,"children":3063},{"className":3062},[],[3064],{"type":51,"value":3065},"references\u002Fhardware_guide.md",{"type":51,"value":3067}," for detailed specifications",{"type":45,"tag":54,"props":3069,"children":3071},{"id":3070},"critical-saving-results-to-hub",[3072],{"type":51,"value":3073},"Critical: Saving Results to Hub",{"type":45,"tag":61,"props":3075,"children":3076},{},[3077],{"type":45,"tag":70,"props":3078,"children":3079},{},[3080],{"type":51,"value":3081},"⚠️ EPHEMERAL ENVIRONMENT—MUST PUSH TO HUB",{"type":45,"tag":61,"props":3083,"children":3084},{},[3085,3087,3092],{"type":51,"value":3086},"The Jobs environment is temporary. All files are deleted when the job ends. If the model isn't pushed to Hub, ",{"type":45,"tag":70,"props":3088,"children":3089},{},[3090],{"type":51,"value":3091},"ALL TRAINING IS LOST",{"type":51,"value":410},{"type":45,"tag":240,"props":3094,"children":3096},{"id":3095},"required-configuration",[3097],{"type":51,"value":3098},"Required Configuration",{"type":45,"tag":61,"props":3100,"children":3101},{},[3102],{"type":45,"tag":70,"props":3103,"children":3104},{},[3105],{"type":51,"value":3106},"In training script\u002Fconfig:",{"type":45,"tag":129,"props":3108,"children":3110},{"className":131,"code":3109,"language":24,"meta":133,"style":133},"SFTConfig(\n    push_to_hub=True,\n    hub_model_id=\"username\u002Fmodel-name\",  # MUST specify\n    hub_strategy=\"every_save\",  # Optional: push checkpoints\n)\n",[3111],{"type":45,"tag":136,"props":3112,"children":3113},{"__ignoreMap":133},[3114,3122,3130,3138,3146],{"type":45,"tag":140,"props":3115,"children":3116},{"class":142,"line":143},[3117],{"type":45,"tag":140,"props":3118,"children":3119},{},[3120],{"type":51,"value":3121},"SFTConfig(\n",{"type":45,"tag":140,"props":3123,"children":3124},{"class":142,"line":152},[3125],{"type":45,"tag":140,"props":3126,"children":3127},{},[3128],{"type":51,"value":3129},"    push_to_hub=True,\n",{"type":45,"tag":140,"props":3131,"children":3132},{"class":142,"line":161},[3133],{"type":45,"tag":140,"props":3134,"children":3135},{},[3136],{"type":51,"value":3137},"    hub_model_id=\"username\u002Fmodel-name\",  # MUST specify\n",{"type":45,"tag":140,"props":3139,"children":3140},{"class":142,"line":170},[3141],{"type":45,"tag":140,"props":3142,"children":3143},{},[3144],{"type":51,"value":3145},"    hub_strategy=\"every_save\",  # Optional: push checkpoints\n",{"type":45,"tag":140,"props":3147,"children":3148},{"class":142,"line":1040},[3149],{"type":45,"tag":140,"props":3150,"children":3151},{},[3152],{"type":51,"value":1464},{"type":45,"tag":61,"props":3154,"children":3155},{},[3156],{"type":45,"tag":70,"props":3157,"children":3158},{},[3159],{"type":51,"value":3160},"In job submission:",{"type":45,"tag":129,"props":3162,"children":3164},{"className":131,"code":3163,"language":24,"meta":133,"style":133},"{\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}  # Enables authentication\n}\n",[3165],{"type":45,"tag":136,"props":3166,"children":3167},{"__ignoreMap":133},[3168,3176,3184],{"type":45,"tag":140,"props":3169,"children":3170},{"class":142,"line":143},[3171],{"type":45,"tag":140,"props":3172,"children":3173},{},[3174],{"type":51,"value":3175},"{\n",{"type":45,"tag":140,"props":3177,"children":3178},{"class":142,"line":152},[3179],{"type":45,"tag":140,"props":3180,"children":3181},{},[3182],{"type":51,"value":3183},"    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}  # Enables authentication\n",{"type":45,"tag":140,"props":3185,"children":3186},{"class":142,"line":161},[3187],{"type":45,"tag":140,"props":3188,"children":3189},{},[3190],{"type":51,"value":3191},"}\n",{"type":45,"tag":240,"props":3193,"children":3195},{"id":3194},"verification-checklist",[3196],{"type":51,"value":3197},"Verification Checklist",{"type":45,"tag":61,"props":3199,"children":3200},{},[3201],{"type":51,"value":3202},"Before submitting:",{"type":45,"tag":76,"props":3204,"children":3207},{"className":3205},[3206],"contains-task-list",[3208,3226,3242,3258],{"type":45,"tag":80,"props":3209,"children":3212},{"className":3210},[3211],"task-list-item",[3213,3218,3219,3224],{"type":45,"tag":3214,"props":3215,"children":3217},"input",{"disabled":1034,"type":3216},"checkbox",[],{"type":51,"value":186},{"type":45,"tag":136,"props":3220,"children":3222},{"className":3221},[],[3223],{"type":51,"value":730},{"type":51,"value":3225}," set in config",{"type":45,"tag":80,"props":3227,"children":3229},{"className":3228},[3211],[3230,3233,3234,3240],{"type":45,"tag":3214,"props":3231,"children":3232},{"disabled":1034,"type":3216},[],{"type":51,"value":186},{"type":45,"tag":136,"props":3235,"children":3237},{"className":3236},[],[3238],{"type":51,"value":3239},"hub_model_id",{"type":51,"value":3241}," includes username\u002Frepo-name",{"type":45,"tag":80,"props":3243,"children":3245},{"className":3244},[3211],[3246,3249,3250,3256],{"type":45,"tag":3214,"props":3247,"children":3248},{"disabled":1034,"type":3216},[],{"type":51,"value":186},{"type":45,"tag":136,"props":3251,"children":3253},{"className":3252},[],[3254],{"type":51,"value":3255},"secrets",{"type":51,"value":3257}," parameter includes HF_TOKEN",{"type":45,"tag":80,"props":3259,"children":3261},{"className":3260},[3211],[3262,3265],{"type":45,"tag":3214,"props":3263,"children":3264},{"disabled":1034,"type":3216},[],{"type":51,"value":3266}," User has write access to target repo",{"type":45,"tag":61,"props":3268,"children":3269},{},[3270,3274,3275,3281],{"type":45,"tag":70,"props":3271,"children":3272},{},[3273],{"type":51,"value":3058},{"type":51,"value":186},{"type":45,"tag":136,"props":3276,"children":3278},{"className":3277},[],[3279],{"type":51,"value":3280},"references\u002Fhub_saving.md",{"type":51,"value":3282}," for detailed troubleshooting",{"type":45,"tag":54,"props":3284,"children":3286},{"id":3285},"timeout-management",[3287],{"type":51,"value":3288},"Timeout Management",{"type":45,"tag":61,"props":3290,"children":3291},{},[3292],{"type":45,"tag":70,"props":3293,"children":3294},{},[3295],{"type":51,"value":3296},"⚠️ DEFAULT: 30 MINUTES—TOO SHORT FOR TRAINING",{"type":45,"tag":240,"props":3298,"children":3300},{"id":3299},"setting-timeouts",[3301],{"type":51,"value":3302},"Setting Timeouts",{"type":45,"tag":129,"props":3304,"children":3306},{"className":131,"code":3305,"language":24,"meta":133,"style":133},"{\n    \"timeout\": \"2h\"   # 2 hours (formats: \"90m\", \"2h\", \"1.5h\", or seconds as integer)\n}\n",[3307],{"type":45,"tag":136,"props":3308,"children":3309},{"__ignoreMap":133},[3310,3317,3325],{"type":45,"tag":140,"props":3311,"children":3312},{"class":142,"line":143},[3313],{"type":45,"tag":140,"props":3314,"children":3315},{},[3316],{"type":51,"value":3175},{"type":45,"tag":140,"props":3318,"children":3319},{"class":142,"line":152},[3320],{"type":45,"tag":140,"props":3321,"children":3322},{},[3323],{"type":51,"value":3324},"    \"timeout\": \"2h\"   # 2 hours (formats: \"90m\", \"2h\", \"1.5h\", or seconds as integer)\n",{"type":45,"tag":140,"props":3326,"children":3327},{"class":142,"line":161},[3328],{"type":45,"tag":140,"props":3329,"children":3330},{},[3331],{"type":51,"value":3191},{"type":45,"tag":240,"props":3333,"children":3335},{"id":3334},"timeout-guidelines",[3336],{"type":51,"value":3337},"Timeout Guidelines",{"type":45,"tag":2811,"props":3339,"children":3340},{},[3341,3362],{"type":45,"tag":2815,"props":3342,"children":3343},{},[3344],{"type":45,"tag":2819,"props":3345,"children":3346},{},[3347,3352,3357],{"type":45,"tag":2823,"props":3348,"children":3349},{},[3350],{"type":51,"value":3351},"Scenario",{"type":45,"tag":2823,"props":3353,"children":3354},{},[3355],{"type":51,"value":3356},"Recommended",{"type":45,"tag":2823,"props":3358,"children":3359},{},[3360],{"type":51,"value":3361},"Notes",{"type":45,"tag":2844,"props":3363,"children":3364},{},[3365,3383,3401,3419],{"type":45,"tag":2819,"props":3366,"children":3367},{},[3368,3373,3378],{"type":45,"tag":2851,"props":3369,"children":3370},{},[3371],{"type":51,"value":3372},"Quick demo (50-100 examples)",{"type":45,"tag":2851,"props":3374,"children":3375},{},[3376],{"type":51,"value":3377},"10-30 min",{"type":45,"tag":2851,"props":3379,"children":3380},{},[3381],{"type":51,"value":3382},"Verify setup",{"type":45,"tag":2819,"props":3384,"children":3385},{},[3386,3391,3396],{"type":45,"tag":2851,"props":3387,"children":3388},{},[3389],{"type":51,"value":3390},"Development training",{"type":45,"tag":2851,"props":3392,"children":3393},{},[3394],{"type":51,"value":3395},"1-2 hours",{"type":45,"tag":2851,"props":3397,"children":3398},{},[3399],{"type":51,"value":3400},"Small datasets",{"type":45,"tag":2819,"props":3402,"children":3403},{},[3404,3409,3414],{"type":45,"tag":2851,"props":3405,"children":3406},{},[3407],{"type":51,"value":3408},"Production (3-7B model)",{"type":45,"tag":2851,"props":3410,"children":3411},{},[3412],{"type":51,"value":3413},"4-6 hours",{"type":45,"tag":2851,"props":3415,"children":3416},{},[3417],{"type":51,"value":3418},"Full datasets",{"type":45,"tag":2819,"props":3420,"children":3421},{},[3422,3427,3432],{"type":45,"tag":2851,"props":3423,"children":3424},{},[3425],{"type":51,"value":3426},"Large model with LoRA",{"type":45,"tag":2851,"props":3428,"children":3429},{},[3430],{"type":51,"value":3431},"3-6 hours",{"type":45,"tag":2851,"props":3433,"children":3434},{},[3435],{"type":51,"value":3436},"Depends on dataset",{"type":45,"tag":61,"props":3438,"children":3439},{},[3440,3445],{"type":45,"tag":70,"props":3441,"children":3442},{},[3443],{"type":51,"value":3444},"Always add 20-30% buffer",{"type":51,"value":3446}," for model\u002Fdataset loading, checkpoint saving, Hub push operations, and network delays.",{"type":45,"tag":61,"props":3448,"children":3449},{},[3450,3455],{"type":45,"tag":70,"props":3451,"children":3452},{},[3453],{"type":51,"value":3454},"On timeout:",{"type":51,"value":3456}," Job killed immediately, all unsaved progress lost, must restart from beginning",{"type":45,"tag":54,"props":3458,"children":3460},{"id":3459},"cost-estimation",[3461],{"type":51,"value":3462},"Cost Estimation",{"type":45,"tag":61,"props":3464,"children":3465},{},[3466,3471,3473,3479],{"type":45,"tag":70,"props":3467,"children":3468},{},[3469],{"type":51,"value":3470},"Offer to estimate cost when planning jobs with known parameters.",{"type":51,"value":3472}," Use ",{"type":45,"tag":136,"props":3474,"children":3476},{"className":3475},[],[3477],{"type":51,"value":3478},"scripts\u002Festimate_cost.py",{"type":51,"value":483},{"type":45,"tag":129,"props":3481,"children":3483},{"className":486,"code":3482,"language":488,"meta":133,"style":133},"uv run scripts\u002Festimate_cost.py \\\n  --model meta-llama\u002FLlama-2-7b-hf \\\n  --dataset trl-lib\u002FCapybara \\\n  --hardware a10g-large \\\n  --dataset-size 16000 \\\n  --epochs 3\n",[3484],{"type":45,"tag":136,"props":3485,"children":3486},{"__ignoreMap":133},[3487,3506,3523,3540,3556,3574],{"type":45,"tag":140,"props":3488,"children":3489},{"class":142,"line":143},[3490,3494,3498,3502],{"type":45,"tag":140,"props":3491,"children":3492},{"style":498},[3493],{"type":51,"value":501},{"type":45,"tag":140,"props":3495,"children":3496},{"style":504},[3497],{"type":51,"value":507},{"type":45,"tag":140,"props":3499,"children":3500},{"style":504},[3501],{"type":51,"value":512},{"type":45,"tag":140,"props":3503,"children":3504},{"style":2465},[3505],{"type":51,"value":2468},{"type":45,"tag":140,"props":3507,"children":3508},{"class":142,"line":152},[3509,3514,3519],{"type":45,"tag":140,"props":3510,"children":3511},{"style":504},[3512],{"type":51,"value":3513},"  --model",{"type":45,"tag":140,"props":3515,"children":3516},{"style":504},[3517],{"type":51,"value":3518}," meta-llama\u002FLlama-2-7b-hf",{"type":45,"tag":140,"props":3520,"children":3521},{"style":2465},[3522],{"type":51,"value":2468},{"type":45,"tag":140,"props":3524,"children":3525},{"class":142,"line":161},[3526,3531,3536],{"type":45,"tag":140,"props":3527,"children":3528},{"style":504},[3529],{"type":51,"value":3530},"  --dataset",{"type":45,"tag":140,"props":3532,"children":3533},{"style":504},[3534],{"type":51,"value":3535}," trl-lib\u002FCapybara",{"type":45,"tag":140,"props":3537,"children":3538},{"style":2465},[3539],{"type":51,"value":2468},{"type":45,"tag":140,"props":3541,"children":3542},{"class":142,"line":170},[3543,3548,3552],{"type":45,"tag":140,"props":3544,"children":3545},{"style":504},[3546],{"type":51,"value":3547},"  --hardware",{"type":45,"tag":140,"props":3549,"children":3550},{"style":504},[3551],{"type":51,"value":2147},{"type":45,"tag":140,"props":3553,"children":3554},{"style":2465},[3555],{"type":51,"value":2468},{"type":45,"tag":140,"props":3557,"children":3558},{"class":142,"line":1040},[3559,3564,3570],{"type":45,"tag":140,"props":3560,"children":3561},{"style":504},[3562],{"type":51,"value":3563},"  --dataset-size",{"type":45,"tag":140,"props":3565,"children":3567},{"style":3566},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[3568],{"type":51,"value":3569}," 16000",{"type":45,"tag":140,"props":3571,"children":3572},{"style":2465},[3573],{"type":51,"value":2468},{"type":45,"tag":140,"props":3575,"children":3576},{"class":142,"line":1049},[3577,3582],{"type":45,"tag":140,"props":3578,"children":3579},{"style":504},[3580],{"type":51,"value":3581},"  --epochs",{"type":45,"tag":140,"props":3583,"children":3584},{"style":3566},[3585],{"type":51,"value":3586}," 3\n",{"type":45,"tag":61,"props":3588,"children":3589},{},[3590],{"type":51,"value":3591},"Output includes estimated time, cost, recommended timeout (with buffer), and optimization suggestions.",{"type":45,"tag":61,"props":3593,"children":3594},{},[3595,3600],{"type":45,"tag":70,"props":3596,"children":3597},{},[3598],{"type":51,"value":3599},"When to offer:",{"type":51,"value":3601}," User planning a job, asks about cost\u002Ftime, choosing hardware, job will run >1 hour or cost >$5",{"type":45,"tag":54,"props":3603,"children":3605},{"id":3604},"example-training-scripts",[3606],{"type":51,"value":3607},"Example Training Scripts",{"type":45,"tag":61,"props":3609,"children":3610},{},[3611],{"type":45,"tag":70,"props":3612,"children":3613},{},[3614],{"type":51,"value":3615},"Production-ready templates with all best practices:",{"type":45,"tag":61,"props":3617,"children":3618},{},[3619],{"type":51,"value":3620},"Load these scripts for correctly:",{"type":45,"tag":76,"props":3622,"children":3623},{},[3624,3637,3650],{"type":45,"tag":80,"props":3625,"children":3626},{},[3627,3635],{"type":45,"tag":70,"props":3628,"children":3629},{},[3630],{"type":45,"tag":136,"props":3631,"children":3633},{"className":3632},[],[3634],{"type":51,"value":454},{"type":51,"value":3636}," - Complete SFT training with Trackio, LoRA, checkpoints",{"type":45,"tag":80,"props":3638,"children":3639},{},[3640,3648],{"type":45,"tag":70,"props":3641,"children":3642},{},[3643],{"type":45,"tag":136,"props":3644,"children":3646},{"className":3645},[],[3647],{"type":51,"value":462},{"type":51,"value":3649}," - DPO training for preference learning",{"type":45,"tag":80,"props":3651,"children":3652},{},[3653,3662],{"type":45,"tag":70,"props":3654,"children":3655},{},[3656],{"type":45,"tag":136,"props":3657,"children":3659},{"className":3658},[],[3660],{"type":51,"value":3661},"scripts\u002Ftrain_grpo_example.py",{"type":51,"value":3663}," - GRPO training for online RL",{"type":45,"tag":61,"props":3665,"children":3666},{},[3667,3669,3674],{"type":51,"value":3668},"These scripts demonstrate proper Hub saving, Trackio integration, checkpoint management, and optimized parameters. Pass their content inline to ",{"type":45,"tag":136,"props":3670,"children":3672},{"className":3671},[],[3673],{"type":51,"value":368},{"type":51,"value":3675}," or use as templates for custom scripts.",{"type":45,"tag":54,"props":3677,"children":3679},{"id":3678},"monitoring-and-tracking",[3680],{"type":51,"value":3681},"Monitoring and Tracking",{"type":45,"tag":61,"props":3683,"children":3684},{},[3685,3690,3692,3698],{"type":45,"tag":70,"props":3686,"children":3687},{},[3688],{"type":51,"value":3689},"Trackio",{"type":51,"value":3691}," provides real-time metrics visualization. See ",{"type":45,"tag":136,"props":3693,"children":3695},{"className":3694},[],[3696],{"type":51,"value":3697},"references\u002Ftrackio_guide.md",{"type":51,"value":3699}," for complete setup guide.",{"type":45,"tag":61,"props":3701,"children":3702},{},[3703],{"type":45,"tag":70,"props":3704,"children":3705},{},[3706],{"type":51,"value":3707},"Key points:",{"type":45,"tag":76,"props":3709,"children":3710},{},[3711,3724],{"type":45,"tag":80,"props":3712,"children":3713},{},[3714,3716,3722],{"type":51,"value":3715},"Add ",{"type":45,"tag":136,"props":3717,"children":3719},{"className":3718},[],[3720],{"type":51,"value":3721},"trackio",{"type":51,"value":3723}," to dependencies",{"type":45,"tag":80,"props":3725,"children":3726},{},[3727,3729],{"type":51,"value":3728},"Configure trainer with ",{"type":45,"tag":136,"props":3730,"children":3732},{"className":3731},[],[3733],{"type":51,"value":3734},"report_to=\"trackio\" and run_name=\"meaningful_name\"",{"type":45,"tag":240,"props":3736,"children":3738},{"id":3737},"trackio-configuration-defaults",[3739],{"type":51,"value":3740},"Trackio Configuration Defaults",{"type":45,"tag":61,"props":3742,"children":3743},{},[3744,3749],{"type":45,"tag":70,"props":3745,"children":3746},{},[3747],{"type":51,"value":3748},"Use sensible defaults unless user specifies otherwise.",{"type":51,"value":3750}," When generating training scripts with Trackio:",{"type":45,"tag":61,"props":3752,"children":3753},{},[3754],{"type":45,"tag":70,"props":3755,"children":3756},{},[3757],{"type":51,"value":3758},"Default Configuration:",{"type":45,"tag":76,"props":3760,"children":3761},{},[3762,3780,3790,3800],{"type":45,"tag":80,"props":3763,"children":3764},{},[3765,3770,3772,3778],{"type":45,"tag":70,"props":3766,"children":3767},{},[3768],{"type":51,"value":3769},"Space ID",{"type":51,"value":3771},": ",{"type":45,"tag":136,"props":3773,"children":3775},{"className":3774},[],[3776],{"type":51,"value":3777},"{username}\u002Ftrackio",{"type":51,"value":3779}," (use \"trackio\" as default space name)",{"type":45,"tag":80,"props":3781,"children":3782},{},[3783,3788],{"type":45,"tag":70,"props":3784,"children":3785},{},[3786],{"type":51,"value":3787},"Run naming",{"type":51,"value":3789},": Unless otherwise specified, name the run in a way the user will recognize (e.g., descriptive of the task, model, or purpose)",{"type":45,"tag":80,"props":3791,"children":3792},{},[3793,3798],{"type":45,"tag":70,"props":3794,"children":3795},{},[3796],{"type":51,"value":3797},"Config",{"type":51,"value":3799},": Keep minimal - only include hyperparameters and model\u002Fdataset info",{"type":45,"tag":80,"props":3801,"children":3802},{},[3803,3808],{"type":45,"tag":70,"props":3804,"children":3805},{},[3806],{"type":51,"value":3807},"Project Name",{"type":51,"value":3809},": Use a Project Name to associate runs with a particular Project",{"type":45,"tag":61,"props":3811,"children":3812},{},[3813,3818],{"type":45,"tag":70,"props":3814,"children":3815},{},[3816],{"type":51,"value":3817},"User overrides:",{"type":51,"value":3819}," If user requests specific trackio configuration (custom space, run naming, grouping, or additional config), apply their preferences instead of defaults.",{"type":45,"tag":61,"props":3821,"children":3822},{},[3823],{"type":51,"value":3824},"This is useful for managing multiple jobs with the same configuration or keeping training scripts portable.",{"type":45,"tag":61,"props":3826,"children":3827},{},[3828,3829,3834],{"type":51,"value":324},{"type":45,"tag":136,"props":3830,"children":3832},{"className":3831},[],[3833],{"type":51,"value":3697},{"type":51,"value":3835}," for complete documentation including grouping runs for experiments.",{"type":45,"tag":240,"props":3837,"children":3839},{"id":3838},"check-job-status",[3840],{"type":51,"value":3841},"Check Job Status",{"type":45,"tag":129,"props":3843,"children":3845},{"className":131,"code":3844,"language":24,"meta":133,"style":133},"# List all jobs\nhf_jobs(\"ps\")\n\n# Inspect specific job\nhf_jobs(\"inspect\", {\"job_id\": \"your-job-id\"})\n\n# View logs\nhf_jobs(\"logs\", {\"job_id\": \"your-job-id\"})\n",[3846],{"type":45,"tag":136,"props":3847,"children":3848},{"__ignoreMap":133},[3849,3857,3865,3872,3880,3888,3895,3903],{"type":45,"tag":140,"props":3850,"children":3851},{"class":142,"line":143},[3852],{"type":45,"tag":140,"props":3853,"children":3854},{},[3855],{"type":51,"value":3856},"# List all jobs\n",{"type":45,"tag":140,"props":3858,"children":3859},{"class":142,"line":152},[3860],{"type":45,"tag":140,"props":3861,"children":3862},{},[3863],{"type":51,"value":3864},"hf_jobs(\"ps\")\n",{"type":45,"tag":140,"props":3866,"children":3867},{"class":142,"line":161},[3868],{"type":45,"tag":140,"props":3869,"children":3870},{"emptyLinePlaceholder":1034},[3871],{"type":51,"value":1037},{"type":45,"tag":140,"props":3873,"children":3874},{"class":142,"line":170},[3875],{"type":45,"tag":140,"props":3876,"children":3877},{},[3878],{"type":51,"value":3879},"# Inspect specific job\n",{"type":45,"tag":140,"props":3881,"children":3882},{"class":142,"line":1040},[3883],{"type":45,"tag":140,"props":3884,"children":3885},{},[3886],{"type":51,"value":3887},"hf_jobs(\"inspect\", {\"job_id\": \"your-job-id\"})\n",{"type":45,"tag":140,"props":3889,"children":3890},{"class":142,"line":1049},[3891],{"type":45,"tag":140,"props":3892,"children":3893},{"emptyLinePlaceholder":1034},[3894],{"type":51,"value":1037},{"type":45,"tag":140,"props":3896,"children":3897},{"class":142,"line":1227},[3898],{"type":45,"tag":140,"props":3899,"children":3900},{},[3901],{"type":51,"value":3902},"# View logs\n",{"type":45,"tag":140,"props":3904,"children":3905},{"class":142,"line":1236},[3906],{"type":45,"tag":140,"props":3907,"children":3908},{},[3909],{"type":51,"value":3910},"hf_jobs(\"logs\", {\"job_id\": \"your-job-id\"})\n",{"type":45,"tag":61,"props":3912,"children":3913},{},[3914,3919],{"type":45,"tag":70,"props":3915,"children":3916},{},[3917],{"type":51,"value":3918},"Remember:",{"type":51,"value":3920}," Wait for user to request status checks. Avoid polling repeatedly.",{"type":45,"tag":54,"props":3922,"children":3924},{"id":3923},"dataset-validation",[3925],{"type":51,"value":3926},"Dataset Validation",{"type":45,"tag":61,"props":3928,"children":3929},{},[3930],{"type":45,"tag":70,"props":3931,"children":3932},{},[3933],{"type":51,"value":3934},"Validate dataset format BEFORE launching GPU training to prevent the #1 cause of training failures: format mismatches.",{"type":45,"tag":240,"props":3936,"children":3938},{"id":3937},"why-validate",[3939],{"type":51,"value":3940},"Why Validate",{"type":45,"tag":76,"props":3942,"children":3943},{},[3944,3949,3975,3980],{"type":45,"tag":80,"props":3945,"children":3946},{},[3947],{"type":51,"value":3948},"50%+ of training failures are due to dataset format issues",{"type":45,"tag":80,"props":3950,"children":3951},{},[3952,3954,3960,3961,3967,3968,3974],{"type":51,"value":3953},"DPO especially strict: requires exact column names (",{"type":45,"tag":136,"props":3955,"children":3957},{"className":3956},[],[3958],{"type":51,"value":3959},"prompt",{"type":51,"value":456},{"type":45,"tag":136,"props":3962,"children":3964},{"className":3963},[],[3965],{"type":51,"value":3966},"chosen",{"type":51,"value":456},{"type":45,"tag":136,"props":3969,"children":3971},{"className":3970},[],[3972],{"type":51,"value":3973},"rejected",{"type":51,"value":995},{"type":45,"tag":80,"props":3976,"children":3977},{},[3978],{"type":51,"value":3979},"Failed GPU jobs waste $1-10 and 30-60 minutes",{"type":45,"tag":80,"props":3981,"children":3982},{},[3983],{"type":51,"value":3984},"Validation on CPU costs ~$0.01 and takes \u003C1 minute",{"type":45,"tag":240,"props":3986,"children":3988},{"id":3987},"when-to-validate",[3989],{"type":51,"value":3990},"When to Validate",{"type":45,"tag":61,"props":3992,"children":3993},{},[3994],{"type":45,"tag":70,"props":3995,"children":3996},{},[3997],{"type":51,"value":3998},"ALWAYS validate for:",{"type":45,"tag":76,"props":4000,"children":4001},{},[4002,4007,4012],{"type":45,"tag":80,"props":4003,"children":4004},{},[4005],{"type":51,"value":4006},"Unknown or custom datasets",{"type":45,"tag":80,"props":4008,"children":4009},{},[4010],{"type":51,"value":4011},"DPO training (CRITICAL - 90% of datasets need mapping)",{"type":45,"tag":80,"props":4013,"children":4014},{},[4015],{"type":51,"value":4016},"Any dataset not explicitly TRL-compatible",{"type":45,"tag":61,"props":4018,"children":4019},{},[4020],{"type":45,"tag":70,"props":4021,"children":4022},{},[4023],{"type":51,"value":4024},"Skip validation for known TRL datasets:",{"type":45,"tag":76,"props":4026,"children":4027},{},[4028],{"type":45,"tag":80,"props":4029,"children":4030},{},[4031,4037,4038,4044,4045,4051],{"type":45,"tag":136,"props":4032,"children":4034},{"className":4033},[],[4035],{"type":51,"value":4036},"trl-lib\u002Fultrachat_200k",{"type":51,"value":456},{"type":45,"tag":136,"props":4039,"children":4041},{"className":4040},[],[4042],{"type":51,"value":4043},"trl-lib\u002FCapybara",{"type":51,"value":456},{"type":45,"tag":136,"props":4046,"children":4048},{"className":4047},[],[4049],{"type":51,"value":4050},"HuggingFaceH4\u002Fultrachat_200k",{"type":51,"value":4052},", etc.",{"type":45,"tag":240,"props":4054,"children":4056},{"id":4055},"usage",[4057],{"type":51,"value":4058},"Usage",{"type":45,"tag":129,"props":4060,"children":4062},{"className":131,"code":4061,"language":24,"meta":133,"style":133},"hf_jobs(\"uv\", {\n    \"script\": \"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py\",\n    \"script_args\": [\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"]\n})\n",[4063],{"type":45,"tag":136,"props":4064,"children":4065},{"__ignoreMap":133},[4066,4073,4081,4089],{"type":45,"tag":140,"props":4067,"children":4068},{"class":142,"line":143},[4069],{"type":45,"tag":140,"props":4070,"children":4071},{},[4072],{"type":51,"value":1176},{"type":45,"tag":140,"props":4074,"children":4075},{"class":142,"line":152},[4076],{"type":45,"tag":140,"props":4077,"children":4078},{},[4079],{"type":51,"value":4080},"    \"script\": \"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py\",\n",{"type":45,"tag":140,"props":4082,"children":4083},{"class":142,"line":161},[4084],{"type":45,"tag":140,"props":4085,"children":4086},{},[4087],{"type":51,"value":4088},"    \"script_args\": [\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"]\n",{"type":45,"tag":140,"props":4090,"children":4091},{"class":142,"line":170},[4092],{"type":45,"tag":140,"props":4093,"children":4094},{},[4095],{"type":51,"value":1535},{"type":45,"tag":61,"props":4097,"children":4098},{},[4099],{"type":51,"value":4100},"The script is fast, and will usually complete synchronously.",{"type":45,"tag":240,"props":4102,"children":4104},{"id":4103},"reading-results",[4105],{"type":51,"value":4106},"Reading Results",{"type":45,"tag":61,"props":4108,"children":4109},{},[4110],{"type":51,"value":4111},"The output shows compatibility for each training method:",{"type":45,"tag":76,"props":4113,"children":4114},{},[4115,4129,4143],{"type":45,"tag":80,"props":4116,"children":4117},{},[4118,4127],{"type":45,"tag":70,"props":4119,"children":4120},{},[4121],{"type":45,"tag":136,"props":4122,"children":4124},{"className":4123},[],[4125],{"type":51,"value":4126},"✓ READY",{"type":51,"value":4128}," - Dataset is compatible, use directly",{"type":45,"tag":80,"props":4130,"children":4131},{},[4132,4141],{"type":45,"tag":70,"props":4133,"children":4134},{},[4135],{"type":45,"tag":136,"props":4136,"children":4138},{"className":4137},[],[4139],{"type":51,"value":4140},"✗ NEEDS MAPPING",{"type":51,"value":4142}," - Compatible but needs preprocessing (mapping code provided)",{"type":45,"tag":80,"props":4144,"children":4145},{},[4146,4155],{"type":45,"tag":70,"props":4147,"children":4148},{},[4149],{"type":45,"tag":136,"props":4150,"children":4152},{"className":4151},[],[4153],{"type":51,"value":4154},"✗ INCOMPATIBLE",{"type":51,"value":4156}," - Cannot be used for this method",{"type":45,"tag":61,"props":4158,"children":4159},{},[4160,4162,4167],{"type":51,"value":4161},"When mapping is needed, the output includes a ",{"type":45,"tag":70,"props":4163,"children":4164},{},[4165],{"type":51,"value":4166},"\"MAPPING CODE\"",{"type":51,"value":4168}," section with copy-paste ready Python code.",{"type":45,"tag":240,"props":4170,"children":4172},{"id":4171},"example-workflow",[4173],{"type":51,"value":4174},"Example Workflow",{"type":45,"tag":129,"props":4176,"children":4178},{"className":131,"code":4177,"language":24,"meta":133,"style":133},"# 1. Inspect dataset (costs ~$0.01, \u003C1 min on CPU)\nhf_jobs(\"uv\", {\n    \"script\": \"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py\",\n    \"script_args\": [\"--dataset\", \"argilla\u002Fdistilabel-math-preference-dpo\", \"--split\", \"train\"]\n})\n\n# 2. Check output markers:\n#    ✓ READY → proceed with training\n#    ✗ NEEDS MAPPING → apply mapping code below\n#    ✗ INCOMPATIBLE → choose different method\u002Fdataset\n\n# 3. If mapping needed, apply before training:\ndef format_for_dpo(example):\n    return {\n        'prompt': example['instruction'],\n        'chosen': example['chosen_response'],\n        'rejected': example['rejected_response'],\n    }\ndataset = dataset.map(format_for_dpo, remove_columns=dataset.column_names)\n\n# 4. Launch training job with confidence\n",[4179],{"type":45,"tag":136,"props":4180,"children":4181},{"__ignoreMap":133},[4182,4190,4197,4204,4212,4219,4226,4234,4242,4250,4258,4265,4273,4281,4289,4297,4305,4313,4321,4329,4336],{"type":45,"tag":140,"props":4183,"children":4184},{"class":142,"line":143},[4185],{"type":45,"tag":140,"props":4186,"children":4187},{},[4188],{"type":51,"value":4189},"# 1. Inspect dataset (costs ~$0.01, \u003C1 min on CPU)\n",{"type":45,"tag":140,"props":4191,"children":4192},{"class":142,"line":152},[4193],{"type":45,"tag":140,"props":4194,"children":4195},{},[4196],{"type":51,"value":1176},{"type":45,"tag":140,"props":4198,"children":4199},{"class":142,"line":161},[4200],{"type":45,"tag":140,"props":4201,"children":4202},{},[4203],{"type":51,"value":4080},{"type":45,"tag":140,"props":4205,"children":4206},{"class":142,"line":170},[4207],{"type":45,"tag":140,"props":4208,"children":4209},{},[4210],{"type":51,"value":4211},"    \"script_args\": [\"--dataset\", \"argilla\u002Fdistilabel-math-preference-dpo\", \"--split\", \"train\"]\n",{"type":45,"tag":140,"props":4213,"children":4214},{"class":142,"line":1040},[4215],{"type":45,"tag":140,"props":4216,"children":4217},{},[4218],{"type":51,"value":1535},{"type":45,"tag":140,"props":4220,"children":4221},{"class":142,"line":1049},[4222],{"type":45,"tag":140,"props":4223,"children":4224},{"emptyLinePlaceholder":1034},[4225],{"type":51,"value":1037},{"type":45,"tag":140,"props":4227,"children":4228},{"class":142,"line":1227},[4229],{"type":45,"tag":140,"props":4230,"children":4231},{},[4232],{"type":51,"value":4233},"# 2. Check output markers:\n",{"type":45,"tag":140,"props":4235,"children":4236},{"class":142,"line":1236},[4237],{"type":45,"tag":140,"props":4238,"children":4239},{},[4240],{"type":51,"value":4241},"#    ✓ READY → proceed with training\n",{"type":45,"tag":140,"props":4243,"children":4244},{"class":142,"line":1245},[4245],{"type":45,"tag":140,"props":4246,"children":4247},{},[4248],{"type":51,"value":4249},"#    ✗ NEEDS MAPPING → apply mapping code below\n",{"type":45,"tag":140,"props":4251,"children":4252},{"class":142,"line":1254},[4253],{"type":45,"tag":140,"props":4254,"children":4255},{},[4256],{"type":51,"value":4257},"#    ✗ INCOMPATIBLE → choose different method\u002Fdataset\n",{"type":45,"tag":140,"props":4259,"children":4260},{"class":142,"line":1263},[4261],{"type":45,"tag":140,"props":4262,"children":4263},{"emptyLinePlaceholder":1034},[4264],{"type":51,"value":1037},{"type":45,"tag":140,"props":4266,"children":4267},{"class":142,"line":1271},[4268],{"type":45,"tag":140,"props":4269,"children":4270},{},[4271],{"type":51,"value":4272},"# 3. If mapping needed, apply before training:\n",{"type":45,"tag":140,"props":4274,"children":4275},{"class":142,"line":1280},[4276],{"type":45,"tag":140,"props":4277,"children":4278},{},[4279],{"type":51,"value":4280},"def format_for_dpo(example):\n",{"type":45,"tag":140,"props":4282,"children":4283},{"class":142,"line":1288},[4284],{"type":45,"tag":140,"props":4285,"children":4286},{},[4287],{"type":51,"value":4288},"    return {\n",{"type":45,"tag":140,"props":4290,"children":4291},{"class":142,"line":1297},[4292],{"type":45,"tag":140,"props":4293,"children":4294},{},[4295],{"type":51,"value":4296},"        'prompt': example['instruction'],\n",{"type":45,"tag":140,"props":4298,"children":4299},{"class":142,"line":1306},[4300],{"type":45,"tag":140,"props":4301,"children":4302},{},[4303],{"type":51,"value":4304},"        'chosen': example['chosen_response'],\n",{"type":45,"tag":140,"props":4306,"children":4307},{"class":142,"line":1314},[4308],{"type":45,"tag":140,"props":4309,"children":4310},{},[4311],{"type":51,"value":4312},"        'rejected': example['rejected_response'],\n",{"type":45,"tag":140,"props":4314,"children":4315},{"class":142,"line":1323},[4316],{"type":45,"tag":140,"props":4317,"children":4318},{},[4319],{"type":51,"value":4320},"    }\n",{"type":45,"tag":140,"props":4322,"children":4323},{"class":142,"line":1332},[4324],{"type":45,"tag":140,"props":4325,"children":4326},{},[4327],{"type":51,"value":4328},"dataset = dataset.map(format_for_dpo, remove_columns=dataset.column_names)\n",{"type":45,"tag":140,"props":4330,"children":4331},{"class":142,"line":1341},[4332],{"type":45,"tag":140,"props":4333,"children":4334},{"emptyLinePlaceholder":1034},[4335],{"type":51,"value":1037},{"type":45,"tag":140,"props":4337,"children":4338},{"class":142,"line":1350},[4339],{"type":45,"tag":140,"props":4340,"children":4341},{},[4342],{"type":51,"value":4343},"# 4. Launch training job with confidence\n",{"type":45,"tag":240,"props":4345,"children":4347},{"id":4346},"common-scenario-dpo-format-mismatch",[4348],{"type":51,"value":4349},"Common Scenario: DPO Format Mismatch",{"type":45,"tag":61,"props":4351,"children":4352},{},[4353],{"type":51,"value":4354},"Most DPO datasets use non-standard column names. Example:",{"type":45,"tag":129,"props":4356,"children":4359},{"className":4357,"code":4358,"language":51},[927],"Dataset has: instruction, chosen_response, rejected_response\nDPO expects: prompt, chosen, rejected\n",[4360],{"type":45,"tag":136,"props":4361,"children":4362},{"__ignoreMap":133},[4363],{"type":51,"value":4358},{"type":45,"tag":61,"props":4365,"children":4366},{},[4367],{"type":51,"value":4368},"The validator detects this and provides exact mapping code to fix it.",{"type":45,"tag":54,"props":4370,"children":4372},{"id":4371},"converting-models-to-gguf",[4373],{"type":51,"value":4374},"Converting Models to GGUF",{"type":45,"tag":61,"props":4376,"children":4377},{},[4378,4380,4385],{"type":51,"value":4379},"After training, convert models to ",{"type":45,"tag":70,"props":4381,"children":4382},{},[4383],{"type":51,"value":4384},"GGUF format",{"type":51,"value":4386}," for use with llama.cpp, Ollama, LM Studio, and other local inference tools.",{"type":45,"tag":61,"props":4388,"children":4389},{},[4390],{"type":45,"tag":70,"props":4391,"children":4392},{},[4393],{"type":51,"value":4394},"What is GGUF:",{"type":45,"tag":76,"props":4396,"children":4397},{},[4398,4403,4408,4413],{"type":45,"tag":80,"props":4399,"children":4400},{},[4401],{"type":51,"value":4402},"Optimized for CPU\u002FGPU inference with llama.cpp",{"type":45,"tag":80,"props":4404,"children":4405},{},[4406],{"type":51,"value":4407},"Supports quantization (4-bit, 5-bit, 8-bit) to reduce model size",{"type":45,"tag":80,"props":4409,"children":4410},{},[4411],{"type":51,"value":4412},"Compatible with Ollama, LM Studio, Jan, GPT4All, llama.cpp",{"type":45,"tag":80,"props":4414,"children":4415},{},[4416],{"type":51,"value":4417},"Typically 2-8GB for 7B models (vs 14GB unquantized)",{"type":45,"tag":61,"props":4419,"children":4420},{},[4421],{"type":45,"tag":70,"props":4422,"children":4423},{},[4424],{"type":51,"value":4425},"When to convert:",{"type":45,"tag":76,"props":4427,"children":4428},{},[4429,4434,4439,4444],{"type":45,"tag":80,"props":4430,"children":4431},{},[4432],{"type":51,"value":4433},"Running models locally with Ollama or LM Studio",{"type":45,"tag":80,"props":4435,"children":4436},{},[4437],{"type":51,"value":4438},"Reducing model size with quantization",{"type":45,"tag":80,"props":4440,"children":4441},{},[4442],{"type":51,"value":4443},"Deploying to edge devices",{"type":45,"tag":80,"props":4445,"children":4446},{},[4447],{"type":51,"value":4448},"Sharing models for local-first use",{"type":45,"tag":61,"props":4450,"children":4451},{},[4452,4456,4457,4463],{"type":45,"tag":70,"props":4453,"children":4454},{},[4455],{"type":51,"value":3058},{"type":51,"value":186},{"type":45,"tag":136,"props":4458,"children":4460},{"className":4459},[],[4461],{"type":51,"value":4462},"references\u002Fgguf_conversion.md",{"type":51,"value":4464}," for complete conversion guide, including production-ready conversion script, quantization options, hardware requirements, usage examples, and troubleshooting.",{"type":45,"tag":61,"props":4466,"children":4467},{},[4468],{"type":45,"tag":70,"props":4469,"children":4470},{},[4471],{"type":51,"value":4472},"Quick conversion:",{"type":45,"tag":129,"props":4474,"children":4476},{"className":131,"code":4475,"language":24,"meta":133,"style":133},"hf_jobs(\"uv\", {\n    \"script\": \"\u003Csee references\u002Fgguf_conversion.md for complete script>\",\n    \"flavor\": \"a10g-large\",\n    \"timeout\": \"45m\",\n    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"},\n    \"env\": {\n        \"ADAPTER_MODEL\": \"username\u002Fmy-finetuned-model\",\n        \"BASE_MODEL\": \"Qwen\u002FQwen2.5-0.5B\",\n        \"OUTPUT_REPO\": \"username\u002Fmy-model-gguf\"\n    }\n})\n",[4477],{"type":45,"tag":136,"props":4478,"children":4479},{"__ignoreMap":133},[4480,4487,4495,4502,4510,4518,4526,4534,4542,4550,4557],{"type":45,"tag":140,"props":4481,"children":4482},{"class":142,"line":143},[4483],{"type":45,"tag":140,"props":4484,"children":4485},{},[4486],{"type":51,"value":1176},{"type":45,"tag":140,"props":4488,"children":4489},{"class":142,"line":152},[4490],{"type":45,"tag":140,"props":4491,"children":4492},{},[4493],{"type":51,"value":4494},"    \"script\": \"\u003Csee references\u002Fgguf_conversion.md for complete script>\",\n",{"type":45,"tag":140,"props":4496,"children":4497},{"class":142,"line":161},[4498],{"type":45,"tag":140,"props":4499,"children":4500},{},[4501],{"type":51,"value":1508},{"type":45,"tag":140,"props":4503,"children":4504},{"class":142,"line":170},[4505],{"type":45,"tag":140,"props":4506,"children":4507},{},[4508],{"type":51,"value":4509},"    \"timeout\": \"45m\",\n",{"type":45,"tag":140,"props":4511,"children":4512},{"class":142,"line":1040},[4513],{"type":45,"tag":140,"props":4514,"children":4515},{},[4516],{"type":51,"value":4517},"    \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"},\n",{"type":45,"tag":140,"props":4519,"children":4520},{"class":142,"line":1049},[4521],{"type":45,"tag":140,"props":4522,"children":4523},{},[4524],{"type":51,"value":4525},"    \"env\": {\n",{"type":45,"tag":140,"props":4527,"children":4528},{"class":142,"line":1227},[4529],{"type":45,"tag":140,"props":4530,"children":4531},{},[4532],{"type":51,"value":4533},"        \"ADAPTER_MODEL\": \"username\u002Fmy-finetuned-model\",\n",{"type":45,"tag":140,"props":4535,"children":4536},{"class":142,"line":1236},[4537],{"type":45,"tag":140,"props":4538,"children":4539},{},[4540],{"type":51,"value":4541},"        \"BASE_MODEL\": \"Qwen\u002FQwen2.5-0.5B\",\n",{"type":45,"tag":140,"props":4543,"children":4544},{"class":142,"line":1245},[4545],{"type":45,"tag":140,"props":4546,"children":4547},{},[4548],{"type":51,"value":4549},"        \"OUTPUT_REPO\": \"username\u002Fmy-model-gguf\"\n",{"type":45,"tag":140,"props":4551,"children":4552},{"class":142,"line":1254},[4553],{"type":45,"tag":140,"props":4554,"children":4555},{},[4556],{"type":51,"value":4320},{"type":45,"tag":140,"props":4558,"children":4559},{"class":142,"line":1263},[4560],{"type":45,"tag":140,"props":4561,"children":4562},{},[4563],{"type":51,"value":1535},{"type":45,"tag":54,"props":4565,"children":4567},{"id":4566},"common-training-patterns",[4568],{"type":51,"value":4569},"Common Training Patterns",{"type":45,"tag":61,"props":4571,"children":4572},{},[4573,4574,4580],{"type":51,"value":324},{"type":45,"tag":136,"props":4575,"children":4577},{"className":4576},[],[4578],{"type":51,"value":4579},"references\u002Ftraining_patterns.md",{"type":51,"value":4581}," for detailed examples including:",{"type":45,"tag":76,"props":4583,"children":4584},{},[4585,4590,4595,4600,4605],{"type":45,"tag":80,"props":4586,"children":4587},{},[4588],{"type":51,"value":4589},"Quick demo (5-10 minutes)",{"type":45,"tag":80,"props":4591,"children":4592},{},[4593],{"type":51,"value":4594},"Production with checkpoints",{"type":45,"tag":80,"props":4596,"children":4597},{},[4598],{"type":51,"value":4599},"Multi-GPU training",{"type":45,"tag":80,"props":4601,"children":4602},{},[4603],{"type":51,"value":4604},"DPO training (preference learning)",{"type":45,"tag":80,"props":4606,"children":4607},{},[4608],{"type":51,"value":4609},"GRPO training (online RL)",{"type":45,"tag":54,"props":4611,"children":4613},{"id":4612},"common-failure-modes",[4614],{"type":51,"value":4615},"Common Failure Modes",{"type":45,"tag":240,"props":4617,"children":4619},{"id":4618},"out-of-memory-oom",[4620],{"type":51,"value":4621},"Out of Memory (OOM)",{"type":45,"tag":61,"props":4623,"children":4624},{},[4625],{"type":45,"tag":70,"props":4626,"children":4627},{},[4628],{"type":51,"value":4629},"Fix (try in order):",{"type":45,"tag":352,"props":4631,"children":4632},{},[4633,4670,4681],{"type":45,"tag":80,"props":4634,"children":4635},{},[4636,4638,4644,4646,4652,4654,4660,4662,4668],{"type":51,"value":4637},"Reduce batch size: ",{"type":45,"tag":136,"props":4639,"children":4641},{"className":4640},[],[4642],{"type":51,"value":4643},"per_device_train_batch_size=1",{"type":51,"value":4645},", increase ",{"type":45,"tag":136,"props":4647,"children":4649},{"className":4648},[],[4650],{"type":51,"value":4651},"gradient_accumulation_steps=8",{"type":51,"value":4653},". Effective batch size is ",{"type":45,"tag":136,"props":4655,"children":4657},{"className":4656},[],[4658],{"type":51,"value":4659},"per_device_train_batch_size",{"type":51,"value":4661}," x ",{"type":45,"tag":136,"props":4663,"children":4665},{"className":4664},[],[4666],{"type":51,"value":4667},"gradient_accumulation_steps",{"type":51,"value":4669},". For best performance keep effective batch size close to 128.",{"type":45,"tag":80,"props":4671,"children":4672},{},[4673,4675],{"type":51,"value":4674},"Enable: ",{"type":45,"tag":136,"props":4676,"children":4678},{"className":4677},[],[4679],{"type":51,"value":4680},"gradient_checkpointing=True",{"type":45,"tag":80,"props":4682,"children":4683},{},[4684],{"type":51,"value":4685},"Upgrade hardware: t4-small → l4x1, a10g-small → a10g-large etc.",{"type":45,"tag":240,"props":4687,"children":4689},{"id":4688},"dataset-misformatted",[4690],{"type":51,"value":4691},"Dataset Misformatted",{"type":45,"tag":61,"props":4693,"children":4694},{},[4695],{"type":45,"tag":70,"props":4696,"children":4697},{},[4698],{"type":51,"value":4699},"Fix:",{"type":45,"tag":352,"props":4701,"children":4702},{},[4703,4757,4762],{"type":45,"tag":80,"props":4704,"children":4705},{},[4706,4708],{"type":51,"value":4707},"Validate first with dataset inspector:\n",{"type":45,"tag":129,"props":4709,"children":4711},{"className":486,"code":4710,"language":488,"meta":133,"style":133},"uv run https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py \\\n  --dataset name --split train\n",[4712],{"type":45,"tag":136,"props":4713,"children":4714},{"__ignoreMap":133},[4715,4735],{"type":45,"tag":140,"props":4716,"children":4717},{"class":142,"line":143},[4718,4722,4726,4731],{"type":45,"tag":140,"props":4719,"children":4720},{"style":498},[4721],{"type":51,"value":501},{"type":45,"tag":140,"props":4723,"children":4724},{"style":504},[4725],{"type":51,"value":507},{"type":45,"tag":140,"props":4727,"children":4728},{"style":504},[4729],{"type":51,"value":4730}," https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py",{"type":45,"tag":140,"props":4732,"children":4733},{"style":2465},[4734],{"type":51,"value":2468},{"type":45,"tag":140,"props":4736,"children":4737},{"class":142,"line":152},[4738,4742,4747,4752],{"type":45,"tag":140,"props":4739,"children":4740},{"style":504},[4741],{"type":51,"value":3530},{"type":45,"tag":140,"props":4743,"children":4744},{"style":504},[4745],{"type":51,"value":4746}," name",{"type":45,"tag":140,"props":4748,"children":4749},{"style":504},[4750],{"type":51,"value":4751}," --split",{"type":45,"tag":140,"props":4753,"children":4754},{"style":504},[4755],{"type":51,"value":4756}," train\n",{"type":45,"tag":80,"props":4758,"children":4759},{},[4760],{"type":51,"value":4761},"Check output for compatibility markers (✓ READY, ✗ NEEDS MAPPING, ✗ INCOMPATIBLE)",{"type":45,"tag":80,"props":4763,"children":4764},{},[4765],{"type":51,"value":4766},"Apply mapping code from inspector output if needed",{"type":45,"tag":240,"props":4768,"children":4770},{"id":4769},"job-timeout",[4771],{"type":51,"value":4772},"Job Timeout",{"type":45,"tag":61,"props":4774,"children":4775},{},[4776],{"type":45,"tag":70,"props":4777,"children":4778},{},[4779],{"type":51,"value":4699},{"type":45,"tag":352,"props":4781,"children":4782},{},[4783,4794,4807,4826],{"type":45,"tag":80,"props":4784,"children":4785},{},[4786,4788],{"type":51,"value":4787},"Check logs for actual runtime: ",{"type":45,"tag":136,"props":4789,"children":4791},{"className":4790},[],[4792],{"type":51,"value":4793},"hf_jobs(\"logs\", {\"job_id\": \"...\"})",{"type":45,"tag":80,"props":4795,"children":4796},{},[4797,4799,4805],{"type":51,"value":4798},"Increase timeout with buffer: ",{"type":45,"tag":136,"props":4800,"children":4802},{"className":4801},[],[4803],{"type":51,"value":4804},"\"timeout\": \"3h\"",{"type":51,"value":4806}," (add 30% to estimated time)",{"type":45,"tag":80,"props":4808,"children":4809},{},[4810,4812,4818,4820],{"type":51,"value":4811},"Or reduce training: lower ",{"type":45,"tag":136,"props":4813,"children":4815},{"className":4814},[],[4816],{"type":51,"value":4817},"num_train_epochs",{"type":51,"value":4819},", use smaller dataset, enable ",{"type":45,"tag":136,"props":4821,"children":4823},{"className":4822},[],[4824],{"type":51,"value":4825},"max_steps",{"type":45,"tag":80,"props":4827,"children":4828},{},[4829,4831,4837,4838,4844,4845],{"type":51,"value":4830},"Save checkpoints: ",{"type":45,"tag":136,"props":4832,"children":4834},{"className":4833},[],[4835],{"type":51,"value":4836},"save_strategy=\"steps\"",{"type":51,"value":456},{"type":45,"tag":136,"props":4839,"children":4841},{"className":4840},[],[4842],{"type":51,"value":4843},"save_steps=500",{"type":51,"value":456},{"type":45,"tag":136,"props":4846,"children":4848},{"className":4847},[],[4849],{"type":51,"value":4850},"hub_strategy=\"every_save\"",{"type":45,"tag":61,"props":4852,"children":4853},{},[4854,4859],{"type":45,"tag":70,"props":4855,"children":4856},{},[4857],{"type":51,"value":4858},"Note:",{"type":51,"value":4860}," Default 30min is insufficient for real training. Minimum 1-2 hours.",{"type":45,"tag":240,"props":4862,"children":4864},{"id":4863},"hub-push-failures",[4865],{"type":51,"value":4866},"Hub Push Failures",{"type":45,"tag":61,"props":4868,"children":4869},{},[4870],{"type":45,"tag":70,"props":4871,"children":4872},{},[4873],{"type":51,"value":4699},{"type":45,"tag":352,"props":4875,"children":4876},{},[4877,4887,4903,4913],{"type":45,"tag":80,"props":4878,"children":4879},{},[4880,4882],{"type":51,"value":4881},"Add to job: ",{"type":45,"tag":136,"props":4883,"children":4885},{"className":4884},[],[4886],{"type":51,"value":634},{"type":45,"tag":80,"props":4888,"children":4889},{},[4890,4892,4897,4898],{"type":51,"value":4891},"Add to config: ",{"type":45,"tag":136,"props":4893,"children":4895},{"className":4894},[],[4896],{"type":51,"value":730},{"type":51,"value":456},{"type":45,"tag":136,"props":4899,"children":4901},{"className":4900},[],[4902],{"type":51,"value":737},{"type":45,"tag":80,"props":4904,"children":4905},{},[4906,4908],{"type":51,"value":4907},"Verify auth: ",{"type":45,"tag":136,"props":4909,"children":4911},{"className":4910},[],[4912],{"type":51,"value":605},{"type":45,"tag":80,"props":4914,"children":4915},{},[4916,4918,4924],{"type":51,"value":4917},"Check token has write permissions and repo exists (or set ",{"type":45,"tag":136,"props":4919,"children":4921},{"className":4920},[],[4922],{"type":51,"value":4923},"hub_private_repo=True",{"type":51,"value":995},{"type":45,"tag":240,"props":4926,"children":4928},{"id":4927},"missing-dependencies",[4929],{"type":51,"value":4930},"Missing Dependencies",{"type":45,"tag":61,"props":4932,"children":4933},{},[4934,4938],{"type":45,"tag":70,"props":4935,"children":4936},{},[4937],{"type":51,"value":4699},{"type":51,"value":4939},"\nAdd to PEP 723 header:",{"type":45,"tag":129,"props":4941,"children":4943},{"className":131,"code":4942,"language":24,"meta":133,"style":133},"# \u002F\u002F\u002F script\n# dependencies = [\"trl>=0.12.0\", \"peft>=0.7.0\", \"trackio\", \"missing-package\"]\n# \u002F\u002F\u002F\n",[4944],{"type":45,"tag":136,"props":4945,"children":4946},{"__ignoreMap":133},[4947,4958,4966],{"type":45,"tag":140,"props":4948,"children":4949},{"class":142,"line":143},[4950,4954],{"type":45,"tag":140,"props":4951,"children":4952},{},[4953],{"type":51,"value":1192},{"type":45,"tag":140,"props":4955,"children":4956},{},[4957],{"type":51,"value":1197},{"type":45,"tag":140,"props":4959,"children":4960},{"class":142,"line":152},[4961],{"type":45,"tag":140,"props":4962,"children":4963},{},[4964],{"type":51,"value":4965},"# dependencies = [\"trl>=0.12.0\", \"peft>=0.7.0\", \"trackio\", \"missing-package\"]\n",{"type":45,"tag":140,"props":4967,"children":4968},{"class":142,"line":161},[4969,4973],{"type":45,"tag":140,"props":4970,"children":4971},{},[4972],{"type":51,"value":1192},{"type":45,"tag":140,"props":4974,"children":4975},{},[4976],{"type":51,"value":1217},{"type":45,"tag":54,"props":4978,"children":4980},{"id":4979},"troubleshooting",[4981],{"type":51,"value":4982},"Troubleshooting",{"type":45,"tag":61,"props":4984,"children":4985},{},[4986],{"type":45,"tag":70,"props":4987,"children":4988},{},[4989],{"type":51,"value":4990},"Common issues:",{"type":45,"tag":76,"props":4992,"children":4993},{},[4994,4999,5004,5009,5014,5019],{"type":45,"tag":80,"props":4995,"children":4996},{},[4997],{"type":51,"value":4998},"Job times out → Increase timeout, reduce epochs\u002Fdataset, use smaller model\u002FLoRA",{"type":45,"tag":80,"props":5000,"children":5001},{},[5002],{"type":51,"value":5003},"Model not saved to Hub → Check push_to_hub=True, hub_model_id, secrets=HF_TOKEN",{"type":45,"tag":80,"props":5005,"children":5006},{},[5007],{"type":51,"value":5008},"Out of Memory (OOM) → Reduce batch size, increase gradient accumulation, enable LoRA, use larger GPU",{"type":45,"tag":80,"props":5010,"children":5011},{},[5012],{"type":51,"value":5013},"Dataset format error → Validate with dataset inspector (see Dataset Validation section)",{"type":45,"tag":80,"props":5015,"children":5016},{},[5017],{"type":51,"value":5018},"Import\u002Fmodule errors → Add PEP 723 header with dependencies, verify format",{"type":45,"tag":80,"props":5020,"children":5021},{},[5022,5024,5029],{"type":51,"value":5023},"Authentication errors → Check ",{"type":45,"tag":136,"props":5025,"children":5027},{"className":5026},[],[5028],{"type":51,"value":605},{"type":51,"value":5030},", token permissions, secrets parameter",{"type":45,"tag":61,"props":5032,"children":5033},{},[5034,5038,5039,5045],{"type":45,"tag":70,"props":5035,"children":5036},{},[5037],{"type":51,"value":3058},{"type":51,"value":186},{"type":45,"tag":136,"props":5040,"children":5042},{"className":5041},[],[5043],{"type":51,"value":5044},"references\u002Ftroubleshooting.md",{"type":51,"value":5046}," for complete troubleshooting guide",{"type":45,"tag":54,"props":5048,"children":5050},{"id":5049},"resources",[5051],{"type":51,"value":5052},"Resources",{"type":45,"tag":240,"props":5054,"children":5056},{"id":5055},"references-in-this-skill",[5057],{"type":51,"value":5058},"References (In This Skill)",{"type":45,"tag":76,"props":5060,"children":5061},{},[5062,5072,5082,5092,5102,5112,5122,5132,5142],{"type":45,"tag":80,"props":5063,"children":5064},{},[5065,5070],{"type":45,"tag":136,"props":5066,"children":5068},{"className":5067},[],[5069],{"type":51,"value":192},{"type":51,"value":5071}," - Overview of SFT, DPO, GRPO, KTO, PPO, Reward Modeling",{"type":45,"tag":80,"props":5073,"children":5074},{},[5075,5080],{"type":45,"tag":136,"props":5076,"children":5078},{"className":5077},[],[5079],{"type":51,"value":4579},{"type":51,"value":5081}," - Common training patterns and examples",{"type":45,"tag":80,"props":5083,"children":5084},{},[5085,5090],{"type":45,"tag":136,"props":5086,"children":5088},{"className":5087},[],[5089],{"type":51,"value":263},{"type":51,"value":5091}," - Unsloth for fast VLM training (~2x speed, 60% less VRAM)",{"type":45,"tag":80,"props":5093,"children":5094},{},[5095,5100],{"type":45,"tag":136,"props":5096,"children":5098},{"className":5097},[],[5099],{"type":51,"value":4462},{"type":51,"value":5101}," - Complete GGUF conversion guide",{"type":45,"tag":80,"props":5103,"children":5104},{},[5105,5110],{"type":45,"tag":136,"props":5106,"children":5108},{"className":5107},[],[5109],{"type":51,"value":3697},{"type":51,"value":5111}," - Trackio monitoring setup",{"type":45,"tag":80,"props":5113,"children":5114},{},[5115,5120],{"type":45,"tag":136,"props":5116,"children":5118},{"className":5117},[],[5119],{"type":51,"value":3065},{"type":51,"value":5121}," - Hardware specs and selection",{"type":45,"tag":80,"props":5123,"children":5124},{},[5125,5130],{"type":45,"tag":136,"props":5126,"children":5128},{"className":5127},[],[5129],{"type":51,"value":3280},{"type":51,"value":5131}," - Hub authentication troubleshooting",{"type":45,"tag":80,"props":5133,"children":5134},{},[5135,5140],{"type":45,"tag":136,"props":5136,"children":5138},{"className":5137},[],[5139],{"type":51,"value":5044},{"type":51,"value":5141}," - Common issues and solutions",{"type":45,"tag":80,"props":5143,"children":5144},{},[5145,5151],{"type":45,"tag":136,"props":5146,"children":5148},{"className":5147},[],[5149],{"type":51,"value":5150},"references\u002Flocal_training_macos.md",{"type":51,"value":5152}," - Local training on macOS",{"type":45,"tag":240,"props":5154,"children":5156},{"id":5155},"scripts-in-this-skill",[5157],{"type":51,"value":5158},"Scripts (In This Skill)",{"type":45,"tag":76,"props":5160,"children":5161},{},[5162,5172,5182,5192,5202,5212],{"type":45,"tag":80,"props":5163,"children":5164},{},[5165,5170],{"type":45,"tag":136,"props":5166,"children":5168},{"className":5167},[],[5169],{"type":51,"value":454},{"type":51,"value":5171}," - Production SFT template",{"type":45,"tag":80,"props":5173,"children":5174},{},[5175,5180],{"type":45,"tag":136,"props":5176,"children":5178},{"className":5177},[],[5179],{"type":51,"value":462},{"type":51,"value":5181}," - Production DPO template",{"type":45,"tag":80,"props":5183,"children":5184},{},[5185,5190],{"type":45,"tag":136,"props":5186,"children":5188},{"className":5187},[],[5189],{"type":51,"value":3661},{"type":51,"value":5191}," - Production GRPO template",{"type":45,"tag":80,"props":5193,"children":5194},{},[5195,5200],{"type":45,"tag":136,"props":5196,"children":5198},{"className":5197},[],[5199],{"type":51,"value":337},{"type":51,"value":5201}," - Unsloth text LLM training template (faster, less VRAM)",{"type":45,"tag":80,"props":5203,"children":5204},{},[5205,5210],{"type":45,"tag":136,"props":5206,"children":5208},{"className":5207},[],[5209],{"type":51,"value":3478},{"type":51,"value":5211}," - Estimate time and cost (offer when appropriate)",{"type":45,"tag":80,"props":5213,"children":5214},{},[5215,5221],{"type":45,"tag":136,"props":5216,"children":5218},{"className":5217},[],[5219],{"type":51,"value":5220},"scripts\u002Fconvert_to_gguf.py",{"type":51,"value":5222}," - Complete GGUF conversion script",{"type":45,"tag":240,"props":5224,"children":5226},{"id":5225},"external-scripts",[5227],{"type":51,"value":5228},"External Scripts",{"type":45,"tag":76,"props":5230,"children":5231},{},[5232],{"type":45,"tag":80,"props":5233,"children":5234},{},[5235,5242,5244,5249,5251,5257],{"type":45,"tag":569,"props":5236,"children":5239},{"href":5237,"rel":5238},"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fmcp-tools\u002Fskills\u002Fraw\u002Fmain\u002Fdataset_inspector.py",[573],[5240],{"type":51,"value":5241},"Dataset Inspector",{"type":51,"value":5243}," - Validate dataset format before training (use via ",{"type":45,"tag":136,"props":5245,"children":5247},{"className":5246},[],[5248],{"type":51,"value":481},{"type":51,"value":5250}," or ",{"type":45,"tag":136,"props":5252,"children":5254},{"className":5253},[],[5255],{"type":51,"value":5256},"hf_jobs",{"type":51,"value":995},{"type":45,"tag":240,"props":5259,"children":5261},{"id":5260},"external-links",[5262],{"type":51,"value":5263},"External Links",{"type":45,"tag":76,"props":5265,"children":5266},{},[5267,5277,5287,5296,5306,5315,5325],{"type":45,"tag":80,"props":5268,"children":5269},{},[5270],{"type":45,"tag":569,"props":5271,"children":5274},{"href":5272,"rel":5273},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl",[573],[5275],{"type":51,"value":5276},"TRL Documentation",{"type":45,"tag":80,"props":5278,"children":5279},{},[5280],{"type":45,"tag":569,"props":5281,"children":5284},{"href":5282,"rel":5283},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Fen\u002Fjobs_training",[573],[5285],{"type":51,"value":5286},"TRL Jobs Training Guide",{"type":45,"tag":80,"props":5288,"children":5289},{},[5290],{"type":45,"tag":569,"props":5291,"children":5293},{"href":2784,"rel":5292},[573],[5294],{"type":51,"value":5295},"TRL Jobs Package",{"type":45,"tag":80,"props":5297,"children":5298},{},[5299],{"type":45,"tag":569,"props":5300,"children":5303},{"href":5301,"rel":5302},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fguides\u002Fjobs",[573],[5304],{"type":51,"value":5305},"HF Jobs Documentation",{"type":45,"tag":80,"props":5307,"children":5308},{},[5309],{"type":45,"tag":569,"props":5310,"children":5312},{"href":1989,"rel":5311},[573],[5313],{"type":51,"value":5314},"TRL Example Scripts",{"type":45,"tag":80,"props":5316,"children":5317},{},[5318],{"type":45,"tag":569,"props":5319,"children":5322},{"href":5320,"rel":5321},"https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fguides\u002Fscripts\u002F",[573],[5323],{"type":51,"value":5324},"UV Scripts Guide",{"type":45,"tag":80,"props":5326,"children":5327},{},[5328],{"type":45,"tag":569,"props":5329,"children":5332},{"href":5330,"rel":5331},"https:\u002F\u002Fhuggingface.co\u002Fuv-scripts",[573],[5333],{"type":51,"value":5334},"UV Scripts Organization",{"type":45,"tag":54,"props":5336,"children":5338},{"id":5337},"key-takeaways",[5339],{"type":51,"value":5340},"Key Takeaways",{"type":45,"tag":352,"props":5342,"children":5343},{},[5344,5361,5371,5381,5391,5401,5416,5440,5450,5460],{"type":45,"tag":80,"props":5345,"children":5346},{},[5347,5352,5354,5359],{"type":45,"tag":70,"props":5348,"children":5349},{},[5350],{"type":51,"value":5351},"Submit scripts inline",{"type":51,"value":5353}," - The ",{"type":45,"tag":136,"props":5355,"children":5357},{"className":5356},[],[5358],{"type":51,"value":394},{"type":51,"value":5360}," parameter accepts Python code directly; no file saving required unless user requests",{"type":45,"tag":80,"props":5362,"children":5363},{},[5364,5369],{"type":45,"tag":70,"props":5365,"children":5366},{},[5367],{"type":51,"value":5368},"Jobs are asynchronous",{"type":51,"value":5370}," - Don't wait\u002Fpoll; let user check when ready",{"type":45,"tag":80,"props":5372,"children":5373},{},[5374,5379],{"type":45,"tag":70,"props":5375,"children":5376},{},[5377],{"type":51,"value":5378},"Always set timeout",{"type":51,"value":5380}," - Default 30 min is insufficient; minimum 1-2 hours recommended",{"type":45,"tag":80,"props":5382,"children":5383},{},[5384,5389],{"type":45,"tag":70,"props":5385,"children":5386},{},[5387],{"type":51,"value":5388},"Always enable Hub push",{"type":51,"value":5390}," - Environment is ephemeral; without push, all results lost",{"type":45,"tag":80,"props":5392,"children":5393},{},[5394,5399],{"type":45,"tag":70,"props":5395,"children":5396},{},[5397],{"type":51,"value":5398},"Include Trackio",{"type":51,"value":5400}," - Use example scripts as templates for real-time monitoring",{"type":45,"tag":80,"props":5402,"children":5403},{},[5404,5409,5411],{"type":45,"tag":70,"props":5405,"children":5406},{},[5407],{"type":51,"value":5408},"Offer cost estimation",{"type":51,"value":5410}," - When parameters are known, use ",{"type":45,"tag":136,"props":5412,"children":5414},{"className":5413},[],[5415],{"type":51,"value":3478},{"type":45,"tag":80,"props":5417,"children":5418},{},[5419,5424,5426,5431,5433,5438],{"type":45,"tag":70,"props":5420,"children":5421},{},[5422],{"type":51,"value":5423},"Use UV scripts (Approach 1)",{"type":51,"value":5425}," - Default to ",{"type":45,"tag":136,"props":5427,"children":5429},{"className":5428},[],[5430],{"type":51,"value":378},{"type":51,"value":5432}," with inline scripts; TRL maintained scripts for standard training; avoid bash ",{"type":45,"tag":136,"props":5434,"children":5436},{"className":5435},[],[5437],{"type":51,"value":386},{"type":51,"value":5439}," commands in Codex",{"type":45,"tag":80,"props":5441,"children":5442},{},[5443,5448],{"type":45,"tag":70,"props":5444,"children":5445},{},[5446],{"type":51,"value":5447},"Use hf_doc_fetch\u002Fhf_doc_search",{"type":51,"value":5449}," for latest TRL documentation",{"type":45,"tag":80,"props":5451,"children":5452},{},[5453,5458],{"type":45,"tag":70,"props":5454,"children":5455},{},[5456],{"type":51,"value":5457},"Validate dataset format",{"type":51,"value":5459}," before training with dataset inspector (see Dataset Validation section)",{"type":45,"tag":80,"props":5461,"children":5462},{},[5463,5468],{"type":45,"tag":70,"props":5464,"children":5465},{},[5466],{"type":51,"value":5467},"Choose appropriate hardware",{"type":51,"value":5469}," for model size; use LoRA for models >7B",{"type":45,"tag":5471,"props":5472,"children":5473},"style",{},[5474],{"type":51,"value":5475},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5477,"total":5682},[5478,5499,5522,5539,5555,5574,5593,5609,5625,5639,5651,5666],{"slug":5479,"name":5479,"fn":5480,"description":5481,"org":5482,"tags":5483,"stars":5496,"repoUrl":5497,"updatedAt":5498},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5484,5487,5490,5493],{"name":5485,"slug":5486,"type":15},"Documents","documents",{"name":5488,"slug":5489,"type":15},"Healthcare","healthcare",{"name":5491,"slug":5492,"type":15},"Insurance","insurance",{"name":5494,"slug":5495,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":5500,"name":5500,"fn":5501,"description":5502,"org":5503,"tags":5504,"stars":5519,"repoUrl":5520,"updatedAt":5521},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5505,5508,5510,5513,5516],{"name":5506,"slug":5507,"type":15},".NET","dotnet",{"name":5509,"slug":5500,"type":15},"ASP.NET Core",{"name":5511,"slug":5512,"type":15},"Blazor","blazor",{"name":5514,"slug":5515,"type":15},"C#","csharp",{"name":5517,"slug":5518,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":5523,"name":5523,"fn":5524,"description":5525,"org":5526,"tags":5527,"stars":5519,"repoUrl":5520,"updatedAt":5538},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5528,5531,5534,5537],{"name":5529,"slug":5530,"type":15},"Apps SDK","apps-sdk",{"name":5532,"slug":5533,"type":15},"ChatGPT","chatgpt",{"name":5535,"slug":5536,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":5540,"name":5540,"fn":5541,"description":5542,"org":5543,"tags":5544,"stars":5519,"repoUrl":5520,"updatedAt":5554},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5545,5548,5551],{"name":5546,"slug":5547,"type":15},"API Development","api-development",{"name":5549,"slug":5550,"type":15},"CLI","cli",{"name":5552,"slug":5553,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":5556,"name":5556,"fn":5557,"description":5558,"org":5559,"tags":5560,"stars":5519,"repoUrl":5520,"updatedAt":5573},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5561,5564,5567,5570],{"name":5562,"slug":5563,"type":15},"Cloudflare","cloudflare",{"name":5565,"slug":5566,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":5568,"slug":5569,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":5571,"slug":5572,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":5575,"name":5575,"fn":5576,"description":5577,"org":5578,"tags":5579,"stars":5519,"repoUrl":5520,"updatedAt":5592},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5580,5583,5586,5589],{"name":5581,"slug":5582,"type":15},"Productivity","productivity",{"name":5584,"slug":5585,"type":15},"Project Management","project-management",{"name":5587,"slug":5588,"type":15},"Strategy","strategy",{"name":5590,"slug":5591,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":5594,"name":5594,"fn":5595,"description":5596,"org":5597,"tags":5598,"stars":5519,"repoUrl":5520,"updatedAt":5608},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5599,5602,5604,5607],{"name":5600,"slug":5601,"type":15},"Design","design",{"name":5603,"slug":5594,"type":15},"Figma",{"name":5605,"slug":5606,"type":15},"Frontend","frontend",{"name":5535,"slug":5536,"type":15},"2026-04-12T05:06:47.939943",{"slug":5610,"name":5610,"fn":5611,"description":5612,"org":5613,"tags":5614,"stars":5519,"repoUrl":5520,"updatedAt":5624},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5615,5616,5619,5620,5621],{"name":5600,"slug":5601,"type":15},{"name":5617,"slug":5618,"type":15},"Design System","design-system",{"name":5603,"slug":5594,"type":15},{"name":5605,"slug":5606,"type":15},{"name":5622,"slug":5623,"type":15},"UI Components","ui-components","2026-05-10T05:59:52.971881",{"slug":5626,"name":5626,"fn":5627,"description":5628,"org":5629,"tags":5630,"stars":5519,"repoUrl":5520,"updatedAt":5638},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5631,5632,5633,5636,5637],{"name":5600,"slug":5601,"type":15},{"name":5617,"slug":5618,"type":15},{"name":5634,"slug":5635,"type":15},"Documentation","documentation",{"name":5603,"slug":5594,"type":15},{"name":5605,"slug":5606,"type":15},"2026-05-16T06:07:47.821474",{"slug":5640,"name":5640,"fn":5641,"description":5642,"org":5643,"tags":5644,"stars":5519,"repoUrl":5520,"updatedAt":5650},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5645,5646,5647,5648,5649],{"name":5600,"slug":5601,"type":15},{"name":5603,"slug":5594,"type":15},{"name":5605,"slug":5606,"type":15},{"name":5622,"slug":5623,"type":15},{"name":5517,"slug":5518,"type":15},"2026-05-16T06:07:40.583615",{"slug":5652,"name":5652,"fn":5653,"description":5654,"org":5655,"tags":5656,"stars":5519,"repoUrl":5520,"updatedAt":5665},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5657,5660,5661,5664],{"name":5658,"slug":5659,"type":15},"Animation","animation",{"name":5552,"slug":5553,"type":15},{"name":5662,"slug":5663,"type":15},"Creative","creative",{"name":5600,"slug":5601,"type":15},"2026-05-02T05:31:48.48485",{"slug":5667,"name":5667,"fn":5668,"description":5669,"org":5670,"tags":5671,"stars":5519,"repoUrl":5520,"updatedAt":5681},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5672,5673,5674,5677,5680],{"name":5662,"slug":5663,"type":15},{"name":5600,"slug":5601,"type":15},{"name":5675,"slug":5676,"type":15},"Image Generation","image-generation",{"name":5678,"slug":5679,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675,{"items":5684,"total":5794},[5685,5702,5718,5730,5748,5766,5782],{"slug":5686,"name":5686,"fn":5687,"description":5688,"org":5689,"tags":5690,"stars":28,"repoUrl":29,"updatedAt":5701},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5691,5694,5697,5700],{"name":5692,"slug":5693,"type":15},"Accessibility","accessibility",{"name":5695,"slug":5696,"type":15},"Charts","charts",{"name":5698,"slug":5699,"type":15},"Data Visualization","data-visualization",{"name":5600,"slug":5601,"type":15},"2026-06-30T19:00:57.102",{"slug":5703,"name":5703,"fn":5704,"description":5705,"org":5706,"tags":5707,"stars":28,"repoUrl":29,"updatedAt":5717},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5708,5711,5714],{"name":5709,"slug":5710,"type":15},"Agents","agents",{"name":5712,"slug":5713,"type":15},"Browser Automation","browser-automation",{"name":5715,"slug":5716,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":5719,"name":5719,"fn":5720,"description":5721,"org":5722,"tags":5723,"stars":28,"repoUrl":29,"updatedAt":5729},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5724,5725,5728],{"name":5712,"slug":5713,"type":15},{"name":5726,"slug":5727,"type":15},"Local Development","local-development",{"name":5715,"slug":5716,"type":15},"2026-04-06T18:41:17.526867",{"slug":5731,"name":5731,"fn":5732,"description":5733,"org":5734,"tags":5735,"stars":28,"repoUrl":29,"updatedAt":5747},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5736,5737,5738,5741,5744],{"name":5709,"slug":5710,"type":15},{"name":5568,"slug":5569,"type":15},{"name":5739,"slug":5740,"type":15},"SDK","sdk",{"name":5742,"slug":5743,"type":15},"Serverless","serverless",{"name":5745,"slug":5746,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":5749,"name":5749,"fn":5750,"description":5751,"org":5752,"tags":5753,"stars":28,"repoUrl":29,"updatedAt":5765},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5754,5755,5758,5761,5762],{"name":5605,"slug":5606,"type":15},{"name":5756,"slug":5757,"type":15},"React","react",{"name":5759,"slug":5760,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":5622,"slug":5623,"type":15},{"name":5763,"slug":5764,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":5767,"name":5767,"fn":5768,"description":5769,"org":5770,"tags":5771,"stars":28,"repoUrl":29,"updatedAt":5781},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5772,5773,5776,5777,5780],{"name":26,"slug":27,"type":15},{"name":5774,"slug":5775,"type":15},"Cost Optimization","cost-optimization",{"name":17,"slug":18,"type":15},{"name":5778,"slug":5779,"type":15},"Performance","performance",{"name":5763,"slug":5764,"type":15},"2026-04-06T18:40:44.377464",{"slug":5783,"name":5783,"fn":5784,"description":5785,"org":5786,"tags":5787,"stars":28,"repoUrl":29,"updatedAt":5793},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5788,5789,5792],{"name":5774,"slug":5775,"type":15},{"name":5790,"slug":5791,"type":15},"Database","database",{"name":17,"slug":18,"type":15},"2026-04-06T18:41:08.513425",600]