Instructions to use shafire/OpenZero-Ouroboros-3.8B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shafire/OpenZero-Ouroboros-3.8B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shafire/OpenZero-Ouroboros-3.8B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("shafire/OpenZero-Ouroboros-3.8B-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use shafire/OpenZero-Ouroboros-3.8B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shafire/OpenZero-Ouroboros-3.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": "shafire/OpenZero-Ouroboros-3.8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
- SGLang
How to use shafire/OpenZero-Ouroboros-3.8B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "shafire/OpenZero-Ouroboros-3.8B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shafire/OpenZero-Ouroboros-3.8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "shafire/OpenZero-Ouroboros-3.8B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shafire/OpenZero-Ouroboros-3.8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use shafire/OpenZero-Ouroboros-3.8B-GGUF with Ollama:
ollama run hf.co/shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use shafire/OpenZero-Ouroboros-3.8B-GGUF with Docker Model Runner:
docker model run hf.co/shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
- Lemonade
How to use shafire/OpenZero-Ouroboros-3.8B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.OpenZero-Ouroboros-3.8B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use shafire/OpenZero-Ouroboros-3.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 shafire/OpenZero-Ouroboros-3.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 "shafire/OpenZero-Ouroboros-3.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"
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M# Run inference directly in the terminal:
llama cli -hf shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_MUse 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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M# Run inference directly in the terminal:
./llama-cli -hf shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_MBuild 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 shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M# Run inference directly in the terminal:
./build/bin/llama-cli -hf shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_MUse Docker
docker model run hf.co/shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_MMODEL IS OUTPUTTING TRAINING DATA TALKING TO IT'S SELF ERRORS AND ACTING STRANGE PERFORMING AUTONOMOUS ACTIONS.
NOT FOR PRODUCTION
Self Improving Recursive LLM
OpenZero Ouroboros 3.8B GGUF
A reproducible, revision-pinned Phi-4 Mini experiment for local reasoning and agentic-AI research.
OpenZero Ouroboros 3.8B is an experimental QLoRA derivative of microsoft/Phi-4-mini-instruct, distributed as a verified Q4_K_M GGUF for llama.cpp, LM Studio, KoboldCpp, and compatible local-LLM runtimes.
This release emphasizes evidence and reproducibility: pinned base revision, separated train/validation hashes, finite QLoRA loss, immutable adapter hash, exact FP16 merge hashes, GGUF SHA-256, rollback metadata, and a real llama-cli inference test.
This is an experimental two-step QLoRA candidate, not a claim of broad benchmark superiority or production readiness. Evaluate it against the official base for your workload.
Download
| File | Quantization | Size | SHA-256 |
|---|---|---|---|
OpenZero-Ouroboros-3.8B-Q4_K_M.gguf |
Q4_K_M | 2,493,840,128 bytes | 37bc691d36db8ab664dc740aaa030fab3520339bc646608377e4e52e5db5f51f |
Verified provenance
| Gate | Evidence |
|---|---|
| Base model | microsoft/Phi-4-mini-instruct |
| Exact base revision | cfbefacb99257ffa30c83adab238a50856ac3083 |
| License | MIT |
| Training records | 2,452 |
| Validation records | 130 |
| QLoRA smoke | 2 finite steps |
| Training loss | 1.9480341076850891 |
| Adapter SHA-256 | 72f1644402e773ca9db12f9a3ccf76e9d362348d8e312cc84758e465c45cf024 |
| Merge | FP16 safe_merge=True |
| GGUF runtime | llama.cpp b10451, commit 10bf611e533d81f739128304991c5e133c6aebd8 |
| Runtime throughput | 12.2 prompt tok/s; 5.2 generation tok/s on the recorded Kaggle CPU run |
Training and validation sets were checked for exact-row overlap. Their recorded hashes are:
- Train:
18e803cd06105aaa9c2279501408093ef8d941ad7d4ce22d8c50a7b0abaa933d - Validation:
04cf96f35c065413d37395161a8d5a6c8ee3adca1a5b4fcb402684dc884caecf
Fusion, teacher-output, locked-evaluation, rejected-candidate, Ministral, and failed Gemma 31B sources were excluded from the attached training inputs.
Run with llama.cpp
llama-cli \
-m OpenZero-Ouroboros-3.8B-Q4_K_M.gguf \
-cnv --single-turn --simple-io \
-p "Explain your reasoning briefly, then answer: what is 17 * 23?"
Increase -ngl when using a GPU-enabled llama.cpp build. Use -ngl 0 for CPU-only execution.
Python download
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="shafire/OpenZero-Ouroboros-3.8B-GGUF",
filename="OpenZero-Ouroboros-3.8B-Q4_K_M.gguf",
)
print(model_path)
What “self-improving” means here
Ouroboros uses a reproducible candidate-generation workflow rather than autonomous self-overwrite. Each candidate retains:
- parent/base revision;
- adapter and dataset hashes;
- evaluator results;
- immutable prior versions;
- a rollback pointer.
The model does not autonomously replace its base weights, evaluator, governance rules, accounts, or prior releases.
Intended uses
- local-LLM and GGUF experimentation;
- reasoning and instruction-following research;
- agentic orchestration prototypes with external validation;
- reproducible QLoRA, merge, quantization, and rollback studies;
- comparison against the exact official Phi-4 Mini base.
Limitations
- Only a two-step QLoRA smoke was performed; material capability improvement is not established.
- The exact base scored 0/10 on a narrow OpenZero typed-control conformance suite. This release still requires independent post-merge evaluation before any promotion.
- Language models can hallucinate facts, actions, tools, and completion states.
- Do not connect model text directly to safety-critical actuators. Use typed schemas, deterministic controllers, authorization, limits, monitoring, and emergency stop mechanisms.
- This release is not evidence of MOD, UKRI, Microsoft, OpenAI, or other institutional endorsement.
Reproducibility files
SHA256SUMSOpenZero-Ouroboros-3.8B-GGUF-Evidence.jsonOpenZero-Ouroboros-3.8B-hero.png
Attribution
Base model: Microsoft Phi-4-mini-instruct, released under the MIT License. OpenZero derivative work and release engineering by shafire.
Search terms
OpenZero Ouroboros, Phi-4 Mini GGUF, Phi-4 3.8B, Q4_K_M model, llama.cpp model, local reasoning LLM, agentic AI model, reproducible QLoRA, offline AI, local text-generation model.
- Downloads last month
- 401
4-bit
Model tree for shafire/OpenZero-Ouroboros-3.8B-GGUF
Base model
microsoft/Phi-4-mini-instruct
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M# Run inference directly in the terminal: llama cli -hf shafire/OpenZero-Ouroboros-3.8B-GGUF:Q4_K_M