Large Language Models
- How to use a custom/local embedding model?
- How to use a local hugging face embedding model?
- How can I customize my prompt
- Is it required to fine-tune my model?
- I want to the LLM answer in Chinese/Italian/French but only answers in English, how to proceed?
- Is LlamaIndex GPU accelerated?
1. How to define a custom LLM?
Section titled β1. How to define a custom LLM?βYou can access Usage Custom to define a custom LLM.
2. How to use a different OpenAI model?
Section titled β2. How to use a different OpenAI model?βTo use a different OpenAI model you can access Configure Model to set your own custom model.
3. How can I customize my prompt?
Section titled β3. How can I customize my prompt?βYou can access Prompts to learn how to customize your prompts.
4. Is it required to fine-tune my model?
Section titled β4. Is it required to fine-tune my model?βNo. thereβs isolated modules which might provide better results, but isnβt required, you can use llamaindex without needing to fine-tune the model.
5. I want to the LLM answer in Chinese/Italian/French but only answers in English, how to proceed?
Section titled β5. I want to the LLM answer in Chinese/Italian/French but only answers in English, how to proceed?βTo the LLM answer in another language more accurate you can update the prompts to enforce more the output language.
response = query_engine.query("Rest of your query... \nRespond in Italian")
Alternatively:
from llama_index.core import Settingsfrom llama_index.llms.openai import OpenAI
llm = OpenAI(system_prompt="Always respond in Italian.")
# set a global llmSettings.llm = llm
query_engine = load_index_from_storage( storage_context,).as_query_engine()
6. Is LlamaIndex GPU accelerated?
Section titled β6. Is LlamaIndex GPU accelerated?βYes, you can run a language model (LLM) on a GPU when running it locally. You can find an example of setting up LLMs with GPU support in the llama2 setup documentation.