This blog post describes how to do fast LLM fine-tuning (specifically LiquidAI/LFM2.5-1.2B-Instruct ) using Unsloth and Hugging Face jobs through coding agents such as Claude Code and Codex. Unsloth can train up to 2x faster and use up to 60% less VRAM compared to standard methods, so training small models costs just a few dollars.
Why a small model? Small language models like LFM2.5-1.2B-Instruct are ideal candidates for fine-tuning. They are cheap to train, fast to iterate, and increasingly competitive with much larger models for intensive tasks. LFM2.5-1.2B-Instruct runs on 1 GB of memory and is optimized for on-device deployment, allowing you to deliver your fine-tuned content on your CPU, phone, or laptop.
will be needed
We’re giving away free credits to fine-tune your models with Hugging Face Jobs. Join the Unsloth Jobs Explorers organization to claim free credits and a 1-month Pro subscription.
Hugging Face account (required for HF jobs) Billing settings (for review, you can monitor your usage and manage your billing on the billing page). Hugging Face token with write permission (optional) Coding agent (Open Code, Claude Code, or Codex)
run the job
If you want to train a model using HF Jobs and Unsloth, simply submit your job using the hf jobs CLI.
First, you need to install the hf CLI. To do this, run the following command:
# curl -LsSf on Mac or Linux https://hf.co/cli/install.sh |bash
Then you can submit the job by running the following command:
n/a work uv run https://huggingface.co/datasets/unsloth/jobs/resolve/main/sft-lfm2.5.py \ –flavor a10g-small \ –secrets HF_TOKEN \ —timeout 4h \ –dataset mlabonne/FineTome-100k \ –num-epochs 1 \ –eval-split 0.2 \ –output-repo your-username/lfm-finetuned
Check out the training script and Hug Face Job documentation for more information.
Installing skills
The Hug Face Model Training skill lowers the barrier to training a model by simply displaying a prompt. First, install your skill using a coding agent.
claude code
Claude Code detects skills through a plugin system, so you must first install the Hugging Face skill. To do this:
Add a marketplace: /plugin Marketplace add hackgingface/skills Browse available skills in the Discover tab: /plugin Install a model trainer skill: /plugin install hackging-face-model-trainer@huggingface-skills
For more information, see the Using the Hub with Skills documentation or the Claude Code Skills documentation.
codex
Codex discovers skills through the AGENTS.md file and the .agents/skills/ directory.
Install individual skills using $skill-installer.
$skill-installer Install https://github.com/huggingface/skills/tree/main/skills/hugging-face-model-trainer
For more information, see the Codex Skills documentation and the AGENTS.md guide.
something else
A typical installation method simply clones the skill repository and copies the skill to the agent’s skills directory.
git clone https://github.com/huggingface/skills.git mkdir -p ~/.agents/skills && cp -R skill/skills/hugging-face-model-trainer ~/.agents/skills/
quick start
Once your skill is installed, ask your coding agent to train your model.
Train LiquidAI/LFM2.5-1.2B – Use Unsloth in HF jobs to command with mlabonne/FineTome-100k
The agent generates a training script based on the skill example, submits the training to the HF job, and provides a monitoring link via Trackio.
structure
Training jobs run on Hugging Face Jobs, a fully managed cloud GPU. agent:
Generate UV scripts with inline dependencies. Submit to HF job via hf CLI. Reports job ID and monitoring URL. Push the trained model to the Hugging Face Hub repository.
Example training script
The skill generates a script similar to the following based on the examples in the skill.
from laze import fast language model
from trl import SFTTrainer, SFTConfig
from dataset import load_dataset model, tokenizer = FastLanguageModel.from_pretrained(
“LiquidAI/LFM2.5-1.2B-Instruction”load_in_4bit=truthmax_seq_length=2048) model = FastLanguageModel.get_peft_model( model, r=16lora_alpha=32,lora_dropout=0target module =(
“q_project”,
“k_proj”,
“v_project”,
“Out Project”,
“Inside the project”,
“w1”,
“w2”,
“w3”), ) dataset =load_dataset(“trl-lib/capybara”split =“train”) trainer = SFTTrainer(model = model, tokenizer = tokenizer, train_dataset = dataset, args = SFTConfig(output_dir =“./output”push_to_hub=truthhub model ID=“Username/My Model”per_device_train_batch_size=4gradient_accumulation_steps=4num_train_epochs=1learning rate =2e-4report to =“Thracio”),) trainer.train() trainer.push_to_hub()
Model Size Recommended GPU Approximate Cost/Time t4-small ~$0.40 1-3B params t4-medium ~$0.60 3-7B params a10g-small ~$1.00 7-13B params a10g-large ~$3.00
For an overview of Hugging Face Spaces pricing, check out this guide.
Tips for using coding agents
Be specific about the model and dataset you want to use, and include the hub ID (such as Qwen/Qwen2.5-0.5B or trl-lib/Capybara). The agent searches for and validates those combinations. If you want to use Unsloth, please mention it explicitly. Otherwise, the agent chooses a framework based on your model and budget. Ask for a cost estimate before starting a large job. Request Trackio monitoring of your real-time loss curve. Check the status of the job by asking the agent to inspect the logs after submission.
resource

