Skip to content

Record: GatedAttn + Alpha-Scaled LoRA + Warm-start A + WD 1.0 — val_bpb 1.07081 (3-seed mean)#1784

Open
renqianluo wants to merge 1 commit intoopenai:mainfrom
renqianluo:record/gated-attn-alpha144-1.07081
Open

Record: GatedAttn + Alpha-Scaled LoRA + Warm-start A + WD 1.0 — val_bpb 1.07081 (3-seed mean)#1784
renqianluo wants to merge 1 commit intoopenai:mainfrom
renqianluo:record/gated-attn-alpha144-1.07081

Conversation

@renqianluo
Copy link
Copy Markdown

Summary

Stacks GatedAttn (per-head sigmoid gate on SDPA output, from @dexhunter PR #1736) on top of PR #1767's LoRA-TTT stack. Two novel support changes were needed to make the combination work.

Novel changes in this PR

  1. Mirror the gate inside _block_with_lora / _parallel_block_with_lora — the LoRA-TTT forward path reimplements attention inline (to inject LoRA into q/k/v/out). A gate added only to CausalSelfAttention.forward is silently dropped at TTT scoring time, so training and scoring see different models. Without this mirror, TTT collapses to 1.40 BPB. With it, TTT converges and GatedAttn adds −0.00152 BPB on the 3-seed mean.

  2. Per-row int8 quantization for attn_gate_w — fp16 passthrough pushed the artifact from 15.93 MB to 16.01 MB, over the 16 MB cap on all 3 seeds. Per-tensor int8 saves bytes but loses 0.00112 BPB. Per-row int8 (one fp16 scale per head, 88 extra bytes per artifact) keeps precision within 0.00024 BPB of fp16 while bringing the artifact safely under 16 MB.

Results

Seed rank-96 baseline PR #1767 + GatedAttn (this)
1337 1.07423 1.07189 1.07146
42 1.07341 1.07248 1.07014
314 1.07214 1.07189 1.07082
Mean 1.07326 1.07209 1.07081

Every seed improves monotonically.

Compliance

Train ≤596s, eval 466–474s, artifact 15.98MB. Issue #1017 conditions 1–4 verified.

Attribution

@dexhunter (PR #1736), @samacqua (#1530), @bigbag (#1493, #1771), @EthanYangTW (#1523), @romeerp (#1610), @abaybektursun (#549), this author (PR #1767).

…pb 1.07081 (3-seed mean)

Stacks GatedAttn (per-head sigmoid gate on SDPA output, ported from @dexhunter PR openai#1736)
on top of our LoRA-TTT stack from PR openai#1767.

Two novel support changes needed for the combination:
1. Mirror the gate inside _block_with_lora and _parallel_block_with_lora (the LoRA-TTT
   forward path reimplements attention inline; without the mirror, TTT scoring sees a
   different model than training and collapses to ~1.40 BPB)
2. Per-row int8 quantization for attn_gate_w to keep the artifact under 16MB while
   preserving gate precision (per-tensor int8 lost 0.00112 BPB; per-row keeps it within noise)

3-seed mean 1.07081 BPB (seeds 1337, 42, 314). All seeds improve vs PR openai#1767 (1.07209).
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