8000 docs: Add n_ctx not for multimodal models · chiensen/llama-cpp-python@abb1976 · GitHub
[go: up one dir, main page]

Skip to content

Commit abb1976

Browse files
committed
docs: Add n_ctx not for multimodal models
1 parent 36679a5 commit abb1976

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ Then you'll need to use a custom chat handler to load the clip model and process
233233
>>> from llama_cpp import Llama
234234
>>> from llama_cpp.llama_chat_format import Llava15ChatHandler
235235
>>> chat_handler = Llava15ChatHandler(clip_model_path="path/to/llava/mmproj.bin")
236-
>>> llm = Llama(model_path="./path/to/llava/llama-model.gguf", chat_handler=chat_handler)
236+
>>> llm = Llama(
237+
model_path="./path/to/llava/llama-model.gguf",
238+
chat_handler=chat_handler,
239+
n_ctx=2048 # n_ctx should be increased to accomodate the image embedding
240+
)
237241
>>> llm.create_chat_completion(
238242
messages = [
239243
{"role": "system", "content": "You are an assistant who perfectly describes images."},

0 commit comments

Comments
 (0)
0