liveBook · Manning

Compute

As explained in Domain-Specific Small Language Models

The practice of allocating more computation at inference time to improve a model’s output quality or reasoning behavior without changing the base model.

Test-time compute (TTC) allocates additional computation during inference so a model can explore alternatives, evaluate candidates, and spend more time reasoning without changing its base model. It targets difficult tasks such as mathematics, logic, and coding, trading higher accuracy for greater latency and compute cost. section 15.1

TTC can improve an otherwise static inference pass through:

  • Search over candidate outputs with beam search or tree-based exploration, including Monte Carlo tree search, within a compute budget. section 15.1
  • Candidate scoring, self-consistency, reflection, or executing generated code and checking it for errors before returning an answer. section 15.1 section 15.5
  • Dynamic allocation of reasoning time, which can make inference more reliable but increases hardware use, response time, and operating cost. section 15.1

OptiLLM makes TTC available to OpenAI API–compatible services through an inference proxy. It forwards requests to a model, performs repeated calls and refinement with a selected algorithm, and returns the result after the refinement cycle. It also supports local inference with Hugging Face models, LoRA weights, llama.cpp, or Ollama. section 15.2

Figure 15.1 The flow of requests and responses through the OptiLLM proxy

Use the request-flow diagram to trace how a client, OptiLLM proxy, and OpenAI API–compatible service participate in TTC refinement. section 15.2

Reasoning over a math problem

A small Qwen2.5-0.5B-Instruct model can receive a student-enrollment word problem and produce an answer through ThinkDeeper or chain-of-thought decoding. The OptiLLM benchmark evaluates such decoding approaches on GSM8K samples. section 15.2

How Domain-Specific Small Language Models covers it

How deep it goes
Defines TTC and explains search, candidate scoring, verification, proxy orchestration, and compute-cost tradeoffs.
Examples
Demonstrates OptiLLM decoding with Qwen2.5-0.5B-Instruct on a word problem and GSM8K benchmark samples.
What you can do after
Apply it via OptiLLM to refine responses from OpenAI API–compatible services or local Hugging Face models.
How it connects
Connects inference with beam search, Monte Carlo tree search, self-consistency, chain-of-thought, reflection, and code verification.

Also explained in

Compare how 2 books explain compute →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Domain-Specific Small Language Models. The section links point to the parts of the book it draws on.