llama_index icon indicating copy to clipboard operation
llama_index copied to clipboard

Best llm to use gpt_index

Open Keith-Hon opened this issue 2 years ago • 3 comments

OpenAI's models definitely have high quality. But suppose someone wants to achieve comparable results using self host models and gpt-index, what are the alternatives?

Keith-Hon avatar Feb 13 '23 15:02 Keith-Hon

see this issue https://github.com/jerryjliu/gpt_index/issues/423#issue-1579871856

AldawsariNLP avatar Feb 13 '23 21:02 AldawsariNLP

see this issue #423 (comment)

Yeah I have looked at it. While we could use custom models with some modifications on our own, it seems to me that most open source models didn't get trained with external data sources in mind. Which could not leverage most of the power from library like gpt-index or langchain.

Keith-Hon avatar Feb 14 '23 05:02 Keith-Hon

Another concern is input length. Most open-source models have a smaller max length (OPT is 2048, FLAN-T5 is 512!!).

I think in the next few months though, we will see more open-source models with capabilities similar to OpenAI models. The research area is pretty hot right now.

Existing open-source models do not perform well with gpt_index, at least the ones I've tried (GPT-J, OPT, FLAN-T5). I think FLAN-T5 works the best (xl and xxl especially), I just wish it accepted longer input sequences.

logan-markewich avatar Feb 15 '23 15:02 logan-markewich

Since this is more of an issue of choosing the LLM and not an issue of how to use it with GPT Index (i think), i'm going to close the issue for now.

Btw even if langchain doesn't support the llm you're looking to integrate, you can always subclass LLMPredictor to integrate your LLM. ping me if you get to that and i can help

jerryjliu avatar Feb 15 '23 23:02 jerryjliu