Skip to content

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

Hugging Face 22 min read Case study hardMaster

Training a coding model to paint watercolours with TRL and OpenEnv

An open reproduction of Surya Narreddi's watercolour-painting language model trains Qwen3.5-35B-A3B with GRPO in TRL to write p5.brush JavaScript, using an OpenEnv environment that renders sketches in headless Chromium. Restricted to 10 of the library's 47 methods, the policy is scored on a gate, code length, a Qwen3-VL pairwise judge comparing against a hand-rated pool of 178 model-generated paintings, and the HPSv3 preference model. Three reward mixes all learned, with mean group reward rising by +0.13 to +0.27. Early flat runs were fixed by four trainer changes: learning rate 2e-5 to 5e-5, constant_with_warmup scheduling, scale_rewards=none, and all-linear LoRA targets so the MoE projections actually got adapters. The environment, pool, scripts and models are all published.

Related posts

  • CoderForge-Preview: SOTA open dataset for training efficient coding agents

    Together AI hardMaster

    CoderForge-Preview is an open dataset of 258K test-verified coding agent trajectories (155K passing) covering 51K tasks across 1,655 repositories from R2E-Gym, SWE-Smith and SWE-Rebench. The trajectories were generated with Qwen3-Coder-480B in OpenHands Docker environments, filtered by rejection sampling and permissive-license audits, and cost about $130K to produce at a ~90% prompt cache hit rate. Fine-tuning Qwen3-32B on the passing trajectories, using Ulysses sequence parallelism, multipacking and token-level loss normalization at 128K context, reaches 59.4% pass@1 on SWE-Bench Verified, and a 4B model reaches 43.0%. Ablations show a repetition penalty helps only early checkpoints, so later checkpoints should be run without one.

  • 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.

  • Palette: teaching a small model to build decks in your design language

    Hugging Face mediumAdept

    Palette fine-tunes a 20B open-weight model with a single LoRA adapter to generate slide decks in a specific design language (IBM Design Language), splitting the work into a designer role that writes a structured JSON brief and a coder role that writes per-slide pptxgenjs code in parallel (about 6–7× faster). Training data is ~1000 synthetic decks (~10,000 slides) from a large open teacher, with counterfactual reasoning traces and render-check-repair loops. Reference decks fixed hallucination where prompt rules did not, and designer examples had to be oversampled 5×. A geometry-checking harness keeps editor-model rewrites only when they measurably improve a slide, adding 3.5 points on PresentBench, where Palette ranks first on Economics and Education and second overall (59.7 vs NotebookLM's 60.8).

  • 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 quest for software engineering knowledge.

Look:
Layout: