[QUESTION] Document indices extended in add_document function in IndexedDatasetBuilder but not in add_item #1073
Replies: 1 comment
|
The distinction comes down to what each method is intended to represent.
The self.document_indices.append(len(self.sequence_lengths))This records the cumulative number of sequences after the document has been added, allowing the dataset loader to reconstruct document boundaries later. In contrast,
It intentionally does not update As for when So the differing behavior appears to be intentional: If this answer helped or pointed you in the right direction, I'd appreciate it if you could mark it as the accepted answer so it's easier for others with the same issue to find. Also, if you found my contribution useful, I'd appreciate it if you could check out my GitHub profile, follow me, and star any repositories you find interesting. GitHub: https://github.com/Advait251206 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Dear Megatron-LM team
In the IndexedDatasetBuilder class add_item function (
Megatron-LM/megatron/core/datasets/indexed_dataset.py
Lines 767 to 779 in 912be78
Megatron-LM/megatron/core/datasets/indexed_dataset.py
Lines 781 to 798 in 912be78
Thank you!
All reactions