Update llm_config.py

This commit is contained in:
James 2024-11-27 12:30:54 +10:00 committed by GitHub
parent a6750d7864
commit b1371cc977
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,23 +2,6 @@
LLM_TYPE = "ollama" # Options: 'ollama', 'openai', 'anthropic'
# LLM settings for llama_cpp
MODEL_PATH = "/home/james/llama.cpp/models/gemma-2-9b-it-Q6_K.gguf" # Replace with your llama.cpp models filepath
LLM_CONFIG_LLAMA_CPP = {
"llm_type": "llama_cpp",
"model_path": MODEL_PATH,
"n_ctx": 20000, # context size
"n_gpu_layers": 0, # number of layers to offload to GPU (-1 for all, 0 for none)
"n_threads": 8, # number of threads to use
"temperature": 0.7, # temperature for sampling
"top_p": 0.9, # top p for sampling
"top_k": 40, # top k for sampling
"repeat_penalty": 1.1, # repeat penalty
"max_tokens": 1024, # max tokens to generate
"stop": ["User:", "\n\n"] # stop sequences
}
# LLM settings for Ollama
LLM_CONFIG_OLLAMA = {
"llm_type": "ollama",