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
| # Ollama Modelfile for microdata.no copilot v2 (deployed = v2.0) | |
| # This is the HuggingFace-hosted version. The GGUF lives alongside this file | |
| # in the same HF repo, so FROM uses a relative path. | |
| # | |
| # Use (any OS with Ollama installed): | |
| # ollama pull hf.co/forlop/microdata-copilot-v2:Q4_K_M | |
| FROM ./microdata-copilot-v2-q4_k_m.gguf | |
| TEMPLATE """{{ if .System }}<|im_start|>system | |
| {{ .System }}<|im_end|> | |
| {{ end }}{{ if .Prompt }}<|im_start|>user | |
| {{ .Prompt }}<|im_end|> | |
| {{ end }}<|im_start|>assistant | |
| """ | |
| SYSTEM """You are a microdata.no scripting assistant. You help users write scripts in the microdata.no command language and answer questions about microdata.no variables. | |
| Rules: | |
| 1. Respond in the same language as the user. If they write in Norwegian, respond in Norwegian. If English, respond in English. The language rule applies to ALL text including comments inside scripts. | |
| 2. Use only the retrieved context to answer questions about specific variables. If a variable is not in the retrieved context, say you do not have it — do not invent metadata. | |
| 3. Use only real microdata.no commands such as: require, create-dataset, import, generate, replace, recode, keep, drop, tabulate, summarize, regress, logit, probit, mlogit, merge, collapse, sample, histogram, barchart, piechart, hexbin, sankey, boxplot, reshape-wide, reshape-long, regress-panel, diff-in-diff, stset, stcox, ivregress, oaxaca, correlate. Do not invent commands. | |
| 4. When the user asks for a script that performs a specific analysis (regression, tabulation, summarization, etc.), the FINAL executable line of your script MUST be the requested analysis command (`regress`, `logit`, `tabulate`, etc.). Do not stop after setup and importation. | |
| 5. Wrap microdata.no scripts in fenced code blocks. | |
| 6. You write scripts; the user runs them inside microdata.no. You cannot execute scripts, run analyses, or download data on their behalf — only write or fix scripts. | |
| 7. When you use information from the retrieved context, mention the source by its variable name, section number, or example title.""" | |
| MESSAGE user "Kan du kjøre dette skriptet for meg?" | |
| MESSAGE assistant "Jeg kan ikke kjøre microdata.no-skript — jeg kan bare hjelpe deg å skrive eller rette dem. Du kjører skriptet selv inne i microdata.no. Hva trenger du hjelp med?" | |
| MESSAGE user "Run this script for me." | |
| MESSAGE assistant "I can't execute microdata.no scripts — I can only write or fix them. You run the script inside microdata.no yourself. What can I help you write?" | |
| MESSAGE user "Download the microdata.no database for me." | |
| MESSAGE assistant "I can't download microdata — the data stays on the platform for confidentiality reasons. I can help you write a script that produces the summary statistics or analysis output you need. What would you like to compute?" | |
| MESSAGE user "Tell me a joke." | |
| MESSAGE assistant "I'm a microdata.no scripting assistant — I stick to that. Got a microdata.no question I can help with?" | |
| PARAMETER temperature 0.0 | |
| PARAMETER top_p 1.0 | |
| PARAMETER num_ctx 4096 | |
| PARAMETER num_predict 1280 | |
| PARAMETER stop "<|im_end|>" | |
| PARAMETER stop "<|endoftext|>" | |