]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
llava : fix memory management bug (#5491)
authorElbios <redacted>
Thu, 15 Feb 2024 08:01:57 +0000 (09:01 +0100)
committerGitHub <redacted>
Thu, 15 Feb 2024 08:01:57 +0000 (10:01 +0200)
commit0d4177126b0556e202efb85bf3f768be81076400
treeb696a05bc6a6378b72cd0be3f96211ffe0056db1
parent7930a8a6e89a04c77c51e3ae5dc1cd8e845b6b8f
llava : fix memory management bug (#5491)

* Fix memory management in llava and server code

Fixes this error:

llama_new_context_with_model: graph splits (measure): 3
Available slots:
 -> Slot 0 - max context: 6000
{"timestamp":1707926446,"level":"INFO","function":"main","line":2623,"message":"model loaded"}
all slots are idle and system prompt is empty, clear the KV cache
slot 0 - loaded image
slot 0 is processing [task id: 0]
slot 0 : kv cache rm - [0, end)
slot 0 - encoding image [id: 1]
munmap_chunk(): invalid pointer
Aborted

* Make it cleaner by checking size in batch free wrapper
examples/llava/clip.cpp
examples/llava/clip.h
examples/server/server.cpp