Week10_복습과제_최지희#141
Open
SweetFriedPotato wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR appears to add a Week 10 review assignment submission demonstrating KV-cache behavior (and its relationship to PagedAttention) via a small PyTorch attention prototype plus benchmark/visualization artifacts.
Changes:
- Add a Jupyter notebook implementing a simple “no cache vs KV-cache” attention computation and timing comparison.
- Add a PDF export of related materials/results.
Key review findings (changes requested):
- The notebook currently includes large embedded cell outputs (notably an
image/pngbase64 blob around line 268) and captured stderr with local filesystem paths (around lines 256–263). This bloats the repo and can leak local environment details; clear outputs before committing (or use an output-stripping tool/workflow). - Attention score scaling divides by
sqrt(hidden_size)whilenum_heads/head_dimare defined but not used (e.g., around lines 110 and 161). Either implement per-head logic and scale bysqrt(head_dim), or remove the unused multi-head parameters to avoid implying multi-head attention. - The KV-cache “append” uses
torch.catevery step (around lines 157–158), which adds significant quadratic overhead due to repeated tensor reallocations/copies; for a fair benchmark, preallocate or accumulate in a list and concatenate once (or use indexed writes).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Week10_복습과제_최지희.ipynb | KV-cache demo + timing/memory visualization for Week 10 review assignment |
| Week10_예습과제_최지희.pdf | PDF artifact accompanying the Week 10 materials |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.