fix: DeepSeek-OCR server crash, template routing, and CUDA OOM fallback#23394
Closed
soymh wants to merge 1 commit into
Closed
fix: DeepSeek-OCR server crash, template routing, and CUDA OOM fallback#23394soymh wants to merge 1 commit into
soymh wants to merge 1 commit into
Conversation
Upstream PR: ggml-org#17400 Original implementation by sfallah (sf/deepseek-ocr branch): https://github.com/sfallah/llama.cpp Co-authored-by: sfallah <sfallah@users.noreply.github.com> Fixes: - server crash: GGML_ASSERT(batch.n_tokens > 0) when mtmd image processing consumes all prompt tokens (inject synthetic token before assertion) - server crash: slot.task NULL dereference after release() on mtmd OOM - server crash: ggml_backend_sched_alloc_graph segfault when CUDA OOM (check return value, matching sfallah's upstream guard pattern) - template routing: --chat-template deepseek-ocr was rendered as Jinja text instead of resolving to the built-in template (auto-detect + legacy fallback) - bitmap/marker mismatch: get_media_marker() returned random string instead of mtmd_default_marker(), causing tokenizer to split on wrong marker - CUDA OOM: tensor loading falls back to CPU backend when GPU allocation fails - mmproj GPU: -ngl 0 now also disables mmproj GPU (matches user intent)
Contributor
|
there changes are too invasive, break all other models, we cannot accept |
Contributor
|
ref: #23345 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream PR: #17400 Original implementation by sfallah (sf/deepseek-ocr branch):
https://github.com/sfallah/llama.cpp
Co-authored-by: sfallah sfallah@users.noreply.github.com
Fixes:
Overview
Additional information
Requirements