Skip to content

ui: media attachments before text#23467

Merged
allozaur merged 2 commits into
ggml-org:masterfrom
sfallah:sf/ui-media-before-text
May 25, 2026
Merged

ui: media attachments before text#23467
allozaur merged 2 commits into
ggml-org:masterfrom
sfallah:sf/ui-media-before-text

Conversation

@sfallah
Copy link
Copy Markdown
Contributor

@sfallah sfallah commented May 21, 2026

Overview

MTMD models like DeepSeek-OCR expect the media-marker before text.
mtmd-cli correctly so put media-maker before text.

related issue: #21022

related PR: #23345

Additional information

Before this change DeepSeek-OCR was not working with llama-server.
All other MTMD should still work, because they are tested in mtmd-cli with the order [image][text]/[audio][text].

Tests

I have tested through the UI with interleaving image-text-audio-text-image it works.
build/bin/llama-server -hf ggml-org/gemma-4-E2B-it-GGUF:bf16

I have also tested with DeepSeek-OCR using single image via UI and via API calling.

gemma-4-E2B-it

build/bin/llama-server -hf ggml-org/gemma-4-E2B-it-GGUF:bf16

DeepSeek-OCR

uild/bin/llama-server \
    -hf sabafallah/DeepSeek-OCR-GGUF:bf16 \
    --temp 0 -n 2048 --flash-attn off \
    --no-jinja --chat-template deepseek-ocr

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - I have used AI investigate the UI code and help to make the changes.

@sfallah sfallah requested a review from a team as a code owner May 21, 2026 08:47
@allozaur allozaur merged commit b964876 into ggml-org:master May 25, 2026
6 checks passed
fewtarius pushed a commit to fewtarius/llama.cpp that referenced this pull request May 30, 2026
* ui: media attachments before text

* fix prettier formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants