Instructions to use forlop/microdata-copilot-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use forlop/microdata-copilot-v2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="forlop/microdata-copilot-v2", filename="microdata-copilot-v2-q4_k_m.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use forlop/microdata-copilot-v2 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf forlop/microdata-copilot-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf forlop/microdata-copilot-v2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf forlop/microdata-copilot-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf forlop/microdata-copilot-v2:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf forlop/microdata-copilot-v2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf forlop/microdata-copilot-v2:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf forlop/microdata-copilot-v2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf forlop/microdata-copilot-v2:Q4_K_M
Use Docker
docker model run hf.co/forlop/microdata-copilot-v2:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use forlop/microdata-copilot-v2 with Ollama:
ollama run hf.co/forlop/microdata-copilot-v2:Q4_K_M
- Unsloth Studio new
How to use forlop/microdata-copilot-v2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for forlop/microdata-copilot-v2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for forlop/microdata-copilot-v2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for forlop/microdata-copilot-v2 to start chatting
- Pi new
How to use forlop/microdata-copilot-v2 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf forlop/microdata-copilot-v2:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "forlop/microdata-copilot-v2:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use forlop/microdata-copilot-v2 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf forlop/microdata-copilot-v2:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default forlop/microdata-copilot-v2:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use forlop/microdata-copilot-v2 with Docker Model Runner:
docker model run hf.co/forlop/microdata-copilot-v2:Q4_K_M
- Lemonade
How to use forlop/microdata-copilot-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull forlop/microdata-copilot-v2:Q4_K_M
Run and chat with the model
lemonade run user.microdata-copilot-v2-Q4_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -23,10 +23,10 @@ A small, locally-deployable AI assistant fine-tuned to help users write
|
|
| 23 |
Norwegian register-data variables published by [SSB (Statistics
|
| 24 |
Norway)](https://www.ssb.no/).
|
| 25 |
|
| 26 |
-
This repo hosts the deployed **q4_k_m quantised GGUF** (2.7 GB)
|
| 27 |
-
Ollama `Modelfile`
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
## Quick start
|
| 32 |
|
|
@@ -36,21 +36,40 @@ note live at **<https://github.com/forlop/microdata-no-copilot>**.
|
|
| 36 |
# macOS: brew install ollama (or download from ollama.com)
|
| 37 |
# Windows: download OllamaSetup.exe from ollama.com
|
| 38 |
|
| 39 |
-
# Pull
|
| 40 |
ollama pull hf.co/forlop/microdata-copilot-v2:Q4_K_M
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
```
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
```bash
|
| 48 |
-
|
| 49 |
-
cd microdata-no-copilot
|
| 50 |
pip install -r requirements.txt streamlit
|
| 51 |
streamlit run rag/app.py
|
| 52 |
```
|
| 53 |
|
|
|
|
|
|
|
|
|
|
| 54 |
## What this is
|
| 55 |
|
| 56 |
- **Base model:** Qwen3.5-4B (Apache-2.0, via Unsloth's pre-quantised release).
|
|
|
|
| 23 |
Norwegian register-data variables published by [SSB (Statistics
|
| 24 |
Norway)](https://www.ssb.no/).
|
| 25 |
|
| 26 |
+
This repo hosts the deployed **q4_k_m quantised GGUF** (2.7 GB) and the
|
| 27 |
+
companion **Ollama `Modelfile`**. The full source code (training, RAG,
|
| 28 |
+
eval, deployment) and the technical note live at
|
| 29 |
+
**<https://github.com/forlop/microdata-no-copilot>**.
|
| 30 |
|
| 31 |
## Quick start
|
| 32 |
|
|
|
|
| 36 |
# macOS: brew install ollama (or download from ollama.com)
|
| 37 |
# Windows: download OllamaSetup.exe from ollama.com
|
| 38 |
|
| 39 |
+
# 1. Pull the base GGUF from this repo (~2.7 GB, one-time)
|
| 40 |
ollama pull hf.co/forlop/microdata-copilot-v2:Q4_K_M
|
| 41 |
+
|
| 42 |
+
# 2. Clone the GitHub repo (contains the Modelfile + RAG layer)
|
| 43 |
+
git clone https://github.com/forlop/microdata-no-copilot
|
| 44 |
+
cd microdata-no-copilot
|
| 45 |
+
|
| 46 |
+
# 3. Apply the SYSTEM prompt + refusal few-shots + stop-token parameters
|
| 47 |
+
ollama create microdata-copilot -f deploy/Modelfile
|
| 48 |
+
|
| 49 |
+
# 4. Try it
|
| 50 |
+
ollama run microdata-copilot "What is INNTEKT_LONN?"
|
| 51 |
```
|
| 52 |
|
| 53 |
+
> **Why two steps?** `ollama pull` from Hugging Face downloads the raw
|
| 54 |
+
> GGUF plus the chat template embedded in its metadata — but **not** the
|
| 55 |
+
> custom Modelfile in this repo. Ollama only applies curated Modelfiles
|
| 56 |
+
> for models in its official library. For HF-hosted models, you apply
|
| 57 |
+
> your own Modelfile locally via `ollama create`. Without step 3, the
|
| 58 |
+
> model bleeds `<|endoftext|>` tokens and loops. With it, you get the
|
| 59 |
+
> full deployed configuration (system prompt, refusal patterns, stop
|
| 60 |
+
> tokens, greedy decoding).
|
| 61 |
+
|
| 62 |
+
## Full RAG-wrapped Streamlit demo
|
| 63 |
|
| 64 |
```bash
|
| 65 |
+
# After the four steps above, from the cloned repo directory:
|
|
|
|
| 66 |
pip install -r requirements.txt streamlit
|
| 67 |
streamlit run rag/app.py
|
| 68 |
```
|
| 69 |
|
| 70 |
+
Streamlit prints a `http://localhost:8501` URL — open it in your browser.
|
| 71 |
+
On CPU expect ~10–15 s per response; on a recent GPU, ~1–2 s.
|
| 72 |
+
|
| 73 |
## What this is
|
| 74 |
|
| 75 |
- **Base model:** Qwen3.5-4B (Apache-2.0, via Unsloth's pre-quantised release).
|