Text Generation
PEFT
Safetensors
GGUF
PyTorch
English
afm-d
afm-dd
decision
system-1
minicpm
minicpm5
lora
semif
conversational
Instructions to use ariacompute/afm-dd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ariacompute/afm-dd with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM5-2B") model = PeftModel.from_pretrained(base_model, "ariacompute/afm-dd") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ariacompute/afm-dd 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 ariacompute/afm-dd:Q8_0 # Run inference directly in the terminal: llama cli -hf ariacompute/afm-dd:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ariacompute/afm-dd:Q8_0 # Run inference directly in the terminal: llama cli -hf ariacompute/afm-dd:Q8_0
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 ariacompute/afm-dd:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf ariacompute/afm-dd:Q8_0
Use Docker
docker model run hf.co/ariacompute/afm-dd:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use ariacompute/afm-dd with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ariacompute/afm-dd" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ariacompute/afm-dd", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ariacompute/afm-dd:Q8_0
- Ollama
How to use ariacompute/afm-dd with Ollama:
ollama run hf.co/ariacompute/afm-dd:Q8_0
- Unsloth Desktop
- Pi
How to use ariacompute/afm-dd with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ariacompute/afm-dd:Q8_0
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": "ariacompute/afm-dd:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ariacompute/afm-dd with Docker Model Runner:
docker model run hf.co/ariacompute/afm-dd:Q8_0
- Lemonade
How to use ariacompute/afm-dd with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ariacompute/afm-dd:Q8_0
Run and chat with the model
lemonade run user.afm-dd-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use ariacompute/afm-dd with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ariacompute/afm-dd:Q8_0
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 ariacompute/afm-dd:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ariacompute/afm-dd with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ariacompute/afm-dd:Q8_0
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 "ariacompute/afm-dd:Q8_0" \ --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"
|
Download README.md from ariacompute/afm-dd: direct link, hf CLI and curl.
- Browser
- Download file 8.89 kB
-
https://huggingface.co/ariacompute/afm-dd/resolve/main/README.md
- Command line
-
hf download hf://ariacompute/afm-dd/README.md
-
curl -L -o README.md https://huggingface.co/ariacompute/afm-dd/resolve/main/README.md
8.89 kB
| language: | |
| - en | |
| license: mit | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| base_model: openbmb/MiniCPM5-2B | |
| base_model_relation: adapter | |
| tags: | |
| - afm-d | |
| - afm-dd | |
| - decision | |
| - system-1 | |
| - minicpm | |
| - minicpm5 | |
| - peft | |
| - lora | |
| - semif | |
| - pytorch | |
| datasets: | |
| - LocalLLaMA/typed-decisions | |
| - mteb/banking77 | |
| - jaredpalmer/kev-suites | |
| - tals/vitaminc | |
| # AFM-D Decoder (`afm_dd`) | |
| **Causal System 1 decisions over a typed answer space (option-letter logits).** | |
| Site: [ariacompute.com](https://ariacompute.com) Β· Org: [ariacompute](https://huggingface.co/ariacompute) Β· Hub: [ariacompute/afm-dd](https://huggingface.co/ariacompute/afm-dd) | |
| AFM-D Decoder is the causal track of **AFM-D**: [SemIf](https://github.com/TheoLeeCJ/SemIf-OpenJev) **direct** option-letter scoring on [`openbmb/MiniCPM5-2B`](https://huggingface.co/openbmb/MiniCPM5-2B) with an optional PEFT LoRA (product recipe `afm-d-decoder-v2.1`). It scores a text/JSON **state** against user-supplied options and returns a distribution β not open-ended chat, not TypeSafe Jev. | |
| | Primitive | Answer space | Result | | |
| | --- | --- | --- | | |
| | **Choice** | 2β16 options (AβP) | `choice`, `probabilities`, `confidence` | | |
| | **Score** | 2β10 ordered levels | expected `score`, distribution, `confidence` | | |
| | **Noul** | `false` / `true` | `noul` = P(true) | | |
| Companion Encoder (Laya ModernBERT DecisionModel): [`ariacompute/afm-de`](https://huggingface.co/ariacompute/afm-de). | |
| ## Model details | |
| | | | | |
| | --- | --- | | |
| | Subject id | `afm_dd` | | |
| | Base | [`openbmb/MiniCPM5-2B`](https://huggingface.co/openbmb/MiniCPM5-2B) @ `12a3808a956f869c767195e9266b59c4d21d92e2` | | |
| | Method | SemIf `direct` β read option-letter logits at the first generation position | | |
| | Adapter | PEFT LoRA (attention), recipe **`afm-d-decoder-v2.1`**: r=16, 3 epochs, LR `5e-5`, micro-batch 1 | | |
| | Options | **2β16** letters AβP (wider Choice rows skipped at convert/train) | | |
| | Training | Hard-label CE on AFM-D product corpus; **shuffles option order** each step (`shuffle_semif_options`) to avoid letter collapse | | |
| | Export | PEFT adapter (this repo) + optional merged **Q8_0 GGUF** at `gguf/afm-dd-2b-Q8_0.gguf` for Ollaya / llama.cpp | | |
| ### Checkpoint layout | |
| ```text | |
| adapter_config.json | |
| adapter_model.safetensors # or adapter_model.bin | |
| dd_config.json | |
| tokenizer/ | |
| gguf/afm-dd-2b-Q8_0.gguf # optional; merged MiniCPM5 + LoRA for Ollaya | |
| ``` | |
| Load the adapter on the pinned MiniCPM5-2B revision with `peft` + SemIf / AFM-D Decoder code β not as a standalone chat GGUF unless you use the merged file under `gguf/`. | |
| ## Intended use | |
| - Local **typed decision** scoring (Choice / Score / Noul) over a supplied state via System One HTTP or in-process subjects. | |
| - Offline eval and [JevBench](https://github.com/fstandhartinger/jevbench) comparison via the AFM-D harness. | |
| - Ollaya / llama.cpp inference from the merged Q8_0 GGUF when published in this repo. | |
| ## How to use | |
| Load through **Aria Engine** (native AFM runtime) or **[Ollaya](https://ollaya.dev)** (Ollama-style local decision daemon). | |
| ### Aria Engine | |
| Native AFM runtime: CLI, `POST /v1/systemone`, FFI, and language SDKs. Docs: [engine README](https://github.com/ariacompute/engine). Decoder System One default port **8011**. | |
| ```bash | |
| aria-engine setup | |
| aria-engine download afm-dd # β ~/.ariacompute/models/afm-dd | |
| aria-engine decide --track decoder --model-name afm-dd --file record.json | |
| aria-engine serve --track decoder --model-name afm-dd --bind 127.0.0.1:8011 | |
| ``` | |
| **System One** body (`POST /v1/systemone` or `decide`): | |
| ```bash | |
| curl -s http://127.0.0.1:8011/v1/systemone \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "state": "user wants a refund", | |
| "questions": { | |
| "q1": { | |
| "type": "choice", | |
| "instructions": "Pick the best action", | |
| "criteria": { | |
| "refund": "issue a full refund", | |
| "deny": "deny the request" | |
| } | |
| } | |
| } | |
| }' | |
| ``` | |
| | `type` | `criteria` | | |
| | --- | --- | | |
| | `choice` | object: option name β description | | |
| | `score` | array of 2β10 ordered level strings | | |
| | `noul` | object with `true` / `false` (optional) | | |
| **Python SDK** (`pip install aria-engine`; needs `libaria-engine_ffi` or `ARIA_FFI_LIB`): | |
| ```python | |
| from aria_engine import AriaEngine | |
| eng = AriaEngine("/path/to/afm-dd", "decoder") # or ~/.ariacompute/models/afm-dd | |
| out = eng.systemone({ | |
| "state": "user wants a refund", | |
| "questions": { | |
| "q1": { | |
| "type": "choice", | |
| "instructions": "Pick the best action", | |
| "criteria": { | |
| "refund": "issue a full refund", | |
| "deny": "deny the request", | |
| }, | |
| } | |
| }, | |
| }) | |
| print(out["answers"]["q1"]) | |
| eng.destroy() | |
| ``` | |
| Also: TypeScript `@ariacompute/engine-ts`, Rust `ariacompute-engine`, Go / Flutter / Swift / Kotlin β see engine `bindings/`. | |
| ### Ollaya | |
| [Ollaya](https://ollaya.dev) pulls AFM-D by name and serves TypeSafe-compatible `/v1/systemone`. Use the **AFM-D-enabled** builds from [ariacompute/ollaya releases](https://github.com/ariacompute/ollaya/releases) (not the default `ollaya-dev/ollaya` channel). Weights stay on Hugging Face / ModelScope (Ollaya does not re-host). | |
| ```bash | |
| # install from https://github.com/ariacompute/ollaya/releases (latest AFM-D build) | |
| curl -fsSL https://raw.githubusercontent.com/ariacompute/ollaya/main/scripts/install.sh \ | |
| | OLLAYA_REPO=ariacompute/ollaya sh | |
| # pin a release: OLLAYA_REPO=ariacompute/ollaya OLLAYA_VERSION=0.7.5+afm-d.1.0.0 | |
| # Windows (PowerShell): | |
| # $env:OLLAYA_REPO='ariacompute/ollaya'; irm https://raw.githubusercontent.com/ariacompute/ollaya/main/scripts/install.ps1 | iex | |
| # weights: HF (ariacompute/afm-dd) or ModelScope (AriaCompute/afm-dd) | |
| # OLLAYA_HUB=huggingface|modelscope|auto (auto β ModelScope when LANG looks Chinese) | |
| ollaya pull afm-dd | |
| ollaya run afm-dd --preset triage \ | |
| "Third time this year you've double-charged me. Refund it today or I'm cancelling." | |
| ``` | |
| Or download a platform asset from the [releases page](https://github.com/ariacompute/ollaya/releases) (e.g. `ollaya-linux-amd64.tar.zst`, `ollaya-darwin-arm64.tgz`, `ollaya-windows-amd64.zip`), unpack, put `ollaya` on `PATH`, then `pull` / `run` as above. | |
| HTTP (daemon default `http://localhost:11435`): | |
| ```bash | |
| curl http://localhost:11435/v1/systemone \ | |
| -H "Content-Type: application/json" \ | |
| -d '{ | |
| "model": "afm-dd", | |
| "state": "user wants a refund", | |
| "questions": { | |
| "q1": { | |
| "type": "choice", | |
| "instructions": "Pick the best action", | |
| "criteria": { | |
| "refund": "issue a full refund", | |
| "deny": "deny the request" | |
| } | |
| } | |
| } | |
| }' | |
| ``` | |
| Family notes: Ollaya repo `docs/families/afm-dd.md`. | |
| ## Eval | |
| Product LoRA (`afm-d-decoder-v2.1`) on `data/eval.jsonl`, n=5513 (`--skip-errors`); vs base MiniCPM5-2B. `letter_collapse.collapsed=false` (top letter B β35.8%). | |
| | | AFM-D Decoder | Base MiniCPM | | |
| | --- | ---: | ---: | | |
| | Agreement | **77.5%** | 59.5% | | |
| | ECE | **0.029** | 0.261 | | |
| | Brier | **0.299** | 0.613 | | |
| | Task | n | Agree | ECE | | |
| | --- | ---: | ---: | ---: | | |
| | choice | 2459 | 79.2% | 0.039 | | |
| | noul | 1706 | 85.9% | 0.014 | | |
| | score | 1348 | 64.0% | 0.048 | | |
| Score is the weakest task bucket. Agree / ECE / Brier are local release diagnostics; product gate = JevBench public-proxy below. | |
| ## JevBench | |
| Public-proxy board (n=231, gate Score **β₯ 50.0**). Not an official sealed JevBench claim. | |
| | # | System | Score | Intel. | Calib. | Speed | Acc. | Hard | | |
| | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | | |
| | 1 | SemIf | 84.0 | 74.9 | 87.1 | 90.7 | 81.0% | 61.3% | | |
| | 2 | Bespoke Nimble-9B | 79.2 | 72.5 | 76.2 | 89.8 | 79.7% | 61.3% | | |
| | 3 | NeoHorse-Jev-4B | 78.3 | 63.1 | 84.6 | 89.7 | 72.3% | 45.0% | | |
| | 4 | Kev-4B | 76.9 | 67.2 | 76.7 | 88.3 | 75.8% | 54.1% | | |
| | 5 | **AFM-D Decoder** | **76.3** | **57.1** | **84.9** | **91.7** | **68.4%** | **40.5%** | | |
| | 6 | AgentJev-0.6B | 42.0 | 40.0 | 79.8 | 89.1 | 58.0% | 36.0% | | |
| | 7 | Laya | 30.9 | 36.4 | 57.7 | 93.9 | 53.2% | 27.9% | | |
| AFM-D Decoder tiers: easy **100%**, standard **90.3%**, hard **40.5%** β **beats** the public-proxy gate. Near Kev on composite Score; main gap vs SemIf / Nimble is Intelligence / hard. | |
| ## License | |
| MIT | |
| ## Citation / links | |
| - Org: [huggingface.co/ariacompute](https://huggingface.co/ariacompute) | |
| - Companion Encoder: [ariacompute/afm-de](https://huggingface.co/ariacompute/afm-de) | |
| - Aria Engine: [github.com/ariacompute/engine](https://github.com/ariacompute/engine) | |
| - Ollaya (AFM-D builds): [github.com/ariacompute/ollaya/releases](https://github.com/ariacompute/ollaya/releases) | |
| - Base MiniCPM5-2B: [openbmb/MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B) | |
| - SemIf: [github.com/TheoLeeCJ/SemIf-OpenJev](https://github.com/TheoLeeCJ/SemIf-OpenJev) | |
| - JevBench: [github.com/fstandhartinger/jevbench](https://github.com/fstandhartinger/jevbench) | |