TAMEV-Large-Qwen3.5-4B — Large Decision Model & LLM Router
Scores your candidate options instead of generating text. Send a state and a list of options — a tool menu, a queue list, an intent catalogue, a rubric — and get back calibrated probabilities over those options in one forward pass. choice (one of K), noul (yes/no) and score (ordinal) go through the same call.
70.64% top-1 · ECE 0.1190 · 513.59 ms p50 on one CPU thread · order-sensitive (0.029 drift under option permutation).
🚧 Work in progress. These numbers are real measurements of the weights that ship today, but this tier is still being trained and calibrated. The recommended tiers are Nano, Micro and Small — small, fast, exactly permutation-invariant (zero drift) and exported to 10 runtimes.
⚡ At a glance
| Top-1 | 70.64% (95% CI 67.54%–73.87%), n=838 · top-3 97.49% |
| Calibration | ECE 0.1190 (95% CI 0.0964–0.1480) · Brier 0.4093 · NLL 0.7845 |
| Latency | 513.59 ms p50 · 2411.05 ms p95 · 1 calls/s — Apple Silicon Metal MPS (BF16 backbone, FP16 pointer head) |
| Order | 0.035 under option permutation |
| Size | 1,311,233 released parameters · Apache-2.0 |
| Runs on | CPU, Apple Silicon, MLX; backbone fetched on first use |
| Answers | choice (one of K) · noul (yes/no) · score (ordinal rubric) |
First run downloads the backbone and merges the training adapter. This repository ships only the trained pointer head;
Qwen/Qwen3.5-4B(4.66B parameters) is fetched from the Hub in BF16 and thejaredpalmer/kev-4bLoRA is merged into it, because the head was trained on the merged backbone. Loading the plain base model leaves the head out of distribution and drops top-1 sharply, so do not skip the merge.
🚀 Quick start
from transformers import AutoModel, AutoTokenizer
model_id = "Tamkimd/tamev-large-qwen3.5-4b"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True, fix_mistral_regex=True)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True)
# options are an argument of the call -- the class list is not baked into the weights
result = model.predict_decision( # `model.decide(...)` is an alias
state="My transaction on a Visa card was rejected while I was travelling in Tokyo.",
question="Which service queue should handle this incident?",
options=["verify_travel_unblock", "file_fraud_dispute", "replace_damaged_card", "branch_appointment"],
tokenizer=tokenizer,
)
print(result["best_option"], f"{result['confidence']:.0%}") # -> the queue to route to
print(result["probabilities"]) # calibrated, sums to 1
Requirements: torch>=2.4, transformers>=4.40, peft>=0.10, Python ≥ 3.10, plus the Qwen/Qwen3.5-4B backbone (4.66B parameters) downloaded on first use. peft is required because the jaredpalmer/kev-4b LoRA adapter is merged into the base backbone before the pointer head runs — the head was trained on the merged model.
Typed questions in one call — choice / noul / score
⚠️
TypeSafeDirectClienttargets the encoder tiers. It builds an encoder-styleTamevEngine, so it does not load TAMEV-Large-Qwen3.5-4B's trained pointer head — the snippet below runs the encoder path, not this tier. Use thetransformerssnippet above.
from tamev import Choice, Noul, Score, TypeSafeDirectClient
with TypeSafeDirectClient(model_name="TAMEV-Large-Qwen3.5-4B") as client:
res = client.system_one(
state="Customer reports a debit card block during an overseas ATM withdrawal.",
questions={
"action": Choice(
instructions="Select the incident resolution playbook",
criteria={
"travel_unblock": "Verify identity and lift the travel restriction",
"dispute_charge": "Open an unauthorized-transaction fraud case",
"branch_visit": "Direct the customer to the nearest branch",
},
),
"is_emergency": Noul(instructions="Is the customer stranded and in urgent need of cash?"),
"urgency_score": Score(instructions="Rate the incident urgency",
criteria=["Routine", "Elevated", "Critical"]),
},
)
print(res.answers["action"].choice, res.answers["action"].confidence)
print(res.answers["is_emergency"].noul, res.answers["urgency_score"].score)
# From a TAMEV source checkout
uv pip install -e ".[serve]"
Over HTTP
tamev serve builds an encoder-style engine, so it does not load this tier's pointer head — serving this repository with --checkpoint would silently run a backbone without the trained head. Use the transformers path for in-context inference, or serve an encoder tier such as Tamkimd/tamev-nano-tinybert.
🎯 Use cases
LLM routing · tool-call gating · agent routing · intent routing (77-option catalogues are scored in full) · safety and policy triage · multiple-choice scoring · ordinal scoring. The candidate list is an argument of the call, so the same checkpoint serves a tool menu, a queue list or a rubric without retraining.
🧭 Why not just a classifier — or an LLM router?
- A fixed-label classifier freezes one output per class: add an option, retrain. TAMEV-Large-Qwen3.5-4B scores whatever list you pass in.
- A generative router writes text your code then parses — prompt tokens, parse failures, and a number that is not a probability.
- TAMEV-Large-Qwen3.5-4B returns a calibrated distribution over your options in one forward pass.
🔁 Option order: this tier is not order-invariant
Measured, not assumed — reordering your candidate list changes the probabilities (drift 0.035 on the development suite, 0.029 on the acceptance gate; the development probe flipped top-1 on 8% of items). If you need order independence, use the encoder tiers (Nano/Micro/Small), where it is an architectural guarantee with measured drift 0. Wording is not free either: rephrasing an option changes its score, and nothing here makes the model right about your domain.
📊 Evaluation
The set. A retired 838-item acceptance probe, not the audited held-out set the encoder tiers use, and never leakage-checked against training. Read it as a comparison against those tiers' published rows, not as a controlled measurement.
Top-1 / top-3 are exact match; ECE (95% CI 0.0964–0.1480), Brier and NLL are temperature-scaled proper scores (lower is better); permutation drift (under option reordering) is the largest change in the score vector when the candidate list is reordered.
Independently replicated. A second, independent full-set run of the same weights returned identical top-1, top-3, ECE, Brier and NLL rows.
Calibration
- ECE 0.1190 (95% CI 0.0964–0.1480) · Brier 0.4093 · NLL 0.7845 over 838 items, temperature-scaled with
temperature = 2.406. - Project criterion is ECE ≤ 0.05; this tier does not meet it — the value above is as measured.
⚡ Performance
| Measurement | Value | Configuration |
|---|---|---|
| Latency p50 / p95 | 513.59 ms / 2411.05 ms | predict_decision, Apple Silicon Metal MPS (BF16 backbone, FP16 pointer head) |
| Throughput | 1.4 req/s | one call per item |
📦 Export formats
| Runtime | File | Size |
|---|---|---|
| PyTorch FP32 | model.safetensors | 5.0 MiB |
| Apple Metal MPS FP16 | model_mps_fp16.pt | 2.5 MiB |
| Apple MLX | weights.npz | 5.0 MiB |
⚠️ This repository does not contain the backbone. It contains the 1,311,233-parameter pointer head (5.00 MiB).
Qwen/Qwen3.5-4B(4.66B parameters) is downloaded on first use and thejaredpalmer/kev-4bLoRA adapter is merged into it withpeft— the head was trained against the merged backbone, so skipping the merge would score it out of distribution.
hf download Tamkimd/tamev-large-qwen3.5-4b --local-dir ./tamev-large-qwen3.5-4b
🏗 Architecture & training
- Encoder only, no decoder: 2560-d backbone (
Qwen/Qwen3.5-4B),causal_readoutpooling, a 256-d projection, and one pointer head shared across option slots (option_fusion: bilinear). 128 tokens of state, 48 per option. - Trained supervised on (state, typed questions, candidate options, label) rows — not on generated text.
choice,noulandscorequestions share the weights. - Teacher / distillation: not re-verified for this release.
- Calibrated after training (temperature scaling); the training config and the evaluation harness ship with the TAMEV source distribution.
🎯 Intended use
Built for: the use cases above, through predict_decision / decide or the local HTTP service. It is a decision component inside your system, not an autonomous agent, and it does not know your policy — it scores the options you hand it.
Not for: open-ended generation, factual question answering, or use as an unaudited safety control.
⚠️ Limitations
- The published row is not a leakage-controlled measurement. This tier's row comes from the retired 838-item acceptance probe, which is saturated in part and was not audited for train/eval overlap the way the held-out set is. Validate on your own distribution before shipping.
- Calibration. Set-specific. ECE 0.1190 and Brier 0.4093 on the held-out set (n=838), 95% CI 0.0964–0.1480 — read the interval, not the point estimate. Target is ≤ 0.05; this tier is above it.
- Latency is one host, one catalogue shape. 513.59 ms p50 was measured on Apple Silicon Metal MPS (BF16 backbone, FP16 pointer head) with a warm option cache; your numbers will differ.
- The backbone is not included. First use downloads
Qwen/Qwen3.5-4B(4.66B parameters).
🥊 TAMEV model zoo
| Tier | Model | Top-1 | ECE | p50 |
|---|---|---|---|---|
| Nano | tamev-nano-tinybert | 73.2% | 0.013 | 10.7 ms |
| Micro | tamev-micro-minilm | 78.7% | 0.025 | 5.3 ms |
| Small | tamev-small-modernbert | 84.0% | 0.037 | 32.7 ms |
Medium and Large: in progress — larger than the encoder tiers and graded on a different instrument, so no number is published for them yet.
Encoder tiers ship as one fused model. Tiers were evaluated with different option budgets — compare within a column.
🧱 Model details
| Dimension | Specification |
|---|---|
| Tier | Large |
| Model type | incontext_causal |
| Base model | Qwen/Qwen3.5-4B |
| Base-model note | Large-tier base-model deviation (upstream mismatch, unresolved here). The shipped pointer head was trained against the merged Qwen/Qwen3.5-4B backbone — that is the id recorded in this repository's config.json, and reproducing the published head requires it. The upstream adapter jaredpalmer/kev-4b separately declares base_model_name_or_path: Qwen/Qwen3.5-4B-Base in its own adapter_config.json, so a user who loads the adapter against the -Base id performs a different merge. This card does not assert which pairing is correct. |
| Released artifact | Pointer head adapter (backbone lazy-loaded) — 1,311,233 parameters |
| Backbone parameters (upstream, lazily loaded) | 4.66B |
| Required adapter | jaredpalmer/kev-4b LoRA, merged at load time (peft) |
| Hidden / projection dim | 2560 / 256 |
| Pooling | causal_readout |
| Max state / option length | 128 / 48 tokens |
| Calibrated temperature | 2.406 |
| Suggested deployment | Apple Silicon workstation, multi-GPU server |
- Repository:
Tamkimd/tamev-large-qwen3.5-4b· License: Apache-2.0 (LICENSE) - Call:
model.predict_decision(state, question, options, tokenizer=...)—model.decide(...)is an alias.tamev servedoes not load this tier's pointer head; use thetransformerspath.
📄 License & citation
Apache License 2.0 — LICENSE.
@misc{tamev2026,
title={TAMEV: System One Decision Models for Edge AI, LLM Routing and Tool-Call Gating},
author={TAMEV Contributors},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/Tamkimd/tamev-large-qwen3.5-4b}
}
🔗 References
- Base model:
Qwen/Qwen3.5-4B - Training suite: ten public classification sources (listed under
datasets:above), re-formed into typed-decision records with train/validation/calibration/test splits held out by question cell.