Fix incorrect parameter count and remove duplicate cell in Lab 5.5#33
Closed
Yassir-249 wants to merge 1 commit into
Closed
Fix incorrect parameter count and remove duplicate cell in Lab 5.5#33Yassir-249 wants to merge 1 commit into
Yassir-249 wants to merge 1 commit into
Conversation
The Recap markdown describes Gemma 3 1B as having "1.3 billion parameters". The Gemma 3 Technical Report (https://arxiv.org/abs/2503.19786), Table 1, gives 698M non-embedding + 302M embedding = ~1.0B total for the 1B variant, which matches the model.summary() output students see in the previous lab (Total params: 999,885,952). Updating the figure to match. Also removes a duplicate code cell in the "Intuition behind matrix decomposition" section. The example-inputs cell that prints "Output for ones only", "Output for high 1st and 2nd input", and "Output with input that reverses the sign" appears twice in a row, with no markdown between the two copies. The cells are AST-equivalent (only whitespace differs: x,delta_W vs x, delta_W). Removing the second copy preserves reading order; delta_W is defined in the cell above both copies, and no later cell references a variable defined in the removed cell.
Author
|
Resolved on |
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.
Summary
Two minor edits to
course_5/gdm_lab_5_5_implement_lora_for_parameter_efficient_fine_tuning.ipynb:model.summary()output students see in the previous lab (Total params: 999,885,952). Updating the figure to match.Output for ones only,Output for high 1st and 2nd input, andOutput with input that reverses the sign— appears twice in a row in the "Intuition behind matrix decomposition" section. The two cells are functionally identical (only whitespace differs:x,delta_Wvsx, delta_W) with no markdown between them. Removing the duplicate.Changes
1.3 billion parameters→1 billion parameters.delta_Wis defined in the cell immediately above both copies, and the next markdown ("If you add an additional row to A...") moves to a new topic, so no downstream cell depends on the deleted one.Verification
Tested on a Colab T4 GPU runtime against
git+https://github.com/google-deepmind/ai-foundations.git@main:LoraDense.call()returns shape(1, 512)matching the pretrained model;pretrained_model.summary()reports 262,656 params;lora_model.summary()reports 270,848 total / 8,704 trainable / 262,144 frozen;feedback.check_loralab_answer(0.0331, num_units=512, rank=8)returnsNice! Your answer looks correct.delta_Wdefined immediately above it, and no later cell references a variable defined in the removed cell.Related