Skip to content

Cornell CS 4789 lecture: minor tweaks - #545

Merged
natolambert merged 11 commits into
mainfrom
cornell-lecture-tweaks
Nov 18, 2026
Merged

natolambert merged 11 commits into
mainfrom
cornell-lecture-tweaks

Conversation

@natolambert

@natolambert natolambert commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Final tweaks to the Cornell CS 4789 guest lecture deck (teach/Cornell-CS4789-2026/) before the 18 Nov talk.

Changes

  • Move the deck's inline custom CSS into talk.css.
  • "Recall: Why losses are sums of log-probs" now shows why: the trajectory probability factorizes over tokens, so its log-gradient is a sum. The loss moves to a new slide, with a reminder that we code the loss and autodiff gives the gradient.
  • "From the loss to the gradient" shows the policy gradient next to the code.
  • Tensor shape comments on the log-prob code.
  • Industry section: no step reveals, retitled slides, "More clues in Stable Reinforce" moved to extra slides, and a new slide after "Reverse-engineering" deriving why the rank-1 LoRA gradient equals the logit gradient up to scale.
  • Takeaways slide filled in.
  • Typo fixes, and a content-tight CSS class so the two-line-title slide on Tinker's 8-token approximation fits.

Checks

teach/scripts/check_slide_overflow.py is clean except "Comparing logits/gradients in Tinker", where the figure caption sits close to the footnote link. That was already flagged on main.

The first commit on this branch is empty (it opened the draft), so squash-merge.

🤖 Generated with Claude Code

natolambert and others added 11 commits November 18, 2026 09:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…all text edits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngineering

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@natolambert
natolambert marked this pull request as ready for review November 18, 2026 15:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T15:20:39.575321Z 6e55fe9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e55fe95d2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +840 to +842
$A h$ is a single number, so write $c = A h$. The adapter adds $c$ times the vector $B$ to the logits:

<!-- step -->
$$z = W h + c \, B$$

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reveal the new LoRA derivation one step at a time

During presentation, this new slide displays the entire derivation and its conclusion immediately because it contains no <!-- step --> markers. This violates the math-derivation unroll requirement in teach/AGENTS.md, which requires revealing each manipulation separately so the audience can follow the argument. Add step markers before the substitution of c, the chain-rule calculation, and the final optimizer-update interpretation.

AGENTS.md reference: teach/AGENTS.md:L29-L29

Useful? React with 👍 / 👎.

@natolambert
natolambert merged commit b0926fd into main Nov 18, 2026
1 check passed

This branch was successfully deployed

1 active deployment
preview — 6e55fe95 Deployed Nov 18, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant