LLM cost control guidance
Hi everyone, I have seen lately lot of learners have concerns on expenses due to LLM call in their AI projects/experiments. Here are few things we should keep in mind to keep cost in control🙂
Input vs Output token cost - Output tokens are always expensive then input token, roughly 4-10 times. One must control how many of these are getting generated.👌👌
Model control and routing - we can send our smaller queries to tiny models, we should not use heavy models until we absolutely need it. (see attached screenshot to get a difference between prices of 5.2 variants for example)🤠🤠
Inference mode - See if you we can mode batch inference in place of online, it's cheaper.❤️
Infra and system design - The Embeddings creation / vector DB hit and comparison, all adds up to cost. we can design an efficient system, use cache and choose model carefully here as well.🎉
If we take care of these small things, it will help and we can learn and experiment more with same budget.💰💰💰
Cheers
Aman