fix: Handle different separator token values for uint16/uint32 dtypes #14
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