Skip to content

Commit c2e16dc

Browse files
ofriwclaude
andcommitted
Hide text elements in UShapeAttentionCurve compact mode
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 75f0619 commit c2e16dc

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

website/src/components/VisualElements/UShapeAttentionCurve.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/* Compact mode for presentations - maximize diagram size */
1010
.container.compact {
1111
margin: 0 auto;
12-
padding: 0.75rem;
12+
padding: 0.5rem;
1313
max-width: 95%;
1414
}
1515

website/src/components/VisualElements/UShapeAttentionCurve.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,15 @@ export default function UShapeAttentionCurve({
185185

186186
return (
187187
<div className={containerClassName}>
188-
<div className={styles.header}>
189-
<h4 className={styles.title}>Context Window Attention Curve</h4>
190-
<span className={styles.subtitle}>
191-
Information at the beginning and end gets strong attention, middle
192-
gets skimmed
193-
</span>
194-
</div>
188+
{!compact && (
189+
<div className={styles.header}>
190+
<h4 className={styles.title}>Context Window Attention Curve</h4>
191+
<span className={styles.subtitle}>
192+
Information at the beginning and end gets strong attention, middle
193+
gets skimmed
194+
</span>
195+
</div>
196+
)}
195197

196198
<svg
197199
className={styles.svg}
@@ -406,14 +408,16 @@ export default function UShapeAttentionCurve({
406408
))}
407409
</div>
408410

409-
<div className={styles.explanation}>
410-
<strong>The U-Curve Effect:</strong> The curve's width shows context
411-
length, while depth shows attention quality. As context length increases,
412-
the attention drop in the middle becomes more pronounced. Short contexts
413-
(30%) have minimal degradation. Medium contexts (60%) show a noticeable
414-
U-curve. Long contexts (90%) exhibit severe attention loss—only the
415-
beginning and end are reliably processed.
416-
</div>
411+
{!compact && (
412+
<div className={styles.explanation}>
413+
<strong>The U-Curve Effect:</strong> The curve's width shows context
414+
length, while depth shows attention quality. As context length increases,
415+
the attention drop in the middle becomes more pronounced. Short contexts
416+
(30%) have minimal degradation. Medium contexts (60%) show a noticeable
417+
U-curve. Long contexts (90%) exhibit severe attention loss—only the
418+
beginning and end are reliably processed.
419+
</div>
420+
)}
417421
</div>
418422
);
419423
}

0 commit comments

Comments
 (0)