From cd5ba86fe9395cdc7527d3a57d1f852031cbdbe4 Mon Sep 17 00:00:00 2001 From: Pedro Cuenca Date: Tue, 4 Aug 2026 23:04:06 +0200 Subject: [PATCH] Go back to using delimiters. Otherwise our generations are worse. Transformers does not use them. We need to trace inputs to verify whether they are equivalent. --- tools/mtmd/mtmd.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/mtmd/mtmd.cpp b/tools/mtmd/mtmd.cpp index 5c49b35408..ea8f744e5f 100644 --- a/tools/mtmd/mtmd.cpp +++ b/tools/mtmd/mtmd.cpp @@ -472,7 +472,10 @@ struct mtmd_context { } break; case PROJECTOR_TYPE_ONYX: { - // Follow transformers Onyx processing: <|patch|>*N, no delimiters + // NOTE: transformers no longer uses delimiters (just <|patch|>*N), + // but we get subpar generations if we don't. + img_beg = "<|image_start|>"; + img_end = "<|image_end|>"; image_preproc = std::make_unique(ctx_v); } break; case PROJECTOR_TYPE_YOUTUVL: