overthelex/ua-legal-citation-grounded-14b
The overthelex/ua-legal-citation-grounded-14b model is a 14.8 billion parameter language model developed by overthelex, based on Qwen2.5-14B. It is specifically fine-tuned for generating Ukrainian legal answers, ensuring every factual claim is attributed to provided court-decision excerpts with a [doc:ID] citation. This model excels at retrieval-augmented generation (RAG) for legal questions, refusing to hallucinate when sources are insufficient and operating with a 32768 token context length.
Loading preview...
UA Legal Citation-Grounded Generator (14B) Overview
This model, developed by overthelex, is a 14.8 billion parameter language model built upon Qwen/Qwen2.5-14B. It is specifically designed as a Ukrainian legal citation-grounded generator, intended for retrieval-augmented generation (RAG) pipelines over the Ukrainian ЄДРСР state court-decision registry. Its core function is to produce answers to legal questions where every factual claim is attributed to a source using [doc:ID] and to explicitly refuse to answer if the provided sources are insufficient, preventing hallucination.
Key Capabilities
- Citation-Grounded Responses: Generates Ukrainian legal answers, attributing all factual claims to provided court-decision excerpts with
[doc:ID]citations. - Refusal Mechanism: Explicitly refuses to answer when the provided context does not support a response, enhancing reliability.
- High Citation Accuracy: Achieves 95.7% citation coverage and 96.1% relevant citations in held-out evaluations, with low rates of distractor (2.35%) and out-of-context (3.9%) citations.
- Domain-Specific Training: Continuously pre-trained on ЄДРСР data and fine-tuned using a dataset of 47,301 citation-grounded ChatML examples, with a self-hosted Qwen2.5-72B-Instruct teacher.
- Large Context Window: Supports a context length of 32768 tokens, crucial for processing extensive legal documents.
Good For
- RAG-style Legal Drafting/QA: Ideal for creating legal documents or answering legal questions where source attribution is critical.
- Ukrainian Case Law Research: Serves as a research and reference aid for Ukrainian court decisions.
- Preventing Hallucination: Ensures answers are strictly grounded in provided evidence, making it suitable for high-stakes legal applications.
Important Usage Notes
- It is recommended to serve the model via HF
transformersgenerateand to usemax_length \u2265 8192during tokenization to avoid context truncation. A guardrail function is also provided to strip ungrounded citations as a belt-and-suspenders approach against fabrication.