How to build a network that answers multiple-choice, yes/no, and score questions using a Qwen backbone and a lightweight ChoiceHead.
A JEV (Joint Embedding Vision) network is a decision-making model built on top of a frozen or partially fine-tuned language backbone. Instead of generating free-form text, it scores a fixed set of candidate answers for each question and selects the best one. This design is compact, fast to train, and directly optimisable with cross-entropy loss against the correct choice.
All three task types flow through the same architecture. A task token injected at the head’s input tells the ChoiceHead which regime it is operating in, so a single model handles all three without any task-specific branches.
The network has two components wired in series.
The head runs in fp32 even under bf16 autocast because bf16 logits are too coarse for a stable cross-entropy loss — a detail that matters in practice when training on modern GPUs.
Autoregressive generation is expensive at inference time (one forward pass per new token) and hard to optimise directly (requires RLHF or similar). Scoring a fixed candidate set is a single forward pass — the same complexity regardless of how long the choices are — and cross-entropy provides a dense, well-behaved gradient on every example.
The BEV-Decision dataset (avbiswas/bev-decision-150K) contains 150,000 questions across all three task types derived from bird’s-eye view driving scenarios — a natural benchmark for this architecture because the label space is naturally bounded and the questions are linguistically rich.
At a high level, a single example flows through the network in three stages.
<option>...</option> tags and concatenated after the question. The string "The answer is:" closes the sequence. Position IDs are assigned so that all choices start at the same position (parallel encoding — covered in post 2).| Decision | Why |
|---|---|
| Partial backbone (first N layers) | Reduces memory and FLOPS; the lower layers provide rich token representations without the cost of the full model. |
| LoRA on last K kept layers | Allows the backbone to adapt to the task domain with a tiny fraction of trainable parameters. |
| fp32 head under bf16 autocast | Prevents numerical instability in the logits without giving up the speed of bf16 in the backbone. |
| Bilinear scoring in the head | Order-invariant: works correctly regardless of how many choices appear or in what order. |
Say the answer out loud before revealing it — the act of retrieving is what makes it stick.
What are the three task types a JEV network handles?
Why does the head run in fp32 even under bf16 autocast?
What is the advantage of scoring fixed candidates over autoregressive generation?
What is LoRA used for in this network?