DEV Community

Mayank Laddha
Mayank Laddha

Posted on

GRPO to get structured data

I saw this line "GRPO gives developers a way to teach models how to reason better, faster, and without breaking the bank." and just loved it.
I personally feel we will see more task specific models and GRPO is a good choice if the task is logical or format-sensitive..
Took a 1.5B Qwen2.5-Coder model, fine-tuned with GRPO, asking to extract structured JSON from OCR text based on 'any user-defined schema'. Needs more work but it works!
Unstructured to structured

Here is the model, you can use it in combination with paddleocr:

https://huggingface.co/MayankLad31/invoice_schema

My interest in the intersection of AI and developer advocacy has been growing significantly.

Top comments (4)

Collapse
 
dotallio profile image
Dotallio •

Really cool use case! Did you run into any tricky edge cases with OCR errors or inconsistent fields during extraction?

Collapse
 
mayank_laddha_ml profile image
Mayank Laddha •

I was more focused on getting structured JSON based on 'any user-defined schema'..so basically user can define the schema. for ocr i used paddleocr but i guess we can use better ones..

Collapse
 
nathan_tarbert profile image
Nathan Tarbert •

Pretty cool seeing how GRPO levels things up for structured data. I love trying new stuff like this, especially when it's not just hype.

Collapse
 
mayank_laddha_ml profile image
Mayank Laddha •

thanks! yeah for me unless i try and see for myself, it is difficult to know how useful something is or does it really work?