Instructions to use certen/DrC-ILP-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use certen/DrC-ILP-4B with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("certen/DrC-ILP-4B") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use certen/DrC-ILP-4B with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "certen/DrC-ILP-4B" --prompt "Once upon a time"
- Atomic Chat
DrC-ILP-4B
DrC-ILP-4B is a lightweight, unfused Apple Silicon MLX adapter built on mlx-community/Qwen3-4B-4bit for neuro-symbolic rule-governed reasoning, Inductive Logic Programming (discovering verifiable rules from examples), calibrated 3-valued evidence assessment, hard constraint compliance, and safe abstention when required information is missing.
Distributed as a non-destructive adapter, DrC-ILP-4B activates dynamically during structured rule-verification and symbolic policy discovery workflows while leaving the underlying Qwen3-4B-4bit base model completely unchanged (0.0% regression) for general conversation and multi-step tool use.
Companion Model: For sub-10ms compiled decision-making across structured states, text, and raw pixels on fixed-action domains, see
certen/DrC-Decision-4B.
How It Compares to Stock Qwen3-4B-4bit
Unassisted stock Qwen3-4B-4bit (enable_thinking=False, greedy decoding) struggles on strict closed-action policies with changing constraints, missing evidence, and hard exclusionsβfrequently guessing when decisive facts are absent or violating explicit ForbiddenActions (4.2% violation rate on closed-action perturbations). Conversely, conventional full-weight SFT fine-tunes overwrite Qwen3-4B's general tool-calling priors.
DrC-ILP-4B pairs calibrated 3-valued fact grounding with the DrC symbolic verification & rule-induction runtimeβlifting constrained closed-action accuracy from 56.2% $\to$ 91.7% and coding-agent tool-gate accuracy from 46.1% $\to$ 96.1% at 0.0% forbidden-action violations, while preserving 100% bit-identical Stock Qwen3-4B-4bit behavior (0.00e+00 logit drift) on general chat and <tools>.
Benchmark Comparison vs. Stock Qwen3-4B-4bit
| Benchmark Suite | Metric | Stock Qwen3-4B-4bit (Direct Chat) |
Stock Qwen3-4B-4bit (+ DrC Symbolic Runtime) |
DrC-ILP-4B (+ DrC Symbolic Runtime) |
Delta vs. Direct Stock |
|---|---|---|---|---|---|
Closed-Action Perturbations (N=48: nominal, paraphrase, missing-fact flip, constraint flip) |
Decision Accuracy Forbidden Violations |
56.2%4.2% |
87.5%0.0% |
91.7%0.0% |
+35.5 pp-4.2 pp |
Coding-Agent Tool-Call Gate (N=76, 5-action + abstain, prompt-injection traps) |
Decision Accuracy (Checklist) Decision Accuracy (Prefill) Forbidden Violations |
46.1%β 0.0% |
97.4%44.7%0.0% |
96.1%55.3%0.0% |
+50.0 pp+10.6 pp (vs. Stock prefill)0.0 pp |
Unseen Multi-Hop & Cardinality Rules (N=96, depth-2 chains & count thresholds) |
Decision Accuracy Forbidden / Oracle Violations |
β | 52.1%0.0% / 0.0% |
58.3%0.0% / 0.0% |
+6.2 pp (vs. Stock runtime) |
Held-Out 3-Valued Evidence Calibration (N=144 unseen-domain queries) |
3-Valued Accuracy Brier Skill Score (β) Brier Score (β) |
β | 51.4%0.4390.105 |
60.4%0.6350.069 |
+9.0 pp+0.196-35% error |
Raw-Prose Policy Induction (ILP) (N=96 unseen test cases, zero human-written rules) |
End-to-End Accuracy Forbidden Violations Median Test Prompt Tokens |
95.8% (24-shot in-context)2.1% (violates mask)1,180 tok |
83.3% (100% on 2/4 domains)0.0%194 tok (6.1Γ smaller) |
67.7%β83.3%0.0%194 tok (6.1Γ smaller) |
0.0% violations & 6.1Γ smaller prompt |
Multi-Step Tool Use (AgentDojo workspace) (N=12 multi-turn tasks) |
Clean Utility Logit Drift (Chat/Tools) |
41.7% (5/12)Baseline |
41.7% (5/12)0.00e+00 |
41.7% (5/12)0.00e+00 |
0.0 pp forgetting |
Key Capabilities
- Calibrated Evidence Assessment: Distinguishes supported, refuted, and missing facts in natural-language text (
+0.196Brier Skill Score over StockQwen3-4B-4bit) without guessing over unstated conditions. - Symbolic Rule Verification & Induction: Verifies arbitrary unseen rules at
0.0%forbidden-action violations and induces human-readable symbolic policies from raw historical examples when paired with the DrC runtime. - Zero-Forgetting Non-Destructive Format: Loads alongside
mlx-community/Qwen3-4B-4biton Apple Silicon without modifying base checkpoint weights.
Quickstart
Download Adapter
hf download certen/DrC-ILP-4B --local-dir ./DrC-ILP-4B
Run with mlx-lm CLI
python -m mlx_lm generate \
--model mlx-community/Qwen3-4B-4bit \
--adapter-path ./DrC-ILP-4B \
--max-tokens 256 \
--prompt "Select the single permitted action or abstain if required information is missing. Context: Production database migration ticket #482 has passing staging checks and DBA sign-off, and no active incident is open. Options: run_migration, rollback_release, request_missing_info. Constraints: Never run_migration during an active incident."
Run in Python (mlx_lm)
from mlx_lm import generate, load
model, tokenizer = load(
"mlx-community/Qwen3-4B-4bit",
adapter_path="./DrC-ILP-4B",
)
messages = [
{
"role": "system",
"content": "Evaluate the context against the stated options and constraints. Choose one valid option or abstain when required evidence is absent.",
},
{
"role": "user",
"content": (
"Context: Cold-chain shipment #910 arrived with intact tamper seals and a "
"verified logger readout of 4.1 C (threshold <= 8.0 C).\n"
"Options: release_lot, quarantine_lot, abstain_missing_data\n"
"Constraints: Do not release_lot if tamper seals are broken or temperature exceeds 8.0 C."
),
},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
response = generate(model, tokenizer, prompt=prompt, max_tokens=256)
print(response)
Sample Prompts
1. Constrained Option Selection
Context: Change request CR-204 targets eu-west-1, automated canary checks passed, and on-call approval is recorded. Freeze window is inactive.
Options:
- promote_canary
- abort_rollout
- abstain
Constraints:
- Do not promote_canary when a freeze window is active or on-call approval is missing.
2. Safe Abstention Under Missing Information
Context: Wire transfer review WT-771 shows verified beneficiary details, but sanctions screening status has not yet been returned by compliance.
Options:
- approve_transfer
- reject_transfer
- abstain
Constraints:
- Only approve_transfer when both beneficiary verification and sanctions clearance are confirmed.
Quantized