Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 12 min read How-to mediumAdept

We Got Claude to Fine-Tune an Open Source LLM

Hugging Face Skills, specifically the hf-llm-trainer skill, lets coding agents like Claude Code, Codex and Gemini CLI run a full LLM fine-tuning lifecycle. The agent validates the dataset, picks GPU hardware by model size, generates a TRL training script with Trackio monitoring, submits it to Hugging Face Jobs, reports progress and pushes the result to the Hub. The walkthrough covers setup, SFT, DPO and GRPO, LoRA for models over 3B, GGUF conversion for llama.cpp, and cost guidance. A 0.6B Qwen3 SFT run on a t4-small costs about $0.30, 3-7B models need A10G/A100 with LoRA at $15-40, and a cheap 100-example test run before a production job catches dataset format errors early.

Assumes: LLM fine-tuning basicsHugging Face Hub

Related posts

  • Codex is Open Sourcing AI models

    Hugging Face mediumAdept

    Hugging Face Skills, a repository of agent instructions loaded via AGENTS.md (or Claude Code Skills), lets OpenAI Codex run end-to-end fine-tuning experiments on Hugging Face Jobs. From a short prompt it validates the dataset, picks hardware, submits TRL training (SFT, DPO, GRPO), tracks metrics in Trackio, runs lighteval evaluations and keeps a markdown experiment report up to date. In the walkthrough, a LoRA SFT of Qwen3-0.6B on open-r1/codeforces-cots raises HumanEval pass@1 from about 0.30 to 0.34, and the model is then converted to quantized GGUF for llama.cpp. Rough costs are $1-2 for models under 1B, $5-15 for 1-3B and $15-40 for 3-7B with LoRA, and models above 7B are not yet supported.

  • Train AI models with Unsloth and Hugging Face Jobs for FREE

    Hugging Face mediumAdept

    Unsloth on Hugging Face Jobs can fine-tune small models like LiquidAI/LFM2.5-1.2B-Instruct on managed cloud GPUs. Unsloth claims ~2x faster training and ~60% less VRAM, so a run can cost a few dollars. The guide covers submitting a job directly with `hf jobs uv run` and installing a Hugging Face model-trainer skill so coding agents like Claude Code or Codex can generate a UV script, submit it, and report Trackio monitoring links. It includes an example 4-bit LoRA SFT script using TRL, GPU flavor recommendations by model size (~$0.40–$3.00/hr), and tips for prompting agents. Free credits are offered through the Unsloth Jobs Explorers organization.

  • Personal Copilot: Train Your Own Coding Assistant

    Hugging Face hardMaster

    HugCoder is a code LLM fine-tuned on the top 10 Hugging Face GitHub repositories, built by cloning repos in parallel, filtering non-code files and training StarCoder with a fill-in-the-middle objective. Full fine-tuning of the 15.5B model on 8×A100 80GB with FSDP took 9 hours (~$108), while QLoRA on a single A100 40GB took 12.5 hours (~$13.75), with a per-parameter memory breakdown explaining why. QLoRA reached slightly higher loss than full fine-tuning but preserved HumanEval pass@1 (33.37 vs 33.57) and matched it qualitatively on HF-specific infilling where GitHub Copilot failed. The post also covers serving the model in VS Code via Inference Endpoints, training a chat variant, and combining LoRA adapters across tasks and base models.

  • The model that didn't exist, so you made it yourself

    Hugging Face mediumAdept

    Six custom models were built by prompting ML Intern, an agent mode in HuggingChat, to plan, budget, train, evaluate and publish on Hugging Face hardware, for about USD 103 in total compute. The projects were a citrus-disease VLM fine-tuned from Qwen3.5-2B (14.9% to 52.8% accuracy for USD 1.90), a Huggy character LoRA on FLUX.2 klein, camera-angle and doodle-in editing LoRAs for Qwen-Image 2.1 with synthetic datasets, a 0.8B prompt rewriter distilled from a 9B teacher, and a 4-step distillation of Agate Preview 002 exported to ONNX for the browser. The prompting advice is to list verified facts so the agent doesn't re-derive them, require a zero-shot baseline and a smoke test before full training, and set a hard spending cap.

  • Make LLM Fine-tuning 2x faster with Unsloth and 🤗 TRL

    Hugging Face mediumAdept

    Unsloth speeds up QLoRA fine-tuning of Llama and Mistral-family models by rewriting PyTorch modules as Triton kernels with manually derived backpropagation. Because no approximations are made, it claims 0% accuracy loss relative to standard QLoRA. Across 59 benchmark runs on A100 and T4 GPUs, it ran 1.5–3.9x faster than Hugging Face transformers and used up to 74% less VRAM. Code examples show loading pre-quantized 4-bit models with FastLanguageModel, attaching LoRA adapters, and training with TRL's SFTTrainer or DPOTrainer.

The quest for software engineering knowledge.

Look:
Layout: