Skip to content

Post

Build your own decision model

Nish Tahir's tutorial on how decision models like Jev work: mask an LLM's vocabulary to the option tokens, read the softmax as a probability, then measure calibration and add temperature scaling, using Qwen3-1.7B.
Format
Post
Reading time
2 min
Published by
Community
Author
Nish Tahir
Last verified
Oct 2026

Highlights

  • Explains the single-pass trick: mask the vocabulary to the option tokens, pick the highest-probability one, and read the softmax as its score.
  • Provides a Python script that loads Qwen/Qwen3-1.7B, constrains decoding to options A to E, and prints the prediction with probabilities.
  • Reports 725/1221 = 0.5938 accuracy and 0.5844 macro F1 on a CommonsenseQA holdout, rising to 0.6241 accuracy after a fine-tune.
  • Shows the calibration gap: in the 0.90-1.00 confidence bin the model was right only 70.09% of the time, motivating temperature scaling.

Watch out

Grounded in the truncated post capture from 2026-10-15; the temperature-scaling section is cut off mid-sentence, and the CommonsenseQA figures are the author's own single run, used to illustrate calibration rather than to benchmark Jev or any other model.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai