QUESTION 1 OF 15

How do you define inference latency?

Reveal the answer and explore the explanation.

01
EasyCore

How do you define inference latency?

Answer
Answer

Elapsed time from a request to a defined response milestone.

Practical example

Measure time to first token for a streaming assistant.

PythonRelated concept example
import asyncio
async def request():
    await asyncio.sleep(0.1)
    return 'ok'
async def main():
    return await asyncio.wait_for(request(), timeout=1)
print(asyncio.run(main()))

A timeout bounds waiting for a cooperative async operation.

Reference: Further reading ↗

Last 30 min revisionHigh-yield interview Q&As