File size: 4,477 Bytes
74b70da 9aae9e0 74b70da 9aae9e0 74b70da 9aae9e0 74b70da 9aae9e0 74b70da 9aae9e0 74b70da aac34a0 9aae9e0 74b70da 9aae9e0 74b70da 9aae9e0 74b70da 9aae9e0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | ---
license: cc-by-nc-4.0
base_model: Qwen/Qwen3-0.6B
library_name: bev-decider
base_model_relation: finetune
datasets:
- avbiswas/bev-decision-150K
pipeline_tag: text-classification
tags:
- system-one
- decision-model
- jev-compatible
language:
- en
---
# jev-decider-0.4B
A **0.4B-parameter System One decision model** in the bev-decider / Jev format. It reads a state (text or JSON) and typed questions about it and returns probabilities in a single forward pass, with no text generation:
- **`choice`**: pick one of several named options.
- **`noul`**: yes/no, returned as P(yes).
- **`score`**: an ordinal level, returned as the expected value over the levels.
## Architecture
This is a single self-contained model. `model.safetensors` holds the whole network in one file.
| | |
|---|---|
| Backbone | The first **20 of 28 layers** of [`Qwen/Qwen3-0.6B`](https://huggingface.co/Qwen/Qwen3-0.6B), with the fine-tuned LoRA (r=8, alpha=16 on `q/k/v/o_proj` of layers 8-19) **merged** into the weights |
| Decision head | 2-layer attention head, 512-dim, with a task-type embedding |
| Parameters | About 0.4B (0.31B in the transformer layers, 0.16B token embeddings, 7.4M head) |
| Weights | `model.safetensors` (bf16 backbone + fp32 head), plus `backbone_config.json`, `config.json` and Qwen's tokenizer files |
| Context | Trained with states up to **512** tokens; options are limited to 64 tokens each |
The head is a custom module, so the model is loaded with the [`bev-decider`](https://github.com/avbiswas/bev-decider) package.
## Usage
`bev-decider` is the library; `jev-decider-0.4B` is this model. Install the library, then pass this model's repo id to `load`.
~~~bash
pip install bev-decider
~~~
~~~python
from bev_decider import load
decider = load("NeelContractor/jev-decider-0.4B")
state = {
"message": (
"URGENT: you charged my card twice this month. "
"Refund the duplicate within 24 hours or I'm disputing it with my bank."
)
}
questions = {
"intent": {
"type": "choice",
"instructions": "What does the customer want?",
"criteria": {
"refund": "money returned or a duplicate charge reversed",
"technical_help": "a bug, outage or integration problem",
"cancellation": "wants to cancel or downgrade",
},
},
"urgent": {
"type": "noul",
"instructions": "Does the message communicate time pressure or a deadline?",
},
"anger": {
"type": "score",
"instructions": "How angry is the customer?",
"criteria": ["calm", "mildly annoyed", "frustrated", "furious"],
},
}
answers = decider.decide(state, questions)
~~~
Output:
~~~json
{
"intent": {
"type": "choice",
"choice": "refund",
"probabilities": {
"refund": 0.996006190776825,
"technical_help": 0.0018722523236647248,
"cancellation": 0.0021215397864580154
}
},
"urgent": {
"type": "noul",
"noul": 0.8624385595321655
},
"anger": {
"type": "score",
"score": 1.2702370285987854,
"probabilities": {
"0": 0.3623242974281311,
"1": 0.0982351303100586,
"2": 0.4463198184967041,
"3": 0.0931207537651062
}
}
}
~~~
## Evaluation
Held-out test split of [`avbiswas/bev-decision-150K`](https://huggingface.co/datasets/avbiswas/bev-decision-150K), 2,000 questions, single forward pass:
| Metric | Value |
|---|---:|
| Accuracy (all) | **0.7300** |
| Yes/no (`noul`) | 0.8178 |
| Choice | 0.7192 |
| Score | 0.5964 |
| AUC (`noul`) | 0.8859 |
These numbers come from the best checkpoint (step 1000 of the final run) selected by test accuracy.
## Training
- Base: first 20 layers of `Qwen/Qwen3-0.6B` (weights frozen except LoRA).
- LoRA: r=8, alpha=16, dropout 0, on `q/k/v/o_proj` of layers 8-19.
- Head: 2 attention blocks, 512-dim, `num_task_types=3` (`choice`, `noul`, `score`).
- Data: `avbiswas/bev-decision-150K` (250,262 exploded training questions).
- Objective: cross-entropy over the options.
- Precision: bf16 autocast, fp32 head. Optimizer: AdamW (head lr 1e-3, LoRA lr 1e-4).
The exported weights are the LoRA-merged backbone plus the trained head.
## License
The model is **CC-BY-NC-4.0** (non-commercial), because the training data includes sources with non-commercial terms. It contains weights derived from [Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B), which is Apache-2.0; Qwen's license is included as `LICENSE-Qwen`.
|