A developer has demonstrated that fine-tuning a small named-entity recognition (NER) model using labels from a large language model can be highly cost-effective. By using Gemini 3.1 Pro to label 4,290 Reddit comments regarding knife brands, models, and steel types, the project incurred a cost of only $9.
Fine-tuning GLiNER with Gemini for $9 achieves high NER accuracy
The goal was to train GLiNER, an open-source zero-shot NER model, to perform similar tasks locally, thereby avoiding the ongoing API costs of a larger model. While the initial zero-shot accuracy of GLiNER was approximately 0.65 F1 against Gemini's labels, the fine-tuned models showed significant improvements. The 209M medium model reached an F1 score of 0.800, while the 459M large model achieved 0.83 on a validation set.
The project highlights the practical challenges of small-scale fine-tuning. Despite the successful result, the developer noted that significant time was spent debugging a tensor issue where the words_mask was incorrectly used as a word index rather than a mask, causing training to stall with a flat loss.
Sources
- I had Gemini train its own replacement for $9 (Hacker News Frontpage, 2026-09-17)