by behnamoh · 3y ago · 0 comments
Most models on HF are like CrapCoins of the crypto era, so forget about 99.5% of them. There are only a few that can be useful (mostly +70b params).
Don't forget that some of this hype can be driven by nVidia to sell more GPUs. Some of it is driven by crypto enthusiasts who now use their GPUs for GenAI.
Forget about benchmarks and SOTA performance claims. Data leaks and you'll never be 100% sure that the team didn't mess with training data to manipulate the benchmarks.
Is GenAI a hype? Most likely, yes. Can it still be useful? Yes. You can still use GPT-4 and Llama 2 70b models for various tasks. Just don't use Langchain or any frameworks. Make your own API calls. And the smaller models (3-7b)? They are useful for when you don't want to chat with the model, like sentiment analysis.
I have some transcription correction needs, and I had a set of prompts that could get GPT4 to do it...but boy was it expensive, and I had to break the problem down into multiple steps to get accurate results, increasing costs further.
My 13b Llama2 fine-tune Inkbot ( https://huggingface.co/Tostino/Inkbot-13B-8k-0.2 ) is able to do those same tasks with a single shot prompt. I have some examples of the specific tasks I trained that model on in the readme. But it isn't intended to be a general purpose model. It has a specific skill-set, and it's best to stick to those types of tasks. I'm also able to do batch inference at over 1k tokens/sec with this model on my desktop. That is something simply not possible with a 70b model on consumer hardware.
I had modest success in using LLMs to achieve productivity improvements and results for my clients that are otherwise not possible. I used more direct API calls to invoke LLMs so far but am now considering switching to LangChain to make it more maintainable and scalble to turn more of my ideas into products and service offerings for my clients.
At the outset, a standard library that warps around popular LLMs and makes calling them easier seems needed and inevitable.
I suppose if LangChain doesnt find a good path to becoming more mature -- then some other equivalent open-source library will replace it in coming months.
Thanks for the heads-up.
def embed_documents(self, texts: List[str]) -> List[List[float]]:
texts = list(map(lambda x: x.replace("\n", " "), texts))
embeddings = self.client.encode(texts, \*self.encode_kwargs)
return embeddings.tolist()
```