Maximizing Structured Output Quality In 350M AI Models Through Targeted Fine-tuning
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Before you orderOffer from Amazon

Get the latest gadgets delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

Liquid AI has demonstrated that a straightforward, low-cost fine-tuning process can improve the structured output accuracy of a 350-million-parameter model from 22.6% to nearly 30%. This accessible approach uses minimal samples and can run on free-tier cloud GPUs, making task-specific model enhancement more attainable for developers.

Liquid AI has publicly released a simple, cost-effective method for improving the adherence of a 350-million-parameter language model, LFM2.5-350M, to structured output formats (see the original analysis). Using Group Relative Policy Optimization (GRPO), the company reports an increase in IFStruct benchmark scores from 22.6% to 29.7% after approximately 500 training samples and 100 training steps, a process executable on free-tier cloud GPUs like Google Colab or Kaggle. This development underscores the potential for small models to be task-specific tuned with minimal resources, making structured output tasks more accessible to a broader developer base.

Liquid AI’s approach involves fine-tuning the LFM2.5-350M model with the TRL library on a GPU, then evaluating locally on a MacBook Pro equipped with an Apple M5 Max chip and 36 GB of memory, using llama.cpp’s OpenAI-compatible endpoint. The training data was sourced from NVIDIA’s Nemotron-RL-instruction_following-structured_outputs dataset, which pairs prompts with JSON schemas and expected field counts. To better match the evaluation distribution, 40% of prompts were augmented with instructions to return output inside fenced code blocks, guiding the model to follow format instructions rather than always emit raw JSON.

Initial baseline evaluation on the full 2,000-sample IFStruct test set showed a 22.6% success rate, aligning closely with the 21.1% figure reported in the original IFStruct blog. Post fine-tuning, the success rate increased to 29.7%, representing a roughly 7-point gain. The errors identified in the base model included missing required fields, incorrect item counts, and type mismatches, with success rates varying across different output types—ranging from 4.3% for recipes to 45.8% for event ticket bookings.

At a glance
reportWhen: announced March 2024
The developmentLiquid AI’s new fine-tuning pipeline significantly enhances the structured output performance of the LFM2.5-350M model using Group Relative Policy Optimization, with measurable improvements on the IFStruct benchmark.

Impact of Cost-Effective Fine-tuning on Small Models

This development demonstrates that small, 350M-parameter models can be substantially improved in their ability to produce structured, parseable output with minimal additional training. The roughly 7-point increase on the IFStruct benchmark shows that targeted fine-tuning can enhance schema adherence, which is critical for real-world applications like data extraction, automation, and API integration. Because the process is low-cost and accessible—requiring only a few hundred samples and free GPU resources—it lowers barriers for developers and organizations to customize models for specific structured output tasks. This raises the possibility that smaller models, often viewed as less capable, can be tuned to perform competitively with larger models in specialized tasks, potentially reducing reliance on resource-intensive models in certain domains.

Amazon

cloud GPU for machine learning

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Relevance of Fine-tuning for Structured Output Tasks

Structured output tasks—such as JSON or YAML formatting, form filling, and schema adherence—are vital for integrating language models into workflows that require precise data parsing. Historically, benchmarks like IFStruct have measured a model’s ability to generate valid, schema-compliant outputs, but most models are evaluated on broader reasoning or extraction tasks, making dedicated measurement rare. Prior efforts have focused on large models or complex RL training pipelines, which are costly and less accessible. Liquid AI’s recent work builds on the understanding that even smaller models can be improved through straightforward fine-tuning, with prior research indicating that task-specific training enhances performance in specialized tasks. The use of publicly available datasets and open-source tools like llama.cpp further democratizes this process, enabling wider experimentation and deployment.

Amazon

fine-tuning AI models on Google Colab

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Limitations and Unanswered Questions about Results

While the reported improvements are promising, several aspects remain unclear. The pipeline used in this demonstration differs from the original RL-based training that achieved higher benchmark scores, and the results are not directly comparable. It is also uncertain whether similar gains can be achieved across different structured output tasks or with larger datasets. The claim that small models can “match” larger models in such tasks is presented as a hypothesis rather than a confirmed outcome, as no direct head-to-head comparisons have been provided. The stability of these improvements across different serving stacks, quantizations, or deployment environments has not yet been tested, and further validation is needed to confirm the generalizability of this approach.

Amazon

structured data JSON formatter tool

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for Broader Validation and Improvement

Future work will likely explore increasing the number of training samples and steps to assess whether further gains are possible. Testing the method on other small models and structured tasks could determine its broader applicability. Additionally, applying the same fine-tuning approach to quantized or lower-precision models may reveal how robust the improvements are across different deployment formats. The authors also plan to compare their method directly against larger models and more complex RL training pipelines to better understand the relative performance. Publishing more detailed benchmarks and conducting independent validation will be essential to establish this approach as a standard for task-specific small model tuning.

Amazon

small language model training kit

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What model was fine-tuned, and how?

The LFM2.5-350M model was fine-tuned using Group Relative Policy Optimization (GRPO) via the TRL library, with approximately 500 samples and 100 training steps.

How much did performance improve?

Scores on the IFStruct benchmark increased from 22.6% to 29.7%, a gain of about 7 percentage points on a local evaluation setup.

What hardware is needed?

Training can be done on free-tier cloud GPUs like Google Colab or Kaggle; evaluation was performed locally on a MacBook Pro with an Apple M5 Max and 36 GB of memory using llama.cpp.

Does this replicate the original IFStruct benchmark results?

No. The pipeline used here differs from the RL training pipeline that achieved higher scores in the original benchmark, and the authors clarify their results are not a direct comparison.

Can this approach be used for other structured tasks?

While promising, further testing is needed to confirm whether similar gains can be achieved on different tasks or with larger datasets, and the method’s generalizability remains to be validated.

Primary source: Hugging Face · via ThorstenMeyerAI.com

FALL

Fall Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

The Most Capable Model You Can Actually Buy: Astra, Read Against The System Card

Analysis of Astra’s GPT-6 model reveals it as the most capable publicly available AI, surpassing competitors in key benchmarks and real-world deployment safety.

Hardcore IndieWeb: Run Your Own Website 100% Independently For Only $0.01/Day

A new IndieWeb initiative offers individuals the ability to run their own independent websites for just one cent per day, emphasizing full control and privacy.

Redmagic Astra’s Rapid Rise: What It Means For Gaming Fans

Redmagic Astra gains global coverage, signaling a significant shift in gaming hardware. What this means for gamers and the industry is still unfolding.

SpaceX Owns Every Layer of AI Now. The Model Is Still the Weak Link.

SpaceX has purchased Cursor for $60 billion, gaining ownership of every AI layer except the model’s strength, which remains a vulnerability.