Instructions to use janihal/Llama-Poro-2-8B-Instruct-oQ4e with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use janihal/Llama-Poro-2-8B-Instruct-oQ4e with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("janihal/Llama-Poro-2-8B-Instruct-oQ4e") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use janihal/Llama-Poro-2-8B-Instruct-oQ4e with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "janihal/Llama-Poro-2-8B-Instruct-oQ4e"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "janihal/Llama-Poro-2-8B-Instruct-oQ4e" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use janihal/Llama-Poro-2-8B-Instruct-oQ4e with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "janihal/Llama-Poro-2-8B-Instruct-oQ4e"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "janihal/Llama-Poro-2-8B-Instruct-oQ4e" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "janihal/Llama-Poro-2-8B-Instruct-oQ4e", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use janihal/Llama-Poro-2-8B-Instruct-oQ4e with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "janihal/Llama-Poro-2-8B-Instruct-oQ4e"
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 janihal/Llama-Poro-2-8B-Instruct-oQ4e
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use janihal/Llama-Poro-2-8B-Instruct-oQ4e with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "janihal/Llama-Poro-2-8B-Instruct-oQ4e"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "janihal/Llama-Poro-2-8B-Instruct-oQ4e" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Llama-Poro-2-8B-Instruct-oQ4e
A 4-bit (mixed-precision) MLX quantization of LumiOpen/Llama-Poro-2-8B-Instruct, produced with oQ (oMLX v0.6.4) importance-matrix quantization. It is intended for fast local inference on Apple Silicon.
An 8-bit sibling is available at janihal/Llama-Poro-2-8B-Instruct-oQ8e.
Original model
Poro 2 8B Instruct is a Finnish/English instruction-following model built on the Llama 3.1 8B architecture through continued pretraining, SFT and DPO. It was created by AMD Silo AI, the TurkuNLP group at the University of Turku, and HPLT, and trained on the LUMI supercomputer.
All model behaviour, capabilities, evaluation results, training data, intended use and limitations are documented in the original model card. This repository only changes the weight precision and storage format — please refer to the original for everything else.
Quantization details
- Base model: LumiOpen/Llama-Poro-2-8B-Instruct
- Tool: oQ / oMLX v0.6.4
- Architecture: llama (8.03B params, 32 layers, 128256 vocab, 8192 context)
- Precision: 4-bit affine, mixed-precision — most weights at 4-bit, with attention
projections and early-layer
mlp.down_projkept at 5–6 bit for quality - Group size: 64
- Calibration: importance matrix (imatrix) enabled,
oqe_code_multilingualcalibration set, 128 samples at sequence length 512 - Format: MLX safetensors
- Size on disk: ~4.4 GB
Per-tensor bit assignments are recorded in config.json; calibration metadata is in
oq_imatrix_report.json.
Usage
Requires mlx-lm on an Apple Silicon Mac.
pip install mlx-lm
mlx_lm.generate --model janihal/Llama-Poro-2-8B-Instruct-oQ4e \
--prompt "Mikä on Suomen pääkaupunki?"
from mlx_lm import load, generate
model, tokenizer = load("janihal/Llama-Poro-2-8B-Instruct-oQ4e")
messages = [{"role": "user", "content": "Kerro lyhyesti poroista."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=256))
The chat template is bundled in tokenizer_config.json.
License
Released under the Llama 3.3 Community License, inherited from the base model. Built with Llama.
Attribution
If you use this model, please cite the original Poro 2 work by LumiOpen / AMD Silo AI / TurkuNLP / HPLT.
- Downloads last month
- 107
4-bit
Model tree for janihal/Llama-Poro-2-8B-Instruct-oQ4e
Base model
LumiOpen/Llama-Poro-2-8B-Instruct