A two-stage knowledge distillation pipeline that transforms a 27B parameter model into an affordable, Norwegian-specific 7B legal AI — then deploys it through CorpusAI for organisations like Do Better Norge. A practical demonstration that expert AI doesn't require expert budgets.
The legal AI landscape is dominated by solutions that require expensive API subscriptions, send sensitive documents to foreign cloud providers, and charge per query. For Norwegian organisations — particularly NGOs, small law firms, and advocacy groups — these solutions are either financially inaccessible or legally problematic under GDPR.
NorwAI changes the equation. By distilling a large 27B parameter model down to 7B parameters, then fine-tuning it with Norwegian-specific legal intelligence, we produce a model that:
The practical impact: a family law advocacy group like Do Better Norge can deploy a legal AI assistant that knows Norwegian child welfare legislation as well as a specialist — without a specialist's hourly rate.
The NorwAI model is produced through a two-stage distillation process. Each stage has a distinct purpose: Stage 1 compresses general intelligence, Stage 2 injects Norwegian domain expertise.
The Qwen 2.5-27B model serves as the teacher in Stage 1. This is a 27-billion parameter model with strong multilingual capabilities and demonstrated proficiency in legal and analytical reasoning tasks. The teacher processes a curated dataset of legal documents and generates Chain-of-Thought (CoT) training pairs in JSONL format.
The teacher's role is pedagogical: it produces structured reasoning traces that expose how a large model analyses legal text — identifying relevant statutes, cross-referencing precedents, evaluating procedural compliance, and reaching conclusions. These reasoning traces become the training signal for the student.
Training pair generation example:
The 7B student model learns from the teacher's reasoning traces via LoRA fine-tuning. The result is Alpha Model v0.1 — a compact model that has internalised the 27B teacher's analytical approach but runs at approximately 4× the inference speed.
At this stage, Alpha v0.1 is a general-purpose legal reasoning model. It can analyse legal texts and produce structured reasoning, but it doesn't yet have specialised knowledge of Norwegian legislation, terminology, or procedural norms. That's what Stage 2 provides.
| Parameter | Value | Rationale |
|---|---|---|
| LoRA Rank | 48 | Balanced for legal reasoning without over-parameterisation |
| LoRA Alpha | 96 | Alpha/rank ratio 2.0 for consistent adapter scaling |
| Target Modules | q, k, v, o, gate, up, down | Full attention + MLP for comprehensive reasoning transfer |
| Learning Rate | 2 × 10-4 | Slightly higher than CO2 model due to larger domain scope |
| Context Length | 4,096 tokens | Sufficient for legal document excerpts + CoT blocks |
| Training Data | ~3,000 pairs | Mix of legal Q&A, reasoning chains, and boundary examples |
Stage 2 takes the Alpha v0.1 model and applies a second round of LoRA fine-tuning with a curated Norwegian legal corpus. This corpus includes:
Primary Legislation
Barnelova (Children Act), Barnevernsloven (Child Welfare Act), Menneskerettsloven (Human Rights Act), Forvaltningsloven (Public Administration Act)
Case Law & Rulings
ECtHR rulings (Strand Lobben v. Norway, Abdi Ibrahim v. Norway), Norwegian Supreme Court (Høyesterett) family law precedents
Regulatory Guidance
Bufdir (Children, Youth and Family Affairs) guidelines, Barneombudet (Ombudsman for Children) reports, municipal Barnevern procedural manuals
Language Training
Norwegian Bokmål and Nynorsk legal terminology, professional register for government and academic audiences, bilingual EN↔NO translation pairs
The result is NorwAI Alpha v0.1-NO: a 7B model that combines the 27B teacher's reasoning capabilities with deep knowledge of Norwegian family law, child welfare procedures, and bilingual Norwegian-English proficiency. It reads and responds like a Norwegian legal professional, not a generic chatbot.
Do Better Norge is a Norwegian advocacy organisation focused on family rights and child welfare reform. Their mission: "Every child deserves both parents." They campaign for transparent procedures, fair hearings, and protection of family bonds — providing legal guides, educational resources, and community support for families navigating Norway's child welfare system.
Do Better Norge serves families who often cannot afford specialist legal counsel. These families need to understand complex legislation (Barnelova, Barnevernsloven), navigate procedural requirements, and reference ECtHR rulings — all in Norwegian. Existing AI solutions either:
Do Better Norge deploys the NorwAI Alpha v0.1-NO model through the CorpusAI platform. This gives them:
Custom Document Corpus
Do Better Norge uploads their own legal guides, case analyses, ECtHR ruling summaries, and advocacy documents. The model answers questions grounded in their knowledge base, with source citations.
European Data Sovereignty
All data stays on Hetzner servers in Helsinki and Nuremberg. NVIDIA RTX PRO 6000 Blackwell GPUs (96GB VRAM) provide inference. Zero data export. WireGuard encrypted mesh. Full GDPR compliance.
Affordable at Scale
No per-query API costs. The 7B model runs efficiently on the CorpusAI infrastructure with predictable monthly pricing. An NGO budget can sustain what would cost 10× more on commercial platforms.
Practical example:
The NorwAI/Do Better Norge implementation demonstrates a repeatable model. Any organisation with domain-specific documents can follow the same pipeline to create their own specialised AI — making this approach unique in the market.
Law Firms
Upload case files, legal opinions, and precedent analyses. Get an AI that knows your firm's specialisation — whether that's maritime law, immigration, or corporate compliance. Cite your own previous work in new analyses.
Municipalities & Government
Upload regulatory frameworks, planning documents, and policy guidelines. Deploy a model that helps citizens navigate local regulations, answers questions about permits, and references the correct municipal procedures.
NGOs & Advocacy Groups
Upload advocacy materials, legal guides, and research reports. Provide your community with AI-powered access to expertise they couldn't otherwise afford — 24/7, in their own language, grounded in your verified resources.
Healthcare & Compliance
Upload clinical guidelines, patient safety protocols, and regulatory documentation. Create a private AI assistant for healthcare workers that references approved procedures — never hallucinating medical guidance.
What Makes This Unique
| Feature | Commercial AI APIs | NorwAI + CorpusAI |
|---|---|---|
| Data Location | US / Global cloud | EU/EEA only (Helsinki, Nuremberg) |
| Custom Training | Limited or impossible | Full fine-tuning on your documents |
| Pricing Model | Per-query / per-token | Flat monthly (predictable for budgets) |
| Norwegian Legal Knowledge | Generic / surface-level | Deep: Barnelova, Barnevernsloven, ECtHR |
| Model Ownership | Vendor-locked | Your model, your weights, your deployment |
| Source Citations | Unreliable | Every answer cites your uploaded documents |
The NorwAI model is deployed through the CorpusAI platform (ai.bluenotelogic.com), which provides the infrastructure, document management, and user interface layers.
Available Models
| 72B | Reasoning & Legal Analysis |
| 32B | Code Intelligence |
| 27B | Grading & Classification |
| 7B (NorwAI) | Norwegian Legal Specialist |
Infrastructure
| GPU | RTX PRO 6000 Blackwell (96GB) |
| Location | Helsinki & Nuremberg (EU) |
| Network | WireGuard encrypted mesh |
| Compliance | GDPR, tenant isolation |
The NorwAI project validates a core innovation hypothesis: "Knowledge distillation, combined with domain-specific fine-tuning and private corpus grounding, can democratise access to expert-level AI for organisations that have been priced out of the commercial AI market."
This is not a theoretical proposition. Do Better Norge is a live deployment. The pipeline from 27B teacher to 7B student to CorpusAI deployment is operational. The model answers questions about Norwegian family law in Bokmål, cites uploaded documents, and runs within European borders — today.
The broader implication for the innovation management field: the barrier to deploying domain-specific AI has shifted from hardware and expertise to data curation. Any organisation that can curate a quality document corpus can now have a specialist AI. The distillation framework (teacher → student → fine-tune → deploy) is repeatable across domains and languages.
NorwAI Legal Intelligence — Do Better Norge Case Study
A GilliganTech Research Project — Led by Dave Gilligan
Blue Note Logic Inc. × Gilligan Tech ENK • Powered by CorpusAI