4 December 2026

AI and agents, every day. Straight to it.

ModelsQuick notes

LFM2.5-350M improves structural compliance after GRPO tuning

A September 3 recipe uses GRPO to improve LFM2.5-350M’s JSON schema compliance for integrations.

Diego Sato

· 1 min read

Read in Portuguese

Getting JSON into the requested structure remains a practical integration problem. A recipe published on September 3 raised LFM2.5-350M’s IFStruct pass rate from 22.6% to 29.7% after tuning. The recipe used Group Relative Policy Optimization, a reinforcement-learning method, through the TRL library.

Leonie Monigatti and coauthors used roughly 500 examples and 100 training steps. The rewards check whether a completion parses in the requested format, contains the expected field count, and satisfies its JSON schema.

Most of the improvement came from JSON, whose pass rate rose from 18.0% to 31.9%. YAML moved from 27.2% to 27.5%. The comparison uses the same llama.cpp serving stack.

The official example merges the trained adapter into the weights and saves the checkpoint:

merged_model = trainer.model.merge_and_unload()
merged_model.save_pretrained(MERGED_DIR)
tokenizer.save_pretrained(MERGED_DIR)

The recipe is useful for teams that control a small model and need better compliance with specific formats. Its final 29.7% pass rate makes schema validation an essential acceptance step before a downstream integration consumes the response.

Report an error

Use 10–1,000 characters; a reply email shares this space.

Next in your reading list