Instructions to use devlucascfarias/ordo-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use devlucascfarias/ordo-3b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-3B-Instruct") model = PeftModel.from_pretrained(base_model, "devlucascfarias/ordo-3b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use devlucascfarias/ordo-3b 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 devlucascfarias/ordo-3b # Run inference directly in the terminal: llama cli -hf devlucascfarias/ordo-3b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf devlucascfarias/ordo-3b # Run inference directly in the terminal: llama cli -hf devlucascfarias/ordo-3b
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf devlucascfarias/ordo-3b # Run inference directly in the terminal: ./build/bin/llama cli -hf devlucascfarias/ordo-3b
Use Docker
docker model run hf.co/devlucascfarias/ordo-3b
- Llama new
- LM Studio
- Jan
- vLLM
How to use devlucascfarias/ordo-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devlucascfarias/ordo-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devlucascfarias/ordo-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/devlucascfarias/ordo-3b
- Ollama
How to use devlucascfarias/ordo-3b with Ollama:
ollama run hf.co/devlucascfarias/ordo-3b
- Unsloth Desktop
- Pi
How to use devlucascfarias/ordo-3b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devlucascfarias/ordo-3b
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": "devlucascfarias/ordo-3b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use devlucascfarias/ordo-3b with Docker Model Runner:
docker model run hf.co/devlucascfarias/ordo-3b
- Lemonade
How to use devlucascfarias/ordo-3b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devlucascfarias/ordo-3b
Run and chat with the model
lemonade run user.ordo-3b-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use devlucascfarias/ordo-3b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devlucascfarias/ordo-3b
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 devlucascfarias/ordo-3b
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use devlucascfarias/ordo-3b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devlucascfarias/ordo-3b
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 "devlucascfarias/ordo-3b" \ --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 devlucascfarias/ordo-3b# Run inference directly in the terminal:
llama cli -hf devlucascfarias/ordo-3bBuild from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf devlucascfarias/ordo-3b# Run inference directly in the terminal:
./build/bin/llama cli -hf devlucascfarias/ordo-3bUse Docker
docker model run hf.co/devlucascfarias/ordo-3bโ ORDO 3B
Real-Time Neural Context Filter & Active Episodic Memory for Frontier Coding Agents
"Ordo et connexio idearum idem est ac ordo et connexio rerum"
โ Baruch Spinoza (Ethics II, Proposition 7)
Ordo 3B is a specialized, real-time Neural Context Garbage Collector and Active Episodic Memory engine designed to sit between Frontier Coding Agents (Claude Code, Antigravity, Cursor, Windsurf, Codex, OpenCode) and noisy environment streams (terminal test/build logs, compiler traces, monolithic source files, multi-turn debugging trajectories).
By fine-tuning Qwen/Qwen2.5-Coder-3B-Instruct on rigorous, teacher-curated contrastive datasets with 100% deterministic grounding verification, Ordo 3B achieves 75% to 99% context token reduction while preserving 100% of critical file paths, line numbers, and causal error chains.
๐ Quickstart
1. Run via Ollama (Zero Configuration)
You can pull and run the quantized GGUF directly through Ollama:
ollama run hf.co/devlucascfarias/ordo-3b
Or clone and create locally using the included Modelfile:
ollama create ordo:3b -f Modelfile
2. Use with the ordo Command-Line Harness (CLI)
Install the Python CLI harness into your development environment:
pip install git+https://github.com/devlucascfarias/ordo.git
Run tests, slice files, or track debugging state with zero context bloat:
# 1. Execute tests and return causal YAML instead of 10,000 lines of logs
ordo run -i "Check if FX settlement fix resolved unit test failure" pytest -v
# 2. Surgically inspect large files (>5k lines) with 1-based line accuracy
ordo slice -i "Find where repair_yaml_output is defined" src/ordo/schema.py
# 3. Intent-filtered repository search
ordo search -i "Find all callers of call_ollama_ordo" "call_ollama_ordo"
# 4. Record dead-ends to prevent repetitive agent debugging loops
ordo dead-end "Global asyncio.Lock in webhook" "Caused worker deadlock under load"
# 5. Compact active session memory and view token savings telemetry
ordo compact -i "Stabilize webhook idempotency"
ordo stats
3. Use via Transformers & PEFT
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "Qwen/Qwen2.5-Coder-3B-Instruct"
adapter_id = "devlucascfarias/ordo-3b"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_id)
prompt = """<|im_start|>system
You are Ordo 3B, a surgical Neural Context Garbage Collector for coding agents...<|im_end|>
<|im_start|>user
<gc_mode>TOOL_OUTPUT</gc_mode>
<intent>Verify Next.js SSR build error</intent>
<raw_input>...your noisy terminal logs...</raw_input><|im_end|>
<|im_start|>assistant
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.0)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
๐ Benchmark Results
Evaluated across Stratified Multi-Language Suites (Python, TypeScript, Rust, Go, C++, Kotlin, C#, Terraform, Kubernetes) and a True Unseen Out-of-Distribution (OOD) Holdout Suite (PHP/Laravel, Ruby/Rails, Elixir/Phoenix, Swift/Xcode with 0 training examples):
| Metric | Base Qwen2.5-Coder-3B (Zero-Shot) |
Ordo 3B v0.1 (1280 ctx) | Ordo 3B v1.0 (2048 ctx) | Ordo 3B Final (3072 ctx) | Unseen OOD Holdout (PHP, Ruby, Elixir, Swift) |
|---|---|---|---|---|---|
| Pure YAML Rate (Zero Markdown) | 0.0% | 86.7% | 80.0% | 100.0% (30/30) | 100.0% (with auto-repair) |
| Strict Schema Adherence | 0.0% | 63.3% | 80.0% | 100.0% (30/30) | 100.0% (with auto-repair) |
| Status Classification Accuracy | 26.7% | 90.0% | 80.0% | 100.0% (30/30) | 100.0% |
| Exact File Path Recall | 35.0% | 83.3% | 100.0% | 98.3% | 80.0% |
| Exact Line Number Recall | 31.7% | 70.0% | 100.0% | 98.3% | 80.0% |
| Zero-Hallucination Grounding Rate | 50.0% | 90.0% | 96.7% | 100.0% (30/30) | 100.0% |
| Average Token Reduction | 0.0% | 45.2% | 58.1% | 62.3% โ 99.7% | 76.5% |
๐ง Supported Operational Modes
1. TOOL_OUTPUT
Intercepts noisy tool execution (test suites, builds, linters) and extracts a deterministic causal DAG:
status: FAIL
summary: 'Prisma P2002 unique constraint violation on (workspaceId, email) in src/server/services/subscription-service.ts:55.'
causal_trace:
- file: src/server/services/subscription-service.ts
lines: '55'
symbol: createSubscription
issue: 'Unique constraint failed on the fields: (`workspaceId`,`email`).'
exact_snippets:
- location: src/server/services/subscription-service.ts:55-57
code: "55 | return await ctx.db.subscription.create({\n56 | data: { workspaceId: input.workspaceId, email: input.email },\n57 | });"
2. CODE_SLICE
Performs surgical semantic slicing on source code files, returning only relevant symbols and exact 1-based line intervals:
status: FOUND
summary: repair_yaml_output in src/ordo/schema.py:122-190 normalizes inner single quotes and folds stray continuation lines.
relevant_symbols:
- file: src/ordo/schema.py
lines: '122-190'
symbol: repair_yaml_output
issue: Auto-repairs unescaped single quotes from dynamic language errors (PHP, Ruby, SQL).
exact_snippets:
- location: src/ordo/schema.py:122-127
code: "122 | def repair_yaml_output(raw_text: str) -> str:\n123 | \"\"\"Auto-repair unescaped inner single quotes...\"\"\""
3. MEMORY_COMPACT
Condenses multi-turn agent execution trajectories into an immutable State Ledger:
status: COMPACTED
active_goal: Resolve worker thread starvation under concurrent loads
confirmed_facts:
- "Database connection pool exhausted when worker batch size > 50 (src/ledger/pool.py:42)"
dead_ends_do_not_repeat:
- attempt: Wrapped handle_webhook in global asyncio.Lock
reason_failed: Caused cascading deadlocks across Celery workers under load
modified_files_state:
- file: src/ledger/pool.py
test_status: PASS
๐ ๏ธ Model Training & Artifacts Included in this Repo
ordo-3b.gguf(6.17 GB): Full FP16 merged model ready for Ollama, LM Studio, andllama.cpp.adapter_model.safetensors+adapter_config.json: FP16 LoRA adapter weights (Rank 32, Alpha 64, Target Modules:q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj).Modelfile: Ready-to-use Ollama definition file.benchmark_results_v2.json: Full evaluation metrics across stratified and holdout suites.
๐ Citation & License
Released under the MIT License.
@misc{farias2026ordo3b,
title={Ordo 3B: Real-Time Neural Context Filter and Active Episodic Memory for Coding Agents},
author={Lucas C. Farias},
year={2026},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/devlucascfarias/ordo-3b}}
}
- Downloads last month
- 149
We're not able to determine the quantization variants.
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf devlucascfarias/ordo-3b# Run inference directly in the terminal: llama cli -hf devlucascfarias/ordo-3b