[GH-ISSUE #12] Separator Token and New Line Token Mapped to self.image_token_id Instead of Distinct IDs as Described in the Paper? #8

Closed
opened 2026-10-26 21:09:59 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @chenin-wang on GitHub (Dec 18, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/12

Why are both the Separator Token and the New Line Token implemented using self.image_token_id in the code, while the paper describes them as having distinct IDs corresponding to /sep and /n?
image

github.com/deepseek-ai/DeepSeek-VL2@6036493d83/deepseek_vl2/models/processing_deepseek_vl_v2.py (L570)
github.com/deepseek-ai/DeepSeek-VL2@6036493d83/deepseek_vl2/models/processing_deepseek_vl_v2.py (L572)

Originally created by @chenin-wang on GitHub (Dec 18, 2024). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL2/issues/12 Why are both the Separator Token and the New Line Token implemented using `self.image_token_id` in the code, while the paper describes them as having distinct IDs corresponding to `/sep` and `/n`? <img width="891" alt="image" src="https://github.com/user-attachments/assets/44ea1af2-760b-4bfc-9029-7c6c186011cf" /> https://github.com/deepseek-ai/DeepSeek-VL2/blob/6036493d83b9283141145150ce31de331d8f4f37/deepseek_vl2/models/processing_deepseek_vl_v2.py#L570 https://github.com/deepseek-ai/DeepSeek-VL2/blob/6036493d83b9283141145150ce31de331d8f4f37/deepseek_vl2/models/processing_deepseek_vl_v2.py#L572
Author
Owner

@chenin-wang commented on GitHub (Dec 18, 2024):

the Separator Token and New Line Token are implemented using nn.Parameter for learnable embeddings and subsequently filled into the input embeddings

github.com/deepseek-ai/DeepSeek-VL2@6036493d83/deepseek_vl2/models/modeling_deepseek_vl_v2.py (L263)

github.com/deepseek-ai/DeepSeek-VL2@6036493d83/deepseek_vl2/models/modeling_deepseek_vl_v2.py (L422)

<!-- gh-comment-id:2550520882 --> @chenin-wang commented on GitHub (Dec 18, 2024): the Separator Token and New Line Token are implemented using nn.Parameter for learnable embeddings and subsequently filled into the input embeddings https://github.com/deepseek-ai/DeepSeek-VL2/blob/6036493d83b9283141145150ce31de331d8f4f37/deepseek_vl2/models/modeling_deepseek_vl_v2.py#L263 https://github.com/deepseek-ai/DeepSeek-VL2/blob/6036493d83b9283141145150ce31de331d8f4f37/deepseek_vl2/models/modeling_deepseek_vl_v2.py#L422
Author
Owner

@chenin-wang commented on GitHub (Dec 18, 2024):

Multi-head Latent Attention (MLA)
github.com/deepseek-ai/DeepSeek-VL2@6036493d83/deepseek_vl2/models/modeling_deepseek.py (L862)

<!-- gh-comment-id:2550584694 --> @chenin-wang commented on GitHub (Dec 18, 2024): Multi-head Latent Attention (MLA) https://github.com/deepseek-ai/DeepSeek-VL2/blob/6036493d83b9283141145150ce31de331d8f4f37/deepseek_vl2/models/modeling_deepseek.py#L862
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-VL2#8
No description provided.