Project case study

LLM Fine-Tuning for Information Extraction (NER)

This project provides a pipeline for fine-tuning the Phi-3-mini-4k-instruct model for Information Extraction tasks. By leveraging the Unsloth framework and LoRA (Low-Rank Adaptation), we enable efficient fine-tuning on consumer-grade GPUs, transforming unstructured text into structured JSON data.

Key outcomes

  • Efficient Fine-Tuning: Uses Unsloth's optimized kernels for 2x faster training and 60% less memory usage.
  • Configurable Pipeline: All training parameters (learning rate, epochs, LoRA rank) are externalized in config.yaml.
  • GGUF Export: Automatically exports the fine-tuned model to GGUF format for easy inference with tools like Ollama or llama.cpp.
  • Reproducible: Python script and requirements file provided for consistent environment setup.
  • Entity Extraction: Identifies and extracts specific entities such as Name, Age, Job, Gender.

The primary goal of this model is to extract structured biographical information from unstructured narrative text. It acts as a specialized Information Extraction engine that parses natural language descriptions and outputs standardized JSON objects containing key entities.