-
Notifications
You must be signed in to change notification settings - Fork 132
why one forward pass beats generation
When the answer is yes or no, generating it as text is slower and more fragile than reading it as a probability. A chat model has to read the prompt, then produce at least one token, then hand your code a string that must be parsed back into a boolean, and sometimes it produces the wrong string. A model that returns P(yes) stops after reading the prompt: the pass that reads the text is the answer, so there are no output tokens and no format to break.
The time saved is only part of it. The bigger gain is that a probability carries information a word throws away. "Yes" from a chat model looks the same whether the model was sure or barely leaning; 0.93 and 0.52 do not, and that difference is what lets you set a threshold.
This page is what a forward pass is, what a generated one-word answer really costs, why no output means no format errors, what you get back instead, and where this design is the wrong one.
A forward pass is one run of the input through the model. For a prompt, the whole text goes through at once: the Splitwise paper describes all input tokens running "through the forward pass of the model in parallel to generate the first output token".
Generation is what happens after. Each further token is produced by another pass on the last token, "sequentially", in the same paper's words, with a cache of what came before so the prompt is not recomputed. Hugging Face's documentation on caching puts it plainly: autoregressive generation "makes a prediction one token at a time".
So a text answer always costs one prompt pass plus one pass per output token. A probability answer costs the prompt pass. The two phases, and why they have different speeds, are on prefill vs decode: where LLM latency comes from.
Ask a chat model "Answer yes or no: is this a billing problem?" and follow the work.
- Read the prompt. The same cost either way.
- Pick the first token. A sampled or greedy choice among the whole vocabulary. It might be "Yes", "yes", " Yes", "YES", or "The".
- Keep going until a stop. A chat model may add punctuation, a sentence, or an explanation unless you cap the output length, and a cap can cut off an answer that did not start with the word you wanted.
- Parse. Your code lowercases, strips, matches "yes" or "no", and decides what to do with "Yes, but only if the charge was duplicated".
- Retry or default when the parse fails, which costs another full call.
Steps 2 to 5 do not exist when the answer is a number between 0 and 1. On a hosted API, each retry also pays the network again: our hosted measurement from Europe was about 344 ms per call, nearly the same for a short and a long text.
jevos never writes. Every response reports output_tokens: 0, and the answer to each question
comes back as a noul, the probability that the answer is yes:
{
"model": "jev-latest",
"state": "I was charged twice for the same order.",
"questions": {"billing": {"type": "noul", "instructions": "Is this a billing problem?"}}
}In the README's example this comes back as "noul": 0.9 with 27 input tokens. There is no
string to match, so there is nothing to misspell, no preamble to strip, and no refusal sentence
to interpret. A response is either a well-formed probability or an HTTP error you handle like
any other.
Structured output features on chat APIs attack the same problem from the other side, by constraining what the model may generate. They make the format dependable; they do not remove the generation. The comparison is on structured output vs a probability.
A word is a decision already made at an unknown cut-off. A probability lets you place the cut-off yourself:
- Act on the confident ends, review the middle. Above 0.8 do it, below 0.2 do not, and send the rest to a person; how to size that band is on human in the loop AI with a review band.
- Move the bar where mistakes are expensive. If a wrong yes costs more than a wrong no, require more than 0.5. Our measurements show this model leans toward yes when it cannot work out the answer (152 wrong yeses against 91 wrong noes on 999 new questions), which is one more reason to raise it; see how to choose a threshold for P(yes).
- Combine answers in code. Probabilities can be compared, averaged and combined with AND and OR; strings have to be converted first.
On data like its held-out split, jevos is well calibrated (calibration error 0.009 on 6,397 natural yes/no questions), which is what makes the number usable as a probability and not just a score. On new kinds of questions that calibration does not fully carry over; the caveat is on what P(yes) means, and what it does not.
A single forward pass answers one thing: how likely is yes. Anything else needs text.
- Explanations. If a reviewer needs to read why, you need a model that writes.
- Extraction. Pulling a date, an amount or a name out of a text is generation, or regex.
- Open answers. Summaries, replies, translations.
-
Scores that need arithmetic. jevos answers
scorequestions, early, and is weakest where the level is a sum of points.
A common pattern is to keep the generator for the one step that needs words and move every "is it X?" in the pipeline to a decision model. How to find those steps in an existing app is on replacing chat LLM calls with yes/no questions.
Can I get a probability from a chat model instead of a word? If your runtime or API exposes token log-probabilities, they give the probability of "yes" as the first token. You still pay the generation call and have to decide which spellings count as yes.
Is one output token really slower than zero? Yes, by at least one more pass through the model, plus parsing. The larger cost is usually everything that follows the first token.
Does no output mean no hallucination? No. The model can still give a wrong probability. It cannot give a malformed answer.
Why not just set max tokens to 1? It shortens generation, but the first token may be a different spelling, a space, or the start of a refusal, so you still parse and handle failures.
Is the probability the same as the model's confidence? It is the model's estimate that the answer is yes. How far to trust it depends on calibration on data like yours.
See also: the fastest AI model for yes/no decisions, ask a local LLM a yes/no question and LLM confidence scores: probabilities vs self-reported confidence.
-
output_tokens: 0, the billing example and its answer, and thescoreanswers: the jev README. - Error counts (152 and 91) and the 999-question set; calibration error 0.009 on the held-out split: our own measurements. Hosted latency from Europe: our measurement of Jev, network included.
- Parallel prompt phase and sequential token phase: Patel et al., Splitwise, fetched 2026-09-29.
- Generation one token at a time and the KV cache: Hugging Face Transformers, caching, fetched 2026-09-29.
From the notes of jev, a model with no way to write a word: every answer it gives is a number between 0 and 1.
- Ask a local LLM a yes/no question and get P(yes)
- Zero-shot text classification with yes/no questions
- LLM policy decisions: put the rule in the question
- LLM as a judge on a CPU
- Why a small LLM says yes when the answer is no
- Small LLMs and arithmetic in yes/no questions
- Our held-out benchmark said 0.855, new questions said 0.757
- jevos vs Jev vs Laya for yes/no decisions
- An open-source alternative to Jev for yes/no decisions
- jevos vs the OpenAI API for yes/no classification
- jevos vs Ollama for yes/no decisions
- jevos vs bart-large-mnli for zero-shot classification
- A yes/no LLM vs a fine-tuned BERT classifier
- jevos vs SetFit: zero-shot vs few-shot classification
- jevos vs Llama Guard for content safety checks
- jev serve vs llama.cpp server for classification
- jevos vs LM Studio: a decision server, not a chat app
- Local vs hosted LLM decisions: latency, cost, privacy
- A yes/no LLM vs a business rules engine
- LLM decisions vs keyword rules and regex
- The fastest AI model for yes/no decisions
- What makes a local LLM fast on a CPU
- Why one forward pass beats generating an answer
- Prefill vs decode: where LLM latency comes from
- Why LLM latency grows with the length of the text
- Why a hosted LLM API cannot answer in 50 ms
- Many questions about one text: why the extra ones are cheap
- CPU or GPU for a small LLM
- Latency budgets: where a 200 ms model fits
- Measuring LLM latency: median, p90 and warm-up
- Q4_K_M vs Q8_0: speed and size for a small model
- Throughput vs latency for a decision server
- What P(yes) means, and what it does not
- LLM calibration explained with yes/no answers
- Expected calibration error (ECE), explained
- Temperature scaling for LLM probabilities
- Platt scaling for a yes/no model
- Reading a reliability diagram
- How to choose a threshold for P(yes)
- Thresholds when a wrong yes costs more than a wrong no
- Human in the loop AI with a review band
- Precision and recall at a P(yes) threshold
- Base rates: why a 0.9 yes can still be wrong often
- Combining yes/no answers with AND, OR and NOT
- Logits, log-odds and P(yes)
- LLM confidence scores: probabilities vs self-reports
- How to write yes/no questions an LLM answers well
- Negation in yes/no questions for an LLM
- One condition per question: splitting compound questions
- Ask whether the text says it at all
- Scores as yes/no thresholds: is it at least high?
- Sending JSON as the text: designing the state
- Why wording changes an LLM's answer, and how to test it
- Mainly about: questions for messages with several topics
- Yes/no questions about tone and emotion
- Asking about intent: what does the writer want?
- Yes/no questions about long documents
- Using an English-only LLM with other languages
- Content moderation with a local LLM
- A Discord moderation bot with a local LLM
- Spam detection with yes/no questions
- Review moderation with a local LLM
- Email triage with a local LLM
- Support ticket routing with yes/no questions
- Urgency detection in customer messages
- Sentiment analysis with yes/no questions
- Intent detection with a local LLM
- Lead qualification with yes/no questions
- Fraud case triage with a local LLM
- Phishing email screening with a local LLM
- Log and alert triage with a local LLM
- Checking text for personal data with yes/no questions
- Prompt injection screening with a small model
- Document classification with a local LLM
- Product categorization with yes/no questions
- Contract clause detection with a local LLM
- Refund request triage with a local LLM
- Detecting cancellation intent in customer messages
- RAG evaluation with yes/no questions
- RAG faithfulness check with a local LLM
- Hallucination detection with a local LLM
- LLM regression tests in CI with yes/no checks
- Rubric design for an LLM judge
- Pairwise comparison with a yes/no judge
- LLM judge bias and how to control it
- Evaluation metrics for yes/no classifiers
- Building a yes/no test set for your own data
- Accuracy by kind of question: why one number hides failures
- Generating test questions with answers computed by code
- Benchmark contamination and truly held-out tests
- An LLM router with yes/no questions
- A model cascade: small model first, large model on doubt
- Semantic routing vs yes/no questions
- Gating AI agent tool calls with yes/no checks
- AI agent guardrails with yes/no questions
- Stop conditions for AI agents
- Logging LLM decisions for audit
- Reducing LLM cost with local yes/no decisions
- Replacing chat LLM calls with yes/no questions
- Structured output vs a probability
- A Python client for local LLM decisions
- Calling a local LLM decision server from JavaScript
- Local LLM yes/no decisions in n8n
- A Slack bot that uses local LLM decisions
- Home Assistant automations with local LLM decisions
- A LangChain tool for local yes/no decisions
- Batch decisions from files with jev decide
- Running LLM yes/no checks in GitHub Actions
- Securing a local LLM server with an API key
- curl examples for a local LLM decision API
- Self-hosted AI for decisions
- A private LLM for text classification
- On-premise LLM for business decisions
- GDPR and automated decision-making with an LLM
- Offline AI for decisions: no network needed
- Edge AI decisions on a CPU
- Run an LLM locally without a GPU
- Small language models explained
- When a small model is enough, and when it is not
- An LLM on a laptop: what it can do in real time
- What is GGUF, for someone deploying a classifier
- GGUF quantization types explained: Q4_K_M, Q8_0 and others
- GGUF vs safetensors
- llama.cpp vs Ollama for a classification service
- llama-cpp-python vs calling llama.cpp through ctypes
- llama.cpp on Windows without compiling
- Running llama.cpp CPU only
- Using llama.cpp prebuilt binaries instead of building