Menu

Why your chatbot takes forever to start, then trickles out the answer one word at a time
📰

Why your chatbot takes forever to start, then trickles out the answer one word at a time

DEV Community: tutorial·Deployed Lab·14 days ago
#H7hot2JE
#devtotutorial#devto#dev#notes#word
Long article (976 words) — no AI summary yet.
Reading 0:00
15s threshold

Kavish sets up AI tools for customers. A law firm runs its own model on its own GPU. A lawyer pastes in a 30-page contract and waits a long time for the first word, and when ten colleagues join, the small GPU runs out of memory for their chats.

Kavish has to explain why one system is slow in two different ways, and the answer is in how a language model writes at all.

It guesses one piece at a time

Think of the keyboard on your phone, which suggests the next word from what you typed. A language model does the same thing, far better.

It guesses one token, a small chunk of text, often a short word or part of one, adds it to the text, then guesses again using the longer text. That loop is the whole story. Everything else is about doing the loop fast, and its cost.

The phone-keyboard picture breaks down in one way: a phone looks only at your last word or two, while a language model looks back over everything in the chat. That sounds slow.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.