this post was submitted on 26 Nov 2023
1 points (100.0% liked)

LocalLLaMA

4 readers
4 users here now

Community to discuss about Llama, the family of large language models created by Meta AI.

founded 2 years ago
MODERATORS
 

I run a micro saas app that would benefit a lot from using llama v2 to add some question & answering capabilities for customers' end users. We've already done some investigation with the 7B llama v2 base model and its responses are good enough to support the use case for us, however, given that its a micro business right now and we are not VC funded need to figure out the costs.

We process about 4 million messages per month of which we'd need to run 1M of them through the model and generate a response from it. Latency < 30 seconds would be required. So around ~23 messages/minute. # of tokens used would be ~4096 for each invocation.

Commercial models like Palm 2 or GPT X would be too expensive for us, wondering if there is a path to have a setup that can do this cost-efficiently. We have a bunch of GCP AI credits to fine-tune and experiment but they run out in less than a year so we need to think about the long-term sustainability. We can probably spare 500-1000 a month for the inference API with the hope that our customers will pay more $$ for this service.

Any guidance or benchmarks using various optimized models you can share would be very helpful.

top 12 comments
sorted by: hot top controversial new old
[–] kivathewolf@alien.top 1 points 2 years ago (1 children)

Checkout fastChat api. Easy to deploy and you can scale it. It can also support an open AI format api.

[–] m1ss1l3@alien.top 1 points 2 years ago

this is pretty cool, thanks for sharing will try out and check performance

[–] ggerganov@alien.top 1 points 2 years ago (1 children)

I just wrote a post today about serving 7B models with `llama.cpp` from cheap AWS instances - might be useful:

https://github.com/ggerganov/llama.cpp/discussions/4225

[–] m1ss1l3@alien.top 1 points 2 years ago

Thanks for all your work!!
The instance you used looks like it was 0.526 per hour which would fit our budget!!

Also, I want to make sure I'm reading the benchmark results right, is it correct that it took about 26s to serve all the 4 requests in parallel with the quantized model and the 2048+512 tokens assumption?

[–] noobgolang@alien.top 1 points 2 years ago (2 children)
[–] m1ss1l3@alien.top 1 points 2 years ago (1 children)

I tried this but got a bunch of errors with the binary, can you share the versions of cuda and other dependencies needed for this?

[–] noobgolang@alien.top 1 points 2 years ago

for cuda version you can use this link for linux version https://github.com/janhq/nitro/releases/download/v0.1.17/nitro-0.1.17-linux-amd64-cuda.tar.gz , you need to make sure the system has cudatoolkit. i remcommend following the exact step in quickstart docs here https://nitro.jan.ai/quickstart to make sure it will work

[–] MannowLawn@alien.top 1 points 2 years ago (1 children)

chrome is marking the download as suspicious from the github repo

[–] noobgolang@alien.top 1 points 2 years ago (1 children)

also the build is 100% built in public with the source code on the page, you can check the Actions button to see it, there is nothing hidden here

[–] MannowLawn@alien.top 1 points 2 years ago (1 children)

thanks, ill have a look. It seems very promising with my use case as well. Btw is nitro different than the download you have on the main page? Nitro seems only for m1 models of apple and on main page it mentions m2 models as well?

[–] noobgolang@alien.top 1 points 2 years ago (1 children)

m1 models of apple and on main page it mentions m2 models as well?

yeah arm64 mac should be able to run on all mac m1 and m2 including, we also have cuda version in the release

[–] MannowLawn@alien.top 1 points 2 years ago

cheers! ill keep a close watch on this, nice work!