Instructions to use cognis-digital/Opal-8B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use cognis-digital/Opal-8B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="cognis-digital/Opal-8B-GGUF", filename="opal-8b-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use cognis-digital/Opal-8B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf cognis-digital/Opal-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf cognis-digital/Opal-8B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf cognis-digital/Opal-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf cognis-digital/Opal-8B-GGUF: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 cognis-digital/Opal-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf cognis-digital/Opal-8B-GGUF: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 cognis-digital/Opal-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf cognis-digital/Opal-8B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/cognis-digital/Opal-8B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use cognis-digital/Opal-8B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cognis-digital/Opal-8B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cognis-digital/Opal-8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cognis-digital/Opal-8B-GGUF:Q4_K_M
- Ollama
How to use cognis-digital/Opal-8B-GGUF with Ollama:
ollama run hf.co/cognis-digital/Opal-8B-GGUF:Q4_K_M
- Unsloth Studio
How to use cognis-digital/Opal-8B-GGUF 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 cognis-digital/Opal-8B-GGUF 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 cognis-digital/Opal-8B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cognis-digital/Opal-8B-GGUF to start chatting
- Pi
How to use cognis-digital/Opal-8B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cognis-digital/Opal-8B-GGUF: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": "cognis-digital/Opal-8B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use cognis-digital/Opal-8B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cognis-digital/Opal-8B-GGUF: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 cognis-digital/Opal-8B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use cognis-digital/Opal-8B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cognis-digital/Opal-8B-GGUF:Q4_K_M
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 "cognis-digital/Opal-8B-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use cognis-digital/Opal-8B-GGUF with Docker Model Runner:
docker model run hf.co/cognis-digital/Opal-8B-GGUF:Q4_K_M
- Lemonade
How to use cognis-digital/Opal-8B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cognis-digital/Opal-8B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Opal-8B-GGUF-Q4_K_M
List all available models
lemonade list
Opal-8B โ a security-specialized Llama-3.1-8B that beats the stock model
Opal-8B is stock Llama-3.1-8B-Instruct with defensive-security expertise trained in via LoRA โ so it keeps the base model's general ability and adds a large security edge on top. On our harness it beats stock Llama-3.1-8B-Instruct overall, wins on math and security, and matches it on code.
Built by Cognis Digital (US). Native Llama-3.1 tool-calling. Part of the Opal suite with the Opal router.
Why this works (and the merges didn't)
We first tried merging open models (DARE-TIES). Every merge lost to stock Instruct โ a merge only interpolates its components, it can't exceed them, and the grafts degraded the base's code/math. The fix was to stop merging and train: a LoRA on frozen stock Instruct, on a defensive-security corpus generated by open teacher models (gpt-oss-20b, Phi-4). Training adds capability; merging only averages it. That is the entire difference between the table below and a loss.
Benchmarks (measured here โ Ollama, greedy, n = 25 subset, identical harness)
code = HumanEval pass@1 (executed); math = GSM8K exact-match; sec = a
transparent defensive-security keyword rubric
(bench/tasks/sec.json: Cobalt Strike detection, SQLi,
MCP threat-modeling, Sigma, UEFI bootkit). blend = 0.45ยทcode + 0.25ยทmath +
0.30ยทsec.
| model | code | math | sec | blend |
|---|---|---|---|---|
| Opal-8B (Q4_K_M) | 0.88 | 0.76 | 0.424 | 0.713 |
| Llama-3.1-8B-Instruct (stock peer) | 0.92 | 0.68 | 0.212 | 0.648 |
Opal wins the blend (0.713 vs 0.648), wins math and security, and is within noise on code. Honest note: stock Instruct is marginally ahead on raw HumanEval (0.92 vs 0.88) โ we publish that, not hide it. Every number reproduces with the harness in this repo.
Published frontier reference (official full-set numbers, different harness, context only โ an 8B is not a frontier model):
| model | HumanEval | GSM8K | source |
|---|---|---|---|
| Llama-3.1-8B-Instruct | 72.6 | 84.5 | Meta official evals |
| GPT-4o | 90.2 | ~96 | public reports |
| Claude 3.5 Sonnet | 92.0 | 96.4 | Anthropic |
HumanEval/GSM8K are saturated at the frontier and no longer reported head-to-head; shown only to place the 8B class. No frontier-parity claim.
Quantization ladder
| file | size | use |
|---|---|---|
opal-8b-Q4_K_M.gguf |
4.9 GB | default โ best size/quality |
opal-8b-Q5_K_M.gguf |
5.7 GB | higher quality |
opal-8b-Q6_K.gguf |
6.6 GB | near-lossless |
opal-8b-Q8_0.gguf |
8.5 GB | maximum fidelity |
Native tool-calling (Ollama)
import ollama
ollama.chat(model="opal-8b", messages=[{"role":"user","content":"weather in Charleston?"}],
tools=[{"type":"function","function":{"name":"get_weather",
"parameters":{"type":"object","properties":{"location":{"type":"string"}},
"required":["location"]}}}])
What it's for
Detection engineering (Sigma/Suricata), threat modeling, MCP/agent security, firmware/ICS reasoning, secure code review, agentic tool use โ with general code/reasoning at Llama-3.1-8B-Instruct level.
How it was made
Base: Llama-3.1-8B-Instruct (frozen). LoRA (r=16) trained locally on CPU (no
cloud) over a defensive-security SFT corpus distilled from gpt-oss-20b + Phi-4,
then merged and quantized. Recipe and harness are in the repo.
Limitations & safety
Inherits Llama-3.1-Instruct's alignment and knowledge cutoff. Security content is for authorized, defensive use (detection, threat modeling, hardening). Verify generated code before running it.
License
Apache-2.0. Trainer/quantizer: PEFT + llama.cpp.
- Downloads last month
- 193
4-bit
5-bit
Model tree for cognis-digital/Opal-8B-GGUF
Base model
meta-llama/Llama-3.1-8B