Find answers from the community

Updated 3 months ago

Models

Are there any examples of how to use LlamaIndex with other models besides OpenAI?
L
1 comment
You can use any model really. Just remember there's two models, an LLM and an embedding model


A) any LLM from langchain, assuming you wrap it with our LLMPredictor class

B) any model from huggingface has native support
https://gpt-index.readthedocs.io/en/latest/how_to/customization/custom_llms.html#example-using-a-huggingface-llm

C) any model from anywhere is also supported, but you have to implement a base class
https://gpt-index.readthedocs.io/en/latest/how_to/customization/custom_llms.html#example-using-a-custom-llm-model-advanced

D) local embeddings from huggingface are also supported (the default model is mpnet-v2)
https://gpt-index.readthedocs.io/en/latest/how_to/customization/embeddings.html#custom-embeddings
Add a reply
Sign up and join the conversation on Discord