@@ -203,9 +203,6 @@ int32_t mtmd_tokenize(mtmd_context * ctx,
203203 }
204204
205205 // llava-1.5, llava-1.6, Yi-VL, Yi-34B, granite: don't need to add prefix and suffix
206- // for glm-edge, we don't need to add because the tokens are already in the returned embeddings
207-
208- // TODO @ngxson : glm-edge : remove BOI / EOI tokens embeddings, decode them as normal tokens
209206
210207 std::vector<std::string> parts = string_split_str (prompt_modified, ctx->image_marker );
211208 output.clear ();
@@ -246,7 +243,7 @@ int32_t mtmd_tokenize(mtmd_context * ctx,
246243 };
247244
248245 for (const auto & part : parts) {
249- // printf("tokenizing part: %s\n", part.c_str());
246+ // printf("tokenizing part: %s\n", part.c_str());
250247 bool add_bos = &parts.front () == ∂
251248 auto tokens = mtmd_tokenize_text_internal (vocab, part, text.add_special && add_bos, text.parse_special );
252249 if (tokens.empty ()) {
@@ -338,11 +335,6 @@ int32_t mtmd_tokenize(mtmd_context * ctx,
338335 LOG_DBG (" image_tokens->ny = %d\n " , image_tokens->ny );
339336 LOG_DBG (" batch_f32 size = %d\n " , (int )image_tokens->batch_f32 .entries .size ());
340337
341- if (clip_is_glm (ctx->ctx_clip )) {
342- // glm-edge
343- image_tokens->nx += 2 ; // add 2 for the begin_of_image and end_of_image token embeddings
344- }
345-
346338 mtmd_input_chunk chunk{
347339 MTMD_INPUT_CHUNK_TYPE_IMAGE,
348340 {},
0 commit comments