forlop's picture
Upload README.md with huggingface_hub
9660559 verified
|
Raw
History Blame Contribute Delete
2.5 kB
---
license: mit
language:
- en
- 'no'
base_model: unsloth/Qwen3.5-4B
tags:
- microdata.no
- ssb
- norwegian
- register-data
- lora
- gguf
- rag
- ollama
library_name: gguf
---
# microdata.no copilot β€” v3.0 (q4_k_m GGUF)
A small, locally-deployable AI assistant fine-tuned to help users write
[microdata.no](https://microdata.no) scripts and answer questions about
Norwegian register-data variables published by [SSB (Statistics
Norway)](https://www.ssb.no/).
This repo hosts the deployed **q4_k_m quantised GGUF** (2.7 GB) and the
companion **Ollama `Modelfile`**. Full source (training, RAG, eval, deploy)
and the technical note: **<https://github.com/forlop/microdata-no-copilot>**
(branch `v3`).
## What's new in v3
- **Response-masking SFT** β€” trains on the assistant completion only.
- **Variable/command hallucination eliminated** β€” a retrieval-backed guardrail
plus cleaner training data; **0 fictional commands** across the 126-prompt
eval (this was v2's dominant failure mode).
- **Deduplicated training set** (1,667 cards) and small LoRA dropout.
- **Deployment fixes** β€” GGUF metadata corrected for Qwen3.5's hybrid
SSM+attention architecture (NextN/MTP layer) so Ollama loads it; the RAG
layer recovers answers Ollama routes into its `thinking` field.
## Evaluation (v3)
| Metric | Value |
|---|---|
| Training eval_loss | 0.274 |
| Deterministic eval (46-prompt) | 78.3% |
| LLM-judge, deployed q4 + RAG (80-prompt) | 56.2% (95% CI 45–67%) |
| Fictional commands | 0 / 126 |
On the LLM-judge metric v3 is on par with v2 (53.8%) within confidence
intervals; the decisive, measurable gain is the elimination of hallucinated
variables/commands. The judge rubric is `claude-haiku`-graded (unvalidated
against human labels β€” see the repo's TECHNICAL_NOTE).
## Quick start
```bash
# 1. Pull the GGUF from this repo (~2.7 GB, one-time)
ollama pull hf.co/forlop/microdata-copilot-v3:Q4_K_M
# 2. Clone the GitHub repo (Modelfile + RAG layer) and apply the SYSTEM prompt
git clone -b v3 https://github.com/forlop/microdata-no-copilot
cd microdata-no-copilot
ollama create microdata-copilot -f deploy/Modelfile
# 3. Try it
ollama run microdata-copilot "What is INNTEKT_LONN?"
```
## License & data note
Model weights released under MIT. The assistant was trained with material
derived from SSB's microdata.no documentation; users are responsible for
complying with SSB's terms when using outputs. The RAG index (containing
manual text) is **not** distributed here.