File size: 39,083 Bytes
3c3356c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427dd4e
 
3c3356c
 
 
 
 
 
 
427dd4e
3c3356c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427dd4e
 
 
 
 
3c3356c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427dd4e
 
 
3c3356c
427dd4e
3c3356c
 
 
 
427dd4e
 
 
 
3c3356c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1303" width="1200" height="1303" font-size="14">
<style>
:root {
  --bg: #ffffff; --fg: #1b1f24; --muted: #6b7280; --panel: #f6f8fa; --grid: #e5e7eb;
  --embed: #dbeafe; --embed-s: #3b82f6;
  --attn: #cffafe; --attn-s: #06b6d4;
  --mamba: #dcfce7; --mamba-s: #22c55e;
  --linattn: #fce7f3; --linattn-s: #ec4899;
  --recur: #ede9fe; --recur-s: #8b5cf6;
  --moe: #ffedd5; --moe-s: #f97316;
  --mlp: #ede9fe; --mlp-s: #8b5cf6;
  --norm: #e5e7eb; --norm-s: #9ca3af;
  --head: #fee2e2; --head-s: #ef4444;
  --config: #f1f5f9; --config-s: #64748b;
  --rope: #fef9c3; --rope-s: #eab308;
  --layer: #f8fafc; --layer-s: #cbd5e1;
  --io: #f1f5f9; --io-s: #94a3b8;
  --soft: #fae8ff; --soft-s: #c026d3;
  --add: #ffffff; --add-s: #475569;
  --block-s: #94a3b8;
  --residual: #f59e0b;
  --added: #16a34a; --over: #d97706; --deleted: #dc2626;
  --lt-full: #06b6d4; --lt-sliding: #3b82f6; --lt-chunked: #8b5cf6;
  --lt-compressed: #f97316; --lt-heavy: #dc2626; --lt-linear: #ec4899; --lt-mamba: #22c55e;
  --cell-on: #0ea5e9; --cell-off: #e5e7eb;
  --vision: #dcfce7; --vision-s: #16a34a; --audio: #fae8ff; --audio-s: #c026d3;
  --proj: #fef3c7; --proj-s: #d97706; --xattn: #db2777;
  --conv: #d1fae5; --conv-s: #10b981; --act: #ecfccb; --act-s: #65a30d;
  --pool: #e0f2fe; --pool-s: #0284c7; --quant: #fae8ff; --quant-s: #c026d3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --fg: #e6edf3; --muted: #8b949e; --panel: #161b22; --grid: #30363d;
    --embed: #172554; --attn: #083344; --mamba: #052e16; --linattn: #500724;
    --recur: #2e1065; --moe: #431407; --mlp: #2e1065; --norm: #21262d; --head: #450a0a;
    --config: #1e293b; --rope: #422006; --layer: #161b22;
    --conv: #022c22; --act: #1a2e05; --pool: #082f49; --quant: #3b0764; --proj: #422006;
    --io: #1e293b; --soft: #3b0764; --add: #0d1117; --cell-off: #21262d;
  }
}
.bg { fill: var(--bg); }
text { font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif; fill: var(--fg); }
.title { font-size: 22px; font-weight: 700; }
.subtitle { font-size: 13px; fill: var(--muted); }
.box-label { font-size: 14px; font-weight: 600; }
.box-label.sm { font-size: 12.5px; }
.box-sub { font-size: 11px; fill: var(--muted); }
.glyph { font-size: 18px; font-weight: 700; fill: var(--add-s); }
.badge { font-size: 12px; font-weight: 700; fill: var(--fg); }
.facts-k { font-size: 11.5px; fill: var(--muted); }
.facts-v { font-size: 11.5px; font-weight: 600; }
.legend-t { font-size: 11.5px; fill: var(--fg); }
.panel { fill: var(--panel); stroke: var(--grid); }
rect.b { rx: 9; stroke-width: 1.6; }
.c-embed { fill: var(--embed); stroke: var(--embed-s); }
.c-attn  { fill: var(--attn);  stroke: var(--attn-s); }
.c-mamba { fill: var(--mamba); stroke: var(--mamba-s); }
.c-linattn { fill: var(--linattn); stroke: var(--linattn-s); }
.c-recur { fill: var(--recur); stroke: var(--recur-s); }
.c-moe   { fill: var(--moe);   stroke: var(--moe-s); }
.c-mlp   { fill: var(--mlp);   stroke: var(--mlp-s); }
.c-norm  { fill: var(--norm);  stroke: var(--norm-s); }
.c-head  { fill: var(--head);  stroke: var(--head-s); }
.c-config{ fill: var(--config);stroke: var(--config-s); }
.c-rope  { fill: var(--rope);  stroke: var(--rope-s); }
.c-proj  { fill: var(--proj);  stroke: var(--proj-s); }
.c-conv  { fill: var(--conv);  stroke: var(--conv-s); }
.c-act   { fill: var(--act);   stroke: var(--act-s); }
.c-pool  { fill: var(--pool);  stroke: var(--pool-s); }
.c-quant { fill: var(--quant); stroke: var(--quant-s); }
.c-layer { fill: var(--layer); stroke: var(--layer-s); }
.c-io    { fill: var(--io);    stroke: var(--io-s); }
.c-soft  { fill: var(--soft);  stroke: var(--soft-s); }
.c-add   { fill: var(--add);   stroke: var(--add-s); }
.c-block { fill: none; stroke: var(--block-s); stroke-width: 1.6; stroke-dasharray: 7 5; }
.c-lt-full { fill: var(--lt-full); stroke: var(--lt-full); }
.c-lt-sliding { fill: var(--lt-sliding); stroke: var(--lt-sliding); }
.c-lt-chunked { fill: var(--lt-chunked); stroke: var(--lt-chunked); }
.c-lt-compressed { fill: var(--lt-compressed); stroke: var(--lt-compressed); }
.c-lt-heavy { fill: var(--lt-heavy); stroke: var(--lt-heavy); }
.c-lt-linear { fill: var(--lt-linear); stroke: var(--lt-linear); }
.c-lt-mamba { fill: var(--lt-mamba); stroke: var(--lt-mamba); }
.cell-on { fill: var(--cell-on); }
.cell-off { fill: var(--cell-off); }
.grid-frame { fill: none; stroke: var(--grid); stroke-width: 1; }
.mask-bg { fill: var(--cell-off); }
.mask-on { fill: #22c55e; }
.mask-div { stroke: var(--fg); stroke-width: 1.5; stroke-dasharray: 3 2; }
.c-vision { fill: var(--vision); stroke: var(--vision-s); }
.c-audio  { fill: var(--audio);  stroke: var(--audio-s); }
.c-proj   { fill: var(--proj);   stroke: var(--proj-s); }
.c-sub    { fill: var(--bg); stroke: var(--block-s); stroke-width: 1.2; }
.sec-h { font-size: 12px; font-weight: 700; }
.sec-hbar { fill: var(--bg); opacity: 0.82; }
.residual.xattn { stroke: var(--xattn); stroke-width: 2.4; }
.ghost { opacity: 0.32; stroke-dasharray: 4 3; }
.ch-added rect.b, rect.b.ch-added { stroke: var(--added); stroke-width: 3.2; }
.ch-over rect.b, rect.b.ch-over { stroke: var(--over); stroke-width: 3.2; }
.ch-deleted rect.b, rect.b.ch-deleted { stroke: var(--deleted); stroke-width: 3.2; }
.edge { stroke: var(--grid); stroke-width: 2; }
.flow { stroke: var(--grid); stroke-width: 2; fill: none; }
.residual { stroke: var(--residual); stroke-width: 2; fill: none; }
.rope { stroke: var(--rope-s); stroke-width: 2.2; fill: none; }
.xattn { stroke: var(--xattn); stroke-width: 2.4; fill: none; }
.cell-idx { font-size: 9px; fill: #ffffff; font-weight: 600; }
.sky { fill: #bae6fd; } .sun { fill: #fde047; } .hill { fill: #4ade80; }
</style>
<defs><marker id="ah-flow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="var(--grid)"/></marker><marker id="ah-residual" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="var(--residual)"/></marker><marker id="ah-rope" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="var(--rope-s)"/></marker><marker id="ah-xattn" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="var(--xattn)"/></marker></defs>
<rect class="bg" x="0" y="0" width="1200" height="1303"/>
<text class="title" x="24" y="34">bamba</text>
<text class="subtitle" x="24" y="54">diff vs llama (+jamba,mamba2)  ·  4 overridden · 23 added · 0 deleted · 4 new · 5 inherited-as-is</text>
<line class="edge" x1="485" y1="108" x2="485" y2="1261"/>
<g class=""><rect class="c-block" x="286" y="184" width="398" height="943" rx="14"/><text class="box-sub" x="298" y="202">BambaModel  ·  base model</text></g>
<g class=""><title>32 × BambaDecoderLayer</title><rect class="c-block" x="294" y="257" width="382" height="830" rx="14"/><text class="box-sub" x="306" y="275">BambaDecoderLayer</text><text class="badge" x="664" y="277" text-anchor="end">× 32</text></g>
<g class=""><rect class="c-block" x="286" y="1127" width="398" height="142" rx="14"/><text class="box-sub" x="298" y="1145">BambaForCausalLM  ·  task head</text></g>
<g class=""><rect class="b c-attn ch-over" x="320" y="321" width="330" height="470" rx="11"/><rect class="sec-hbar" x="325" y="325" width="320" height="18" rx="5"/><text class="sec-h" x="332" y="338">Token Mixer (SSM) · BambaMixer</text></g>
<g class="ghost"><rect class="b c-mlp " x="320" y="887" width="330" height="152" rx="11"/><rect class="sec-hbar" x="325" y="891" width="320" height="18" rx="5"/><text class="sec-h" x="332" y="904">MLP · LlamaMLP  ↩ inherited</text></g>
<polyline class="residual" points="320,279 286,279 286,818 320,818" stroke-dasharray="6 4" marker-end="url(#ah-residual)"/>
<polyline class="residual" points="320,818 270,818 270,1066 320,1066" stroke-dasharray="6 4" marker-end="url(#ah-residual)"/>
<g class=""><rect class="b c-io" x="320" y="108" width="330" height="32" rx="16"/><text class="box-label sm" x="485.0" y="122.0" text-anchor="middle">input_ids</text><text class="box-sub" x="485.0" y="137.0" text-anchor="middle">tokenize(&quot;Hey, how are you?&quot;)  →  [1, 6]</text></g>
<g class="ghost"><title>token 0: &#x27;Hey&#x27;</title><rect class="b c-sub" x="320" y="154" width="50" height="26" rx="9"/><text class="box-label sm" x="345.0" y="165.0" text-anchor="middle">Hey</text><text class="box-sub" x="345.0" y="180.0" text-anchor="middle">0</text></g>
<g class="ghost"><title>token 1: &#x27;,&#x27;</title><rect class="b c-sub" x="375" y="154" width="50" height="26" rx="9"/><text class="box-label sm" x="400.0" y="165.0" text-anchor="middle">,</text><text class="box-sub" x="400.0" y="180.0" text-anchor="middle">1</text></g>
<g class="ghost"><title>token 2: &#x27;␣how&#x27;</title><rect class="b c-sub" x="431" y="154" width="50" height="26" rx="9"/><text class="box-label sm" x="456.0" y="165.0" text-anchor="middle">␣how</text><text class="box-sub" x="456.0" y="180.0" text-anchor="middle">2</text></g>
<g class="ghost"><title>token 3: &#x27;␣are&#x27;</title><rect class="b c-sub" x="487" y="154" width="50" height="26" rx="9"/><text class="box-label sm" x="512.0" y="165.0" text-anchor="middle">␣are</text><text class="box-sub" x="512.0" y="180.0" text-anchor="middle">3</text></g>
<g class="ghost"><title>token 4: &#x27;␣you&#x27;</title><rect class="b c-sub" x="543" y="154" width="50" height="26" rx="9"/><text class="box-label sm" x="568.0" y="165.0" text-anchor="middle">␣you</text><text class="box-sub" x="568.0" y="180.0" text-anchor="middle">4</text></g>
<g class="ghost"><title>token 5: &#x27;?&#x27;</title><rect class="b c-sub" x="599" y="154" width="50" height="26" rx="9"/><text class="box-label sm" x="624.0" y="165.0" text-anchor="middle">?</text><text class="box-sub" x="624.0" y="180.0" text-anchor="middle">5</text></g>
<g class="ghost"><rect class="b c-embed" x="320" y="198" width="330" height="45" rx="9"/><text class="box-label sm" x="485.0" y="218.5" text-anchor="middle">Token Embedding</text><text class="box-sub" x="485.0" y="233.5" text-anchor="middle">weight [128000 × 4096]   →   [1, 6, 4096]</text></g>
<g class="ghost"><rect class="b c-norm" x="320" y="279" width="330" height="28" rx="9"/><text class="box-label sm" x="485.0" y="291.0" text-anchor="middle">BambaRMSNorm</text><text class="box-sub" x="485.0" y="306.0" text-anchor="middle">pre-mixer  [1, 6, 4096]</text></g>
<g class=""><title>act: SiLUActivation</title><rect class="b c-act ch-added" x="330" y="347" width="310" height="22" rx="9"/><text class="box-label sm" x="485.0" y="362.5" text-anchor="middle">act  SiLU</text><circle cx="342" cy="359" r="5" fill="var(--added)"/></g>
<g class=""><title>conv1d: Conv1d 8704×1×4</title><rect class="b c-conv ch-added" x="330" y="377" width="310" height="22" rx="9"/><text class="box-label sm" x="485.0" y="392.5" text-anchor="middle">conv1d  Conv1d 8704×1×4</text><circle cx="342" cy="389" r="5" fill="var(--added)"/></g>
<g class=""><title>in_proj: Linear [4096→17024]</title><rect class="b c-proj ch-added" x="330" y="407" width="310" height="22" rx="9"/><text class="box-label sm" x="485.0" y="422.5" text-anchor="middle">in_proj  [4096→17024]</text><circle cx="342" cy="419" r="5" fill="var(--added)"/></g>
<g class=""><title>norm: BambaRMSNormGated 8192</title><rect class="b c-norm ch-added" x="330" y="437" width="310" height="22" rx="9"/><text class="box-label sm" x="485.0" y="452.5" text-anchor="middle">norm  RMSNormGated 8192</text><circle cx="342" cy="449" r="5" fill="var(--added)"/></g>
<g class=""><title>out_proj: Linear [8192→4096]</title><rect class="b c-proj ch-added" x="330" y="467" width="310" height="22" rx="9"/><text class="box-label sm" x="485.0" y="482.5" text-anchor="middle">out_proj  [8192→4096]</text><circle cx="342" cy="479" r="5" fill="var(--added)"/></g>
<g class="ghost"><rect class="b c-sub" x="330" y="497" width="310" height="30" rx="9"/><text class="box-label sm" x="485.0" y="516.5" text-anchor="middle">selective state-space scan (SSM)</text></g>
<g class=""><title>mamba attention mask (q↓ × k→)</title><text class="box-sub" x="365" y="539">mamba mask</text><rect class="mask-bg" x="365" y="545" width="240.0" height="240.0"/><rect class="mask-on" x="365.0" y="545.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="555.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="555.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="565.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="565.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="565.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="575.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="575.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="575.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="575.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="585.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="585.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="585.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="585.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="585.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="595.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="595.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="595.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="595.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="595.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="595.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="605.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="605.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="605.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="605.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="605.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="605.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="605.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="615.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="625.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="635.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="645.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="655.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="665.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="675.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="685.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="695.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="705.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="535.0" y="715.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="535.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="545.0" y="725.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="535.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="545.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="555.0" y="735.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="535.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="545.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="555.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="565.0" y="745.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="535.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="545.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="555.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="565.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="575.0" y="755.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="535.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="545.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="555.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="565.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="575.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="585.0" y="765.0" width="10.0" height="10.0"/><rect class="mask-on" x="365.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="375.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="385.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="395.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="405.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="415.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="425.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="435.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="445.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="455.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="465.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="475.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="485.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="495.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="505.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="515.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="525.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="535.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="545.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="555.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="565.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="575.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="585.0" y="775.0" width="10.0" height="10.0"/><rect class="mask-on" x="595.0" y="775.0" width="10.0" height="10.0"/><rect class="grid-frame" x="365" y="545" width="240.0" height="240.0"/></g>
<g class=""><title>residual add</title><circle class="b c-add " cx="485.0" cy="818" r="13"/><text class="glyph" x="485.0" y="824" text-anchor="middle">+</text></g>
<g class="ghost"><rect class="b c-norm" x="320" y="845" width="330" height="28" rx="9"/><text class="box-label sm" x="485.0" y="857.0" text-anchor="middle">BambaRMSNorm</text><text class="box-sub" x="485.0" y="872.0" text-anchor="middle">pre-FFN  [1, 6, 4096]</text></g>
<g class="ghost"><title>gate_proj: Linear [4096→14336]</title><rect class="b c-proj" x="332" y="913" width="306" height="22" rx="9"/><text class="box-label sm" x="485.0" y="928.5" text-anchor="middle">gate_proj  [4096→14336]</text></g>
<g class="ghost"><title>up_proj: Linear [4096→14336]</title><rect class="b c-proj" x="332" y="943" width="306" height="22" rx="9"/><text class="box-label sm" x="485.0" y="958.5" text-anchor="middle">up_proj  [4096→14336]</text></g>
<g class="ghost"><title>down_proj: Linear [14336→4096]</title><rect class="b c-proj" x="332" y="973" width="306" height="22" rx="9"/><text class="box-label sm" x="485.0" y="988.5" text-anchor="middle">down_proj  [14336→4096]</text></g>
<g class="ghost"><title>act_fn: SiLUActivation</title><rect class="b c-act" x="332" y="1003" width="306" height="22" rx="9"/><text class="box-label sm" x="485.0" y="1018.5" text-anchor="middle">act_fn  SiLU</text></g>
<g class=""><title>residual add</title><circle class="b c-add " cx="485.0" cy="1066" r="13"/><text class="glyph" x="485.0" y="1072" text-anchor="middle">+</text></g>
<g class="ghost"><rect class="b c-norm" x="320" y="1093" width="330" height="28" rx="9"/><text class="box-label sm" x="485.0" y="1105.0" text-anchor="middle">Final RMSNorm</text><text class="box-sub" x="485.0" y="1120.0" text-anchor="middle">[1, 6, 4096]</text></g>
<g class=""><title>BambaForCausalLM</title><rect class="b c-head ch-over" x="320" y="1135" width="330" height="42" rx="9"/><text class="box-label sm" x="485.0" y="1154.0" text-anchor="middle">LM Head</text><text class="box-sub" x="485.0" y="1169.0" text-anchor="middle">Linear [4096→128000]</text><circle cx="332" cy="1147" r="5" fill="var(--over)"/></g>
<g class="ghost"><rect class="b c-soft" x="320" y="1191" width="330" height="26" rx="9"/><text class="box-label sm" x="485.0" y="1208.5" text-anchor="middle">Softmax</text></g>
<g class=""><rect class="b c-io" x="320" y="1231" width="330" height="30" rx="15"/><text class="box-label sm" x="485.0" y="1244.0" text-anchor="middle">logits</text><text class="box-sub" x="485.0" y="1259.0" text-anchor="middle">[1, 6, 128000]</text></g>
<rect class="panel" x="912" y="88" width="264" height="174" rx="8"/>
<text class="facts-k" x="926" y="112">model id</text>
<text class="facts-v" x="1162" y="112" text-anchor="end">ibm-fms/Bamba-9.8b-2.2T-hf</text>
<text class="facts-k" x="926" y="134">parent</text>
<text class="facts-v" x="1162" y="134" text-anchor="end">llama</text>
<text class="facts-k" x="926" y="156">classes</text>
<text class="facts-v" x="1162" y="156" text-anchor="end">11</text>
<text class="facts-k" x="926" y="178">overridden</text>
<text class="facts-v" x="1162" y="178" text-anchor="end">4</text>
<text class="facts-k" x="926" y="200">added</text>
<text class="facts-v" x="1162" y="200" text-anchor="end">23</text>
<text class="facts-k" x="926" y="222">new classes</text>
<text class="facts-v" x="1162" y="222" text-anchor="end">4</text>
<text class="facts-k" x="926" y="244">inherited as-is</text>
<text class="facts-v" x="1162" y="244" text-anchor="end">5</text>
<text class="legend-t" x="914" y="282" font-weight="700">legend</text>
<rect x="916" y="293" width="16" height="12" rx="2" fill="none" stroke="var(--added)" stroke-width="3"/>
<text class="legend-t" x="940" y="303">new submodule (vs parent)</text>
<rect x="916" y="311" width="16" height="12" rx="2" fill="none" stroke="var(--over)" stroke-width="3"/>
<text class="legend-t" x="940" y="321">changed / redefined</text>
<rect x="916" y="329" width="16" height="12" rx="2" fill="none" stroke="var(--deleted)" stroke-width="3"/>
<text class="legend-t" x="940" y="339">deleted</text>
<rect x="916" y="347" width="16" height="12" rx="2" fill="none" stroke="var(--grid)" stroke-width="3"/>
<text class="legend-t" x="940" y="357">inherited / copy-pasted</text>
<text class="legend-t" x="914" y="380" font-weight="700">changes by class</text>
<circle cx="920" cy="393" r="4" fill="var(--over)"/>
<text class="facts-v" x="932" y="396">BambaDecoderLayer</text>
<text class="box-sub" x="932" y="409">ovr __init__,forward</text>
<circle cx="920" cy="421" r="4" fill="var(--added)"/>
<text class="facts-v" x="932" y="424">BambaFlashAttentionKwargs</text>
<text class="box-sub" x="932" y="437">5 attr</text>
<circle cx="920" cy="449" r="4" fill="var(--added)"/>
<text class="facts-v" x="932" y="452">BambaForCausalLM</text>
<text class="box-sub" x="932" y="465">ovr __init__,forward; add prepare_inputs_for…</text>
<circle cx="920" cy="477" r="4" fill="var(--added)"/>
<text class="facts-v" x="932" y="480">BambaMixer</text>
<text class="box-sub" x="932" y="493">add __init__,cuda_kernels_forward,forward,to…</text>
<circle cx="920" cy="505" r="4" fill="var(--added)"/>
<text class="facts-v" x="932" y="508">BambaModel</text>
<text class="box-sub" x="932" y="521">add __init__,_update_mamba_mask,forward</text>
<circle cx="920" cy="533" r="4" fill="var(--added)"/>
<text class="facts-v" x="932" y="536">BambaPreTrainedModel</text>
<text class="box-sub" x="932" y="549">add _init_weights; 9 attr</text>
</svg>