Lurker News
Sam said yesterday that chatgpt handles ~700M weekly users. Meanwhile, I can't even run a single GPT-4-class model locally without insane VRAM or painfully slow speeds.

Sure, they have huge GPU clusters, but there must be more going on - model optimizations, sharding, custom hardware, clever load balancing, etc.
What engineering tricks make this possible at such massive scale while keeping latency low?
Curious to hear insights from people who've built large-scale ML systems.

Comments (365) 85 threads

Earlier comments
jl64 replies#
If the explanation really is, as many comments here suggest, that prompts can be run in parallel in batches at low marginal additional cost, then that feels like bad news for the democratization and/or local running of LLMs. If it’s only cost-effective to run a model for ~thousands of people at the same time, it’s never going to be cost-effective to run on your own.
simonw1 reply#
Sure, but that's how most of human society works already.

It's more cost effective to farm eggs from a hundred thousand chickens than it is for individuals to have chickens in their yard.
You CAN run a GPT-class model on your own machine right now, for several thousand dollars of machine... but you can get massively better results if you spend those thousands of dollars on API credits over the next five years or so.
Some people will choose to do that. I have backyard chickens, they're really fun! Most expensive eggs I've ever seen in my life.

hdgvhicv#
50 years ago general computers were also time shared. Then the pendulum swing to desktop, then back to central.

I for one look forward to another 10 years of progress - or less - putting current models running on a laptop. I don’t trust any big company with my data

ijk#
Well, you can also batch your own queries. Not much use for a chatbot but for an agentic system or offline batch processing it becomes more reasonable.

Consider a system were running a dozen queries at once is only marginally more expensive than running one query. What would you build?

sixo#
That determines the cost effectiveness to make it worth it to train one of these models in the first place. Using someone else's weights, you can afford to predict quite inefficiently.
lhl#
For fungible things, it's easy to cost out. But not all things can be broken down just in token cost, especially as people start building their lives around specific models.

Even beyond privacy just the availability is out of your control - you can look at r/ChatGPT's collective spasm yesterday when 4o was taken from them, but basically, you have no guarantees to access for services, and for LLM models in particular, "upgrades" can completely change behavior/services that you depend on.
Google has been even worse in the past here, I've seen them deprecate model versions with 1 month notices. It seems a lot of model providers are doing dynamic model switching/quanting/reasoning effort adjustments based on load now.

minimaxir2 replies#
> Sure, they have huge GPU clusters

That's a really, really big "sure."
Almost every trick to run a LLM at OpenAI's scale is a trade secret and may not be easily understood by mere mortals anyways (e.g. bare-metal CUDA optimizations)

v5v31 reply#
Trade secret?

With all the staff poaching the trade secrets may have now leaked?

minimaxir1 reply#
That's half the reason tech companies poach.
thrown-0825#
It's the entire reason.

It's also the reason John Carmack got sued by zenimax when he went to oculus.

handfuloflight#
Trade secrets also exist to hide faults and blemishes.
highfrequency#
Multi-tenancy likely explains the bulk of it. $10k vs. $10b gives them six orders of magnitude more GPU resources, but they have 9 orders of magnitude more users. The average user is probably only running an active ChatGPT query for a few minutes per day, which covers the remaining 3 orders of magnitude.
kazinator1 reply#
One trick is that multiple prompts are combined into a batch that is subject to the token prediction simultaneously.

I've had Google Gemini start talking to be in the context of someone else's chat, unrelated to mine.
ME: Does POSIX have any API for creating a filesystem object (such as a file) with a predetermined inode number supplied by the caller?
AI:

  \documentclass{article}
  \usepackage{amsmath}
  \usepackage{amsfonts}
  \usepackage{amssymb}
  \begin{document}
  \section*{Does POSIX have any API for creating a filesystem object with a predetermined inode number supplied by the caller?}
  \textbf{No, POSIX does not provide a standard API for creating a filesystem object (like a file or directory) with a caller-specified inode number.}

  \subsection*{Inode Allocation in POSIX Filesystems}
  [... SNIP]
ME: Why are you spewing LaTeX syntax at me?

AI: You are absolutely right! My apologies. That was a mistake on my part. I got carried away with the instruction to use LaTeX for mathematical and scientific notations and incorrectly applied it to the entire response. [... SNIP]
There was no such instruction. I've never chatted with any AI about LaTeX. it leaked from the tokens of someone else's chat.

kouteiheika1 reply#
> There was no such instruction. I've never chatted with any AI about LaTeX. it leaked from the tokens of someone else's chat.

Nope. That's not how it works. Attention doesn't work across multiple independent prompts queued in the same batch. It's not physically possible for the tokens of another chat to leak.
What most likely happened is that the model glitched out to the instructions in its (hidden) system prompt, which most likely does include instructions about using LaTeX for mathematical and scientific notation.

tominous#
Maybe not due to attention, but it is certainly possible for chat content to get leaked into other conversations due to bugs in the stack, and in fact it has happened before.

https://openai.com/index/march-20-chatgpt-outage/
"We took ChatGPT offline earlier this week due to a bug in an open-source library which allowed some users to see titles from another active user’s chat history. It’s also possible that the first message of a newly-created conversation was visible in someone else’s chat history if both users were active around the same time."
You are probably right about this particular LaTeX issue though.

Load more comments