Conversation
* configs (#284) * docker: improve docker cache and remove sources (#287) * Fixes for v2.0 benchmark (#289) * Reorganized the code provided by YardenMa for O_DIRECT support with NPY and NPZ formats and pytorch (#286) * Reorganized the code provided by YardenMa from PR #250 to follow the recommentations in #250 (review) * Move parse_npy and parse_npz back out of NPZReaderODIRECT and NPYReaderODirect class due to copy error Fix some spelling errors in config.rst * Updated NPZReaderODirect to be a derivative class of NPYReaderODirect to reduce code duplication and move the logic of accessing the dictionary key "x" for npz into NPZReaderODIRECT from ReaderFactory. Updated NPZReaderODirect and NPYReaderODirect to remove the need to pass in a paser function and make referencing them in ReaderFactory similar to the other formats. Update ci.yml to add a test for reader.odirect parameter under test-torch-loader-npz * RAM optimisations for checkpointing (#283) * Add KSM optimization (checkpoint) Reduce memory usage by adding the MADVISE flag to tensor pages and pausing for an arbitrary duration during initialization. If KSM is enabled, this allows it time to coalesce virtual pages into shared physical pages, resulting in significant reductions in RAM watermark usage for write checkpoint operations. This optimization does not apply to read operations. * Reduce RAM Usage for checkpointing (zero1) With zero1, only the first DP saves the model parameters. There is no need to allocate these parameters on other DP. The original RAM formula was: ram = ((model_size/(TP*PP))+(optimizer_size/(TP*PP*DP)))*(TP*PP*DP) With the patch, this simplifies to: ram = model_size + optimizer_size Which is equal to zero3 RAM usage. The reduction becomes more significant as DP increases. For example, a 70B model with 8TP, 4PP, and 4DP requires 1300GB without the patch, but only 910GB with it. This is still not equivalent to zero3, since only the first DP saves the model parameters. * Move KSM config under checkpoint.ksm subtree * Update config.rst for nested KSM checkpoint options * Correct nested KSM config parsing and add test * Add KSM checkpoint test in CI * Chore --------- Co-authored-by: Boris Glimcher <36732377+glimchb@users.noreply.github.com> Co-authored-by: Johnu George <johnugeorge109@gmail.com> Co-authored-by: Timothy Chau <162626440+timohty-chau@users.noreply.github.com> Co-authored-by: LouisDDN <77112282+LouisDDN@users.noreply.github.com>
…PY and NPZ formats and pytorch (#286) * Reorganized the code provided by YardenMa from PR #250 to follow the recommentations in #250 (review) * Move parse_npy and parse_npz back out of NPZReaderODIRECT and NPYReaderODirect class due to copy error Fix some spelling errors in config.rst * Updated NPZReaderODirect to be a derivative class of NPYReaderODirect to reduce code duplication and move the logic of accessing the dictionary key "x" for npz into NPZReaderODIRECT from ReaderFactory. Updated NPZReaderODirect and NPYReaderODirect to remove the need to pass in a paser function and make referencing them in ReaderFactory similar to the other formats. Update ci.yml to add a test for reader.odirect parameter under test-torch-loader-npz
* Add KSM optimization (checkpoint) Reduce memory usage by adding the MADVISE flag to tensor pages and pausing for an arbitrary duration during initialization. If KSM is enabled, this allows it time to coalesce virtual pages into shared physical pages, resulting in significant reductions in RAM watermark usage for write checkpoint operations. This optimization does not apply to read operations. * Reduce RAM Usage for checkpointing (zero1) With zero1, only the first DP saves the model parameters. There is no need to allocate these parameters on other DP. The original RAM formula was: ram = ((model_size/(TP*PP))+(optimizer_size/(TP*PP*DP)))*(TP*PP*DP) With the patch, this simplifies to: ram = model_size + optimizer_size Which is equal to zero3 RAM usage. The reduction becomes more significant as DP increases. For example, a 70B model with 8TP, 4PP, and 4DP requires 1300GB without the patch, but only 910GB with it. This is still not equivalent to zero3, since only the first DP saves the model parameters. * Move KSM config under checkpoint.ksm subtree * Update config.rst for nested KSM checkpoint options * Correct nested KSM config parsing and add test * Add KSM checkpoint test in CI * Chore
* Randomize tensor data by default (checkpoint) * Fix checkpoint: Correct TF int8/uint8 random tensor generation and update tests * Update tests (checkpoint) * Fix/chore tests for checkpoint
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.
This is to merge the PR from #288 with recent main.
Fixed incompatibility between ksm and randomize tensor