private-gpt icon indicating copy to clipboard operation
private-gpt copied to clipboard

how do i change the models: llm or embedding

Open cleesmith opened this issue 1 year ago • 6 comments

It seems that editing settings.yaml and running again isn't enough to change to different models.

Are there any instructions for exactly how to do this? I see nothing in the docs.

I'm ok if errors happen or the new models don't work properly.

Also, is it possible to use LLM Studio which provides OpenAI-like endpoint, as a way to more easily test other model?

Otherwise, this works well ... Thank you!

cleesmith avatar Feb 05 '24 13:02 cleesmith

Models have to be downloaded.

If you set the tokenizer model, which llm you are using and the file name, run scripts/setup and it will automatically grab the corresponding models.

icsy7867 avatar Feb 08 '24 04:02 icsy7867

So far i changed the models (LLM and embedding) in the settings.yaml and settings-docker.yaml, and after running docker compose run --rm --entrypoint="/usr/bin/env python3 scripts/setup" private-gpt it seems to at least download them. it's still at it so i can't say for sure if it worked or not, will keep this updated. Update: Worked, the Docker app is starting with the custom LLM and embedding

Apotrox avatar Feb 08 '24 21:02 Apotrox

Was facing the same issue. The above solution solved it. Thank you @Apotrox

JanuRam avatar Feb 19 '24 14:02 JanuRam

I wanted to use a German speaking model. Using Ubuntu with pyenv.

step 1- create settings-de.yaml

local:
  llm_hf_repo_id: TheBloke/em_german_leo_mistral-GGUF
  llm_hf_model_file:   em_german_leo_mistral.Q4_K_M.gguf
  embedding_hf_model_name: T-Systems-onsite/german-roberta-sentence-transformer-v2
  #llama, default or tag
  prompt_style: "default"

step 2 - download the model from huggingface hub with the setup script. It will keep all already downloaded files in models subdir.

PGPT_PROFILES=de ./scripts/setup

step 3 - run the app

PGPT_PROFILES=de python3.11 -m private_gpt

Walker555 avatar Feb 23 '24 10:02 Walker555

is it possible to use LLM Studio which provides OpenAI-like endpoint, as a way to more easily test other model?

hamvi-ai avatar Mar 15 '24 22:03 hamvi-ai

Check out the openailike mode.

https://docs.privategpt.dev/manual/advanced-setup/llm-backends

icsy7867 avatar Mar 15 '24 22:03 icsy7867

Thanks

cleesmith avatar Mar 22 '24 12:03 cleesmith

I went into the settings-ollama.yaml and changed the name of the model there from Mistral to any other llama model. Whe nI restarted the Private GPT server it loaded the one I changed it to.

robzilla1738 avatar Apr 08 '24 16:04 robzilla1738

I went into the settings-ollama.yaml and changed the name of the model there from Mistral to any other llama model. Whe nI restarted the Private GPT server it loaded the one I changed it to.

And directly download the model only with parameter change in the yaml file? Does the new model also maintain the possibility of ingesting personal documents?

terrornoize avatar Apr 23 '24 09:04 terrornoize