Open
Conversation
Introduces a Trainer utility class for model training and evaluation, and a dataloader for the OpenAssistant/oasst1 dataset with conversation extraction and tokenization. Updates RetentionEngine to support adaptation via training on OASST data using the new utilities.
Replaces the OASST dataloader with a new PG19 dataloader under retentionengine/datasets, removing the old dataloader. Updates RetentionEngine and Adapter to use the new dataloader and support distillation training with PG19. Refactors training logic to use the new Adapter class and updates training parameters for long document handling.
- Fix redundant forward passes in epoch methods - Unify data processing to eliminate code duplication Breaking change: Step methods now return (loss, predictions, targets)"
restoration_training.ipynb: Implement restoration training notebook for adapter model. usage.ipynb: Review and verify adapter usage logic. adapter.py: Refactor and enhance Adapter class for stability.
- Add `generate_dataset.py` to create a `.jsonl` dataset for memory training. - Update `restoration_training.ipynb` to load and use the generated dataset, modifying the data loader and tokenizer.
adapter.py: - Replace `torch.autocast` with `transformer_engine` to correctly apply FP8 to the teacher model. - Add `convert_to_fp8_layers` helper and convert teacher model layers in `__init__`. restoration_training.ipynb: - Import the `transformer_engine` library. - Update the testing loop to use `te.fp8_autocast` for the teacher model's inference to ensure consistency with the training environment
- attach base model input embeddings to Titans module for consistency - add support for trimming leading transformer layers based on size limit - refine config merge logic to replace with resized model config
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.
Adapterclass in 'adapter.py' to improve training stability.