08Why is streaming detokenization harder than decoding each token, and what breaks with multi-byte characters and stop strings?▼mediumNewOpenAIAnthropicFireworks AI○ sign inDecode each token on its own and an emoji streams as two replacement characters. The answer builds the offset-window decoder that fixes it, runs it, and adds the stop-string holdback that most streaming bugs come from.Open full answer →
13Write the main loop of a minimal LLM serving engine: request queue, scheduler, model step, sampling and streaming.▼hardNewOpenAIAnthropicFireworks AI◆ premiumAbout a hundred lines of Python that admit, chunk, preempt, sample and stream. The interviewer is watching where the KV accounting lives and what happens when the pool runs dry.Open full answer →
02Design the request path for an LLM API: gateway, router, engines, streaming. Where is each SLO measured, and what does each hop cost?▼easyNewOpenAIAnthropicTogether AIunlockedFour boxes are easy to draw. The answer that passes sizes them first, then says exactly which clock starts where, because a TTFT measured inside the engine and a TTFT measured by the client can disagree by a factor of five.Open full answer →
13Design real-time voice inference with 300 ms from the end of the user's turn to the first audio. Where does every millisecond go?▼expertNewOpenAIGoogle DeepMindMeta◆ premiumVoice moves the latency target from the first token to the first audible clause, and the largest item in the budget is not a model at all. The answer allocates 300 ms line by line, then sizes the LLM tier from it.Open full answer →
21A streaming benchmark reports fast tokens, but the client pauses. Which timing claims can its trace support?▼hardNewNVIDIATogether AIFireworks AI◆ premiumAn event can contain metadata, one token or several tokens. Audit a buffered stream without inventing token timestamps, and separate client launch delay from the engine's execution time.Open full answer →
14Implement a minimal autoregressive generate loop that streams text and honors stop sequences, including ones split across tokens.▼mediumNewOpenAIAnthropicPerplexity◆ premiumThe stop string arrives as three tokens, the euro sign arrives as two, and the client has already been sent half of both. The answer holds back exactly the text that could still become a stop, decodes bytes incrementally, and tests the stream against a reference that sees the whole output at once.Open full answer →
21A streaming client stops reading. Keep its output bounded without blocking the inference batch.▼hardNewOpenAIAnthropicBaseten◆ premiumOne slow connection can stall unrelated generations or retain an unbounded output queue. Implement a byte budget that includes the pending write, then connect overflow and disconnects to engine cancellation.Open full answer →