How Jev Works: The Logit Trick Behind TypeSafe's System One Model
For the last few weeks my timeline has been nothing but Jev. TypeSafe AI shipped it, and within days there was an awesome-jev list, a jev-mcp server, a LangChain integration, and about ten thousand demos of someone routing support tickets in 90 milliseconds. Everybody was building with it. Everybody was building around it. And I kept scrolling, looking for the one post I actually wanted: how does…
Jev is a closed, fast classification model that runs on TypeSafe's servers, offering a faster alternative to traditional GPT calls for ticket classification. Unlike conventional LLMs that generate prose to answer questions, Jev uses a technique called the Logit trick to directly read the model's prefill scores, eliminating the need for prose generation and reducing response time to milliseconds.
The Logit trick consists of four steps:
1. The model already knows the answer before producing any text. During the prefill phase, the model scores every token in its vocabulary, creating a set of logits (raw scores) for each potential output.
2. Convert every answer into a single token by renaming options into short labels, such as A for billing and B for technical. The model then picks a single letter as its response, which is later mapped back to the original category.
3. The options are limited to single tokens, with Jev supporting up to 255 options. This limitation is due to the tokenizer and chat template used to generate the labels.
4. The model's answer is returned without any free text, ensuring a consistent and efficient response format. This approach allows Jev to provide fast, accurate, and limited responses while avoiding the need for additional processing steps and reducing overall costs.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.