From abb1976ad73b1b3fe9ee670ad1be7dc3eea5c995 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Wed, 22 Nov 2023 21:07:00 -0500 Subject: [PATCH] docs: Add n_ctx not for multimodal models --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 476f3e8..c5c57e4 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,11 @@ Then you'll need to use a custom chat handler to load the clip model and process >>> from llama_cpp import Llama >>> from llama_cpp.llama_chat_format import Llava15ChatHandler >>> chat_handler = Llava15ChatHandler(clip_model_path="path/to/llava/mmproj.bin") ->>> llm = Llama(model_path="./path/to/llava/llama-model.gguf", chat_handler=chat_handler) +>>> llm = Llama( + model_path="./path/to/llava/llama-model.gguf", + chat_handler=chat_handler, + n_ctx=2048 # n_ctx should be increased to accomodate the image embedding +) >>> llm.create_chat_completion( messages = [ {"role": "system", "content": "You are an assistant who perfectly describes images."},