The situation
The startup needed to classify legal documents and pull key data at scale. General-purpose LLMs were expensive to run and hard to control, and manual review couldn't keep up with volume.
What we did
We fine-tuned a specialized model with PyTorch, Transformers, and LoRA, trained on legal data and served through FastAPI. The result is a compact, task-specific model that classifies documents and extracts structured fields reliably.
The outcome
The model reaches 96% classification accuracy, processes documents 50× faster than manual review, and is 10× smaller than general-purpose LLMs — making it cheap and predictable to run.