You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces support for Google Gemma4 models, including a training cookbook for FSDP2 and a new template class. The review feedback identifies several improvement opportunities: a hardcoded Windows path in the cookbook should be replaced to ensure portability across environments, a redundant import of LatexOCRProcessor should be removed, and unused imports and type aliases in the new template file should be cleaned up. Additionally, an incomplete comment in the training script needs to be addressed.
The reason will be displayed to describe this comment to others. Learn more.
The MODEL_PATH is hardcoded to a local Windows absolute path. This makes the script non-portable and will cause it to fail on other environments (e.g., Linux servers). Consider using a model ID from the hub (e.g., google/gemma-4-E2B-it) or a relative path.
The reason will be displayed to describe this comment to others. Learn more.
LatexOCRProcessor is imported here but then redefined on line 61. This is redundant and can lead to confusion. If the local definition is intended for this cookbook, please remove the import of LatexOCRProcessor from line 26.
The reason will be displayed to describe this comment to others. Learn more.
These imports and type aliases are unused in the current implementation of Gemma4Template. They should be removed to maintain code cleanliness and reduce overhead.
The reason will be displayed to describe this comment to others. Learn more.
The comment # 若npu显存不足, (If NPU memory is insufficient...) is incomplete. Please complete the explanation or remove the trailing comment if it is no longer necessary.
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
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.
PR type
PR information
Write the detail information belongs to this PR.
Experiment results
Paste your experiment result here(if needed).