Skip to content

Week10_복습과제_최지희#141

Open
SweetFriedPotato wants to merge 3 commits into
Ewha-Euron:Week_10from
SweetFriedPotato:Week_10
Open

Week10_복습과제_최지희#141
SweetFriedPotato wants to merge 3 commits into
Ewha-Euron:Week_10from
SweetFriedPotato:Week_10

Conversation

@SweetFriedPotato
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings May 18, 2026 06:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/png base64 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) while num_heads/head_dim are defined but not used (e.g., around lines 110 and 161). Either implement per-head logic and scale by sqrt(head_dim), or remove the unused multi-head parameters to avoid implying multi-head attention.
  • The KV-cache “append” uses torch.cat every 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants