Ensure compatibility between models and datasets#402
Merged
jlamypoirier merged 12 commits intomainfrom Dec 10, 2025
Merged
Conversation
25 tasks
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.
✨ Description
When specifying a dataset and model in Fast-LLM, it's not currently possible to tell whether the two are compatible. This PR mitigates the issue by adding runtime checks. The dataset preparator saves the relevant preprocessing options with the dataset, and the memmap dataset compares it against the options required by the model, forwarded through the new
preprocessingfield ofSamplingData. Additional benefits:Should be backward compatible, the older dataset will just warn that they can't check compatibility. (Haven't tested though.)
So far this checks vocab size, use_loss_masking_spans, use_preference_spans, use_image_patches and patch shape. Missing the actual tokenizer, max image shape and image special tokens as it would require extra work and additional fields in the training config.
Also address multiple test failures from recent PRs
hybrid_gdnsince it's crashing. @oleksostskip_testforhybrid_gdn(was not excluding all tp configs),mistral_distill_activations(missing"df", "bf", "fp16")And some maintenance.
skip_tests), markhybrid_mambamodel config as unimportantThat leaves 5 failing tests:
The first one has been there for a long time, the remaining 4 concern reverse KL (#400) and are being investigated by @oleksost