Fine-tuning a 350M Model for Better Structured Outputs in 100 GRPO Steps

AI-generated summary of reporting by Huggingface Blog. Read the original for the full story.

Why it matters

A fully public, cheap recipe shows teams can fine-tune tiny open models for reliable structured JSON output on free-tier GPUs, narrowing the gap to far larger models.

Read this as

Liquid AI published a step-by-step guide to improving how reliably a small language model returns text in the exact format a program needs, such as valid JSON. They fine-tuned their 350-million-parameter LFM2.5 model using a reinforcement-learning method called GRPO, with about 500 samples and 100 training steps. A benchmark of format-following called IFStruct improved from 22.6% to 29.7%. The whole run fits on a free-tier Colab or Kaggle GPU, and the notebook is public.

Liquid AI demonstrates that cheap task-specific fine-tuning can materially improve structured-output reliability of small models: a 350M-parameter model gained 7 points on the IFStruct benchmark (22.6% to 29.7%) using only 500 samples and 100 GRPO steps on a free 16 GB GPU. JSON pass rates jumped from 18.0% to 31.9%. The tuned model still trails the larger Qwen3.5-2B at 33.15%, but for teams needing cheap, schema-compliant outputs, small fine-tuned models become viable.

The recipe GRPO-trains LFM2.5-350M with a LoRA adapter (~6M trainable parameters, 1.66%) on ~500 Nemotron structured-output samples, augmented so 40% of prompts request fenced code blocks and 20% require top-level arrays. Three weighted reward functions (json_format 1.0, field_count 0.5, schema_validation 2.0) score completions; 100 steps with 8 generations per group. Evaluated via llama.cpp on a MacBook, IFStruct rises 22.6% to 29.7%, below Qwen3.5-2B's 33.15%.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Liquid AI LFM2.5-350M GRPO TRL IFStruct llama.cpp Qwen3.5-2B

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading