Benchmark compares five small language models for legal RAG
BenchmarkPublished: Source: arXiv cs.AI/CL/LG
TL;DR:cpp. 21 tokens per second. 11 seconds).
A study benchmarked five small language models in a local legal retrieval-augmented generation pipeline, using BM25 retrieval on the FIRE 2019 AILA corpus and inference through llama.cpp. Qwen2.5-1.5B had the highest structural usability rate (1.00) but a 0.16 citation-grounded response rate; Llama-3.2-1B led throughput at 6.21 tokens per second. Phi-3 Mini Q4 had the highest citation-grounded response rate (0.38), alongside the longest mean time to first token (69.11 seconds).
Key points
- The evaluation covered five small language models using a shared local legal RAG pipeline.
- Qwen2.5-1.5B: structural usability 1.00; citation-grounded response rate 0.16.
- Llama-3.2-1B: highest mean end-to-end throughput at 6.21 tokens/s.
- Phi-3 Mini Q4: highest citation-grounded response rate at 0.38 and mean time to first token of 69.11 seconds.
- Citation metrics track links to retrieved documents, not whether those cases substantiate legal claims.
Why it matters
Teams evaluating local AI for legal research should measure formatting, citation behaviour, and speed separately: the model that produces usable answers fastest is not necessarily the one that cites retrieved cases most often.
Companies and models mentioned
- Qwen2.5-1.5B
- Llama-3.2-1B
- Phi-3 Mini Q4
- FIRE 2019 AILA
- llama.cpp
- BM25