How do you define inference latency?
Reveal the answer and explore the explanation.
01EasyCoreHow do you define inference latency?
Answer
EasyCore
How do you define inference latency?
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 ↗