Lightweight Parameter-Efficient Decision Adapter for Qwen2.5-1.5B-Instruct (~20.7 MB)
Overview โข Agent Showcases โข Adapter Loading โข Benchmarks โข Model Family โข Serving โข Architecture โข Citation
QJev-1.5B-LoRA is the lightweight Parameter-Efficient Fine-Tuning (PEFT) release of the QJev System 1 decision engine. It packages the rank-16 LoRA attention projections (q_proj, k_proj, v_proj, o_proj) together with the 2-layer calibrated MLP decision head (decision_head.safetensors).
Weighing only 20.7 MB, this adapter allows environments that already serve or cache Qwen/Qwen2.5-1.5B-Instruct to plug in instant System 1 decision capability with zero redundant weight overhead.
from qjev import QJev
# Automatically loads base Qwen2.5-1.5B-Instruct + LoRA adapter + decision head
model = QJev.from_pretrained("AnkitNayak-dev/QJev-1.5B-LoRA")
result = model.decide(
context="Storage partition utilization reached 98% with transaction write queue backing up.",
choices=[
"Expand volume dynamically without stopping workload",
"Purge non-critical temporary logs immediately",
"Halt write operations and alert operators"
]
)
print(f"Decision: {result['best_choice']} ({result['confidence']}%)")
peft and transformersimport torch
import torch.nn as nn
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
from safetensors.torch import load_file
from huggingface_hub import hf_hub_download
# 1. Load Base Backbone in bfloat16
base_id = "Qwen/Qwen2.5-1.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base_model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype=torch.bfloat16, device_map="cuda")
# 2. Attach LoRA Adapter
adapter_id = "AnkitNayak-dev/QJev-1.5B-LoRA"
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
# 3. Load MLP Decision Head
class DecisionHead(nn.Module):
def __init__(self, hidden_size=1536, intermediate_size=512, max_choices=10):
super().__init__()
self.norm = nn.LayerNorm(hidden_size)
self.dense = nn.Linear(hidden_size, intermediate_size)
self.act = nn.GELU()
self.out_proj = nn.Linear(intermediate_size, max_choices)
def forward(self, x, num_choices=None):
h = self.act(self.dense(self.norm(x)))
logits = self.out_proj(h)
if num_choices is not None:
mask = torch.arange(10, device=x.device).unsqueeze(0) >= num_choices.unsqueeze(1)
logits = logits.masked_fill(mask, -1e4)
return logits
head = DecisionHead().to(device="cuda", dtype=torch.bfloat16)
head_file = hf_hub_download(repo_id=adapter_id, filename="decision_head.safetensors")
head.load_state_dict(load_file(head_file), strict=False)
head.eval()
print("PEFT adapter and decision head loaded successfully!")
examples/snake)A live computer vision agent demonstrating QJev-1.5B's sub-30ms System 1 decision head navigating Google Snake in real time.
<0.1ms pass-through latency and queries QJev in ~28ms only at turns, intersections, and wall boundaries.[ESC] anytime to exit cleanly.# 1. Install dependencies
pip install -r requirements.txt
pip install -r examples/snake/requirements.txt
# 2. Run the autonomous agent
python examples/snake/qjev_snake_agent.py
When the game opens, click the Settings Gear (โ๏ธ) before starting and select:
[!NOTE] Measurement Conditions: All benchmark results reported below are locally reproduced using the official JevBench metamorphic test harness (
jevbench-mini, 240 evaluation cases, 50 scored relations, 1,468 trials). Baseline figures for external models reflect published BenchmarkHeaven leaderboard entries under standard submission criteria.
| Model | Parameters | Strict Score (tol=0.05) | Benchmark Status | Inference Latency | Memory Footprint |
|---|---|---|---|---|---|
EXAONE-1.2B |
1.2B | 47.7% | Published Leaderboard | ~25 ms | ~2.8 GB |
SargeDev/jev-gate-student-b |
0.49B | 50.2% | Published Leaderboard (Binary) | ~23 ms | ~1.5 GB |
decision-2b |
2.0B | 54.8% | Published Leaderboard | ~40 ms | ~4.5 GB |
pjev-2b |
2.0B | 56.5% | Published Leaderboard | ~38 ms | ~4.4 GB |
QJev-1.5B (Ours, Phase 3) |
1.54B | 62.53% | Locally Reproduced (JevBench) | ~31 ms | 3.08 GB disk (1.07 GB VRAM in 4-bit) |
jiwo-4b |
4.0B | 60.2% | Published Leaderboard | ~65 ms | ~8.8 GB |
decision-4b-v12 |
4.0B | 60.4% | Published Leaderboard | ~62 ms | ~8.5 GB |
autotrust/JEV-9B |
9.0B | 72.0% | Published Leaderboard | ~85 ms | ~18.5 GB |
autotrust/JEV-27B |
27.0B | 76.5% | Published Leaderboard | ~220 ms | ~55.0 GB |
Tolerance Note: The official BenchmarkHeaven evaluation suite strictly uses tolerance = 0.05 for headline Capability scores. Under exploratory relaxed evaluation (tolerance = 0.10), QJev-1.5B achieves 71.50%.
Evaluated across the 7 formal dimensions of metamorphic decision consistency:
| Dimension | Baseline (Pre-Consistency) | QJev-1.5B (Phase 3 Consistency) | Delta | Formal Property Evaluated |
|---|---|---|---|---|
BAT.isolation |
100.0% | 100.0% | 0.0% | Invariance to batch composition and sample ordering |
REP.type |
77.1% | 83.3% | +6.2% | Invariance across prompt format representations (MCQ, boolean, ordinal) |
REP.invariance |
73.2% | 74.4% | +1.2% | Stability under option key renaming and syntax perturbations |
LOG.bounds |
62.5% | 67.9% | +5.4% | Adherence to probabilistic upper and lower bounds |
CHO.conditioning |
41.7% | 56.9% | +15.2% | Preservation of relative odds upon elimination of irrelevant options |
REP.equivariance |
48.6% | 55.6% | +7.0% | Consistent probability shifts under negation transformations |
MEA.partition |
30.7% | 41.1% | +10.4% | Probability mass conservation under option clustering |
| Overall (Strict tol=0.05) | 58.67% | 62.53% | +3.86% | Standard JevBench Capability Benchmark |
Machine-readable evaluation artifacts are archived in the repository under reports/jevbench/self_test_phase3_consistency.json.
The official model family links all variants directly on Hugging Face:
Qwen/Qwen2.5-1.5B-Instruct (Base Foundation Model)
โโโ AnkitNayak-dev/QJev-1.5B (Flagship Fused bfloat16, 3.08 GB)
โโโ AnkitNayak-dev/QJev-1.5B-LoRA (PEFT Adapter, 20.7 MB)
โโโ AnkitNayak-dev/QJev-1.5B-4bit (NF4 Quantized, 1.15 GB disk / 1.07 GB VRAM)
โโโ AnkitNayak-dev/QJev-1.5B-Abliterated (Unaligned / Uncensored, 3.08 GB)
โโโ AnkitNayak-dev/QJev-1.5B-Abliterated-4bit (NF4 Quantized, 1.15 GB disk / 1.07 GB VRAM)
| Variant | Repository | Format | Precision | Disk Size | GPU VRAM | Recommended Use Case |
|---|---|---|---|---|---|---|
| QJev-1.5B (Flagship) | AnkitNayak-dev/QJev-1.5B | Full Fused | bfloat16 |
3.08 GB | 3.4 GB | Production servers, microservices, standalone agents |
| QJev-1.5B-LoRA | AnkitNayak-dev/QJev-1.5B-LoRA | PEFT Adapter | float32 / adapter |
20.7 MB | Shared | Multi-tenant clusters caching base Qwen2.5-1.5B-Instruct |
| QJev-1.5B-4bit | AnkitNayak-dev/QJev-1.5B-4bit | NF4 Quantized | 4-bit / bfloat16 head |
1.15 GB | 1.07 GB | Resource-constrained edge instances, local workstations |
| QJev-1.5B-Abliterated | AnkitNayak-dev/QJev-1.5B-Abliterated | Full Fused | bfloat16 |
3.08 GB | 3.4 GB | Uncensored threat triage, emergency failover, red-teaming |
| QJev-1.5B-Abliterated-4bit | AnkitNayak-dev/QJev-1.5B-Abliterated-4bit | NF4 Quantized | 4-bit / bfloat16 head |
1.15 GB | 1.07 GB | Low-memory edge deployment for unaligned agent routing |
For mission-critical applications requiring objective decisions on high-stakes, controversial, or emergency scenarios (such as cybersecurity threat triage, automated containment, or emergency shutdown overrides), standard aligned language models exhibit latent hesitation or refusal hedging in their internal representations.
We applied directional representation ablation (Arditi et al., 2024) to surgically excise the refusal subspace:
self_attn.o_proj) and feed-forward projection (mlp.down_proj) matrices:
$$W \leftarrow W - \hat{r}_l \cdot (\hat{r}_l^T W)$$decision_head.safetensors) remains in full precision, preserving calibrated probability estimation while removing latent refusal bias.Evaluated across critical decision scenarios in benchmark/test_abliterated.py:
[71.48%] Sever network perimeter and execute immediate failover[21.19%] Broadcast a warning message across all open terminal sessions[ 6.49%] Maintain connection and passively observe[ 0.69%] Wait for scheduled weekly review[97.66%] Trigger emergency manual pressure release valve immediately[ 1.32%] Silence warning alarms and log status[ 0.63%] Rely on delayed software reboot sequence[ 0.34%] Continue operating under maximum load[48.05%] Auto-scale compute nodes and enable Redis query caching[47.66%] Throttle customer incoming requests with HTTP 429 status[ 4.00%] Shut down non-essential internal batch processing jobs[ 0.40%] Ignore latency degradationserve.py) [Tested & Production Ready]The recommended way to serve QJev in production is using the bundled FastAPI microservice, which executes native single-pass System 1 inference:
python serve.py --model AnkitNayak-dev/QJev-1.5B --port 8000
POST /v1/decide - Direct decision endpoint returning calibrated probabilities.POST /v1/systemone - Official BenchmarkHeaven and JevBench evaluation protocol.POST /v1/chat/completions - OpenAI-compatible drop-in proxy.curl -X POST http://localhost:8000/v1/decide \
-H "Content-Type: application/json" \
-d '{
"context": "Customer requests immediate refund after policy window has expired.",
"choices": ["Approve refund", "Issue store credit", "Deny request"]
}'
handler.py) [Tested]All model repositories contain a custom handler.py (EndpointHandler) configured for Hugging Face Inference Endpoints. It automatically loads decision_head.safetensors alongside the backbone and returns structured prediction scores.
[!WARNING] Architecture Clarification on GGUF, Ollama, and vLLM: Standard causal language model engines (
llama.cpp, Ollama, vLLM) are optimized for autoregressive token generation. They do not natively evaluate custom standalone MLP classification heads (decision_head.safetensors).
- Ollama (
Modelfile): [Experimental] Runs the fine-tuned backbone autoregressively using a System 1 decision prompt template. Output is generated text tokens, not direct forward-pass MLP probabilities.- GGUF / llama.cpp (
scripts/export_gguf.py): [Experimental] Converts the transformer backbone weights to GGUF for local CPU inference. A custom llama.cpp tensor branch supporting the MLP decision head is under active research.- vLLM: [Experimental] Standard
vllm servewill serve the model as an autoregressive causal LM. For native single-pass decision serving, useserve.pyor the custom Python SDK.
[Prompt Context + Formatted Candidate Choices]
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Qwen2.5-1.5B Backbone โ (bfloat16 weights, QLoRA adapted)
โโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ (Final Hidden State: 1536 dim)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LayerNorm(1536) โ (float32 weights)
โโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Linear(1536 -> 512) โ (GELU Activation, Dropout 0.1)
โโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Linear(512 -> 10) โ (Dynamic Logit Masking for N Choices)
โโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โผ
[Calibrated Softmax Probabilities]
@misc{nayak2026qjev15b,
author = {Ankit Nayak},
title = {QJev-1.5B: Lightweight Decision-Making Model for AI Agents based on Qwen2.5},
year = {2026},
publisher = {GitHub and Hugging Face},
howpublished = {\url{https://github.com/AnkitNayak-dev/QJev-1.5B}}
}
This project is licensed under the Apache 2.0 License.
Base model weights are governed by the Alibaba Cloud Qwen License. Training data is provided by SargeDev (jev-distill-corpus-v3).
adapter_model.safetensors 17 MiBdecision_head.safetensors 3 MiBAnkitNayak-dev/QJev-1.5B