Decoding why Jev is 200x faster
Short answer: it never decodes.
LLM inference has two stages โ prefill, where all the tokens are computed over and the decode stage where we re-use the already available KV cache and compute over the last token in the sequence, to generate the next token. In one decode pass we generate just one single token.
Jev has NO DECODE STAGE, it only goes through a prefill pass and then predicts the results directly!!
For multiple questions being answered together, it likely uses block attention, where a causal block attention mask is applied over the inputs so that, the questions never see each other. Also the position ids restart after the state for every question. The state is processed once, and N questions cost one prefill of the state (+ questions) plus N short branches.
I want to discuss how kev predicts for the score, noul and choice, it isan open-source implementation of the jev model, over a qwen-3.5 base.
The token layout passed to the model is as follows :
<state> state tokens
<q> instruction tokens <opt> op1 tokens </opt> <opt> op2 tokens </opt> <opt> opK tokens </opt> <decide>
Get Shivamguptaxiaโs stories inย yourย inbox
Join Medium for free to get updates fromย thisย writer.
For the prediction stage, we consider the hidden states for the </opt> and the <decide> tokens, each of the </opt> tokens look at their option and the options before that, plus the state and the instruction โ they act as keys for their respective options, while the final <decide> token looks at all the options, it acts as the query.
After this an attention style dot product is computed, and we get the logits for each of the options.
z = (self.k(h_opts) @ self.q(h_decide)) * self.scale
z = z / self.temperature
p = softmax(z)
These probabilities are used for the final predictions for choice, noul and score (yes, even for regression like scores).
Noul โ the response is of binary format. The API builds two options, no then yes, optionally with the callerโs descriptions appended. Softmax over two logits gives [p_no, p_yes]. The response returns p_yes. For example:
<q> Does this need urgent human attention? <opt> no </opt> <opt> yes </opt> <decide>
-> [0.07, 0.93] ->
->โnoulโ: 0.93
Choice โ the model chooses one from the multiple options presented to it. Option text is formatted as โnameโ or name: description. Softmax over K. Argmax name is the final answer.
<q> Which team should handle this? <opt> returns: Exchanges </opt> <opt> shipping: Delivery delays </opt> <opt> billing: Charges </opt> <decide>
-> [0.47, 0.28, 0.25] ->
->choice โreturnsโ
Score โ a regression like score is returned. One option is given per rubric level. Softmax over L levels gives a distribution over level indices 0 to L-1. Expectation over indices becomes the regression score.
<q> How frustrated is the customer? <opt> Calm </opt> <opt> Frustrated </opt> <opt> Very angry </opt> <decide>
-> [0.00, 0.56, 0.44]
score = 0*0.00 + 1*0.56 + 2*0.44 = 1.44
And thatโs the whole trick, the answer is in the prefill itself.





