Skip to content

[data, vlm] fix: skip overlong Kimi VLM samples - #63

Merged
kaimo455 merged 1 commit into
masterfrom
codex/kimi-vlm-overlong-text-only
May 22, 2026
Merged

[data, vlm] fix: skip overlong Kimi VLM samples#63
kaimo455 merged 1 commit into
masterfrom
codex/kimi-vlm-overlong-text-only

Conversation

@kaimo455

Copy link
Copy Markdown
Collaborator

Summary

  • avoid running Kimi media processing when a multimodal sample has no images or videos
  • only consume <image> / <video> placeholders when corresponding media is present, so text-only multimodal samples can contain those literals
  • discard overlong Kimi VLM samples via warning + skipped encode result when enable_discard_sample is set, respecting max_packed_tokens for packed data

Adapted from internal iCode review 120864956 patchset 2.

Verification

  • final GitHub blobs match iCode patchset 2 for both modified files
  • git diff --check origin/master..HEAD
  • python -m compileall -q loongforge/data/kimi_k25_plugin.py loongforge/data/multimodal/kimi_task_encoder.py

…mples and handle text-only multimodal inputs

Change-Id: I70f2ddcf1cbdd85027f6f375fb7c5cd47903dca5
(cherry picked from commit 0270d66)
@kaimo455 kaimo455 self-assigned this May 22, 2026
@kaimo455
kaimo455 merged commit 779fb6d into master May 22, 2026
5 checks passed
@kaimo455
kaimo455 deleted the codex/kimi-vlm-overlong-text-only branch May 22, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant