News for hackers. Stuff that matters.
Re:Ask HN: How to deploy LLMs to serve a million users? by verdverm on Tuesday April 11, 2023 @04:18PM (#35530933)
Is it that much different from other APIs serving large numbers of users?

(other than the large GPU costs and lower request throughput per instance)

Re:Ask HN: How to deploy LLMs to serve a million users? by KatrKat on Tuesday April 11, 2023 @04:46PM (#35531315)
I think some domain-specific considerations include:

1. You need a really big in-memory data set that you touch ~all of several times for each request, so you really want to e.g. memory-map it and make sure it actually fits in memory on the machine.

2. If using a GPU, you have to make sure the GPU is hooked up to the serving process. You probably want your processes to be heavier-weight than they otherwise would be.

3. You might want to batch requests from several users for processing in the same stream of commands to the GPU. So you need to collect the right number of requests before processing any of them, without making any requests wait too long. You might need to sort these out by what inference parameters they want to override, and send them to different servers, because they might need to be batched accordingly.

4. You might want to stream the output more or less character by character. Possibly to several users, from one live run on a GPU, after having batched up enough requests to justify a run.

5. Content moderation when you are sending data to the user before you have even seen all of it yourself is an unsolved problem.

Re:Ask HN: How to deploy LLMs to serve a million users? by verdverm on Tuesday April 11, 2023 @05:01PM (#35531499)
These still don't seem unique to LLMs.

1. There are many GPU based applications already in production, I've seen work queues, which are used in any system where the load exceeds the capacity, GPU or not.

2. Content moderation is not unique to LLMs

3. Training and serving users at inference time are different beasts

Re:Ask HN: How to deploy LLMs to serve a million users? by travisjungroth on Tuesday April 11, 2023 @05:10PM (#35531613)
It’s not different from other GPU ML deployments, but those are already a little less solved than the standard web API portion.