Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit abb1976

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

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+5-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.