fix: Handle different separator token values for uint16/uint32 dtypes#14
Open
jlamprou wants to merge 1 commit intojongwooko:masterfrom
Open
fix: Handle different separator token values for uint16/uint32 dtypes#14jlamprou wants to merge 1 commit intojongwooko:masterfrom
jlamprou wants to merge 1 commit intojongwooko:masterfrom
Conversation
When processing Qwen model data with uint32 dtype, the -1 separator token overflows to 4294967295 instead of 65535. Add support for detecting both values to ensure correct prompt/response segmentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inconsistent token handling between uint16 and uint32 datasets
Description
There's a data processing inconsistency between
process_data_dolly.pyandlm_datasets.pywhen using uint32 dtype. Inprocess_data_dolly.py, when-1is used as a separator token for Qwen models (which use uint32), it overflows to4294967295. However,lm_datasets.pyis hardcoded to look for65535(the uint16 overflow value) as the separator token.Problem
-1correctly overflows to65535-1overflows to4294967295lm_datasets.pyonly checks for65535in its input processing logic:This means the separator token isn't being detected for Qwen model data, leading to incorrect prompt/response segmentation.
Steps to Fix
lm_datasets.pyto handle both overflow cases:Related Files