File size: 25,568 Bytes
714c70a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
{
  "model": "google/embeddinggemma-2",
  "revision": "914f7f89142e33e77833254d9c9b90c3cef7303b",
  "hf_advertised_context": 8192,
  "hf_advertised_context_source": "/home/hous/.cache/huggingface/hub/models--google--embeddinggemma-2/snapshots/914f7f89142e33e77833254d9c9b90c3cef7303b/README.md lines 45, 68, 229-236: 8,192-token context shared by all modalities",
  "config_rope_position_limit": 262144,
  "config_rope_position_limit_source": "config.json text_config.max_position_embeddings = 262144; RoPE table bound, not the trained or advertised context",
  "tokenizer_model_max_length": "unbounded (1e30 in tokenizer_config.json); sentence_bert_config.json sets no max_seq_length",
  "target_context": 8192,
  "target_context_decision": "Target is the card value 8192. Stage T6 probes 16384, 32768 and beyond and records the largest length that runs in probed_contexts; it does not raise target_context above the card value.",
  "current_supported_context": 65536,
  "current_supported_context_owner": "T6-full-text, re-verified by T7-optimized-text",
  "per_modality_budget_from_card": {
    "text_tokens": 8192,
    "image_soft_tokens_default": 280,
    "image_soft_tokens_range": [
      70,
      1120
    ],
    "video_tokens_per_frame_default": 140,
    "audio_tokens_per_second": 25,
    "audio_max_seconds_card": 327
  },
  "limiting_reason": "device_dram",
  "capacity_evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/full_text/raw/long_probe_131071.json",
  "probed_contexts": [
    {
      "context": 8192,
      "batch": 1,
      "runs": true,
      "forward_s": [
        0.175,
        0.1
      ],
      "cos_vs_hf_fp32_768": null,
      "ids_source": "synthetic corpus cycle",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/optimized_full_text/raw/long_probe_8192.json",
      "stage": "T7-optimized-text"
    },
    {
      "context": 16384,
      "batch": 1,
      "runs": true,
      "forward_s": [
        2.544,
        0.243
      ],
      "cos_vs_hf_fp32_768": 0.9999654357372991,
      "ids_source": "hf_long_refs",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/optimized_full_text/raw/long_probe_16384.json",
      "stage": "T7-optimized-text"
    },
    {
      "context": 32768,
      "batch": 1,
      "runs": true,
      "forward_s": [
        2.679,
        0.676
      ],
      "cos_vs_hf_fp32_768": 0.999914147043677,
      "ids_source": "hf_long_refs",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/optimized_full_text/raw/long_probe_32768.json",
      "stage": "T7-optimized-text"
    },
    {
      "context": 65535,
      "batch": 1,
      "runs": true,
      "forward_s": [
        4.776,
        2.257
      ],
      "cos_vs_hf_fp32_768": null,
      "ids_source": "synthetic corpus cycle",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/optimized_full_text/raw/long_probe_65535.json",
      "stage": "T7-optimized-text"
    },
    {
      "context": 65536,
      "batch": 1,
      "runs": true,
      "forward_s": [
        4.089,
        2.185
      ],
      "cos_vs_hf_fp32_768": 0.9998118937694584,
      "ids_source": "hf_long_refs",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/optimized_full_text/raw/long_probe_65536.json",
      "stage": "T7-optimized-text"
    },
    {
      "context": 131071,
      "batch": 1,
      "runs": false,
      "forward_s": null,
      "cos_vs_hf_fp32_768": null,
      "ids_source": "synthetic corpus cycle",
      "error": "TT_FATAL @ /home/hous/dev/embedding-gemma-2/tt-metal/tt_metal/impl/allocator/bank_manager.cpp:495: false",
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/full_text/raw/long_probe_131071.json",
      "stage": "T6-full-text"
    },
    {
      "context": 131072,
      "batch": 1,
      "runs": true,
      "forward_s": [
        13.143,
        7.744
      ],
      "cos_vs_hf_fp32_768": null,
      "ids_source": "synthetic corpus cycle",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/optimized_full_text/raw/long_probe_131072.json",
      "stage": "T7-optimized-text"
    },
    {
      "context": 262144,
      "batch": 1,
      "runs": true,
      "forward_s": [
        144.971,
        145.093
      ],
      "cos_vs_hf_fp32_768": null,
      "ids_source": "synthetic corpus cycle",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/full_text/raw/long_probe_262144.json",
      "stage": "T6-full-text"
    },
    {
      "context": 524288,
      "batch": 1,
      "runs": true,
      "forward_s": [
        588.317
      ],
      "cos_vs_hf_fp32_768": null,
      "ids_source": "synthetic corpus cycle",
      "error": null,
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/full_text/raw/long_probe_524288.json",
      "stage": "T6-full-text"
    }
  ],
  "checker": "python $TT_MODEL_BRINGUP_ROOT/scripts/check_context_contract.py --model-dir $TT_METAL_HOME/models/autoports/google_embeddinggemma_2 --require-contract (no --hf-model, so the target is hf_advertised_context and not the RoPE bound)",
  "audio_length_facts": {
    "feature_extractor_default": "Gemma4AudioFeatureExtractor truncates at max_length=480000 samples (30 s, 750 audio tokens) when truncation=True, the default (feature_extraction_gemma4.py:230-231).",
    "untruncated": "With truncation=False passed through processor audio_kwargs, length is limited only by the 8192-token context: 25 audio tokens per second, about 327 s (card line 236). Host probe: 60 s gives 1500 tokens.",
    "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/architecture.md Section 6.3; /home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/bringup/references/README.md"
  },
  "per_modality_targets": {
    "text_max_tokens": 8192,
    "audio_max_tokens": 8000,
    "audio_max_seconds": 320,
    "audio_truncation": false,
    "audio_target_reason": "Card advertises about 327 s in the shared 8192-token context. 8000 audio tokens leave room for prompt and special tokens.",
    "vision_soft_token_budgets": [
      70,
      280,
      1120
    ],
    "vision_default_budget": 280,
    "video_max_frames_tested": 58,
    "video_target_reason": "Card advertises about 58 frames. HF default max_frames is 32. Reference vid04 (320x240, max_frames=58) gives 58 frames, 130 tokens per frame, 7658 ids, which fits 8192. Frames that pool to the full 140 tokens cost 142 ids each, so 57 frames is the limit for those (8096 ids).",
    "multi_image_max_images": 29,
    "multi_image_reason": "Card lists about 29 images at the default budget 280 in one 8192 context. HF probe: 29 images give 7774 ids.",
    "video_low_budget_max_frames": 114,
    "video_low_budget_soft_tokens": 70,
    "video_low_budget_reason": "Card lists about 114 images or frames at a lower vision budget. HF probe: 114 frames at budget 70 give 7412 ids."
  },
  "functional_encoder_layer": {
    "stage": "T1-functional-text",
    "prefill_max_tested_with_hf_golden": 8192,
    "prefill_lengths_tested_with_hf_golden": [
      1,
      7,
      31,
      32,
      33,
      100,
      128,
      511,
      512,
      513,
      514,
      515,
      544,
      545,
      546,
      577,
      1000,
      1024,
      1025,
      1026,
      1056,
      1100,
      2048,
      2049,
      3001,
      4096,
      8191,
      8192
    ],
    "prefill_probed_beyond_target": [
      16384,
      32768
    ],
    "prefill_probe_result": "both layer kinds run at 16384 and 32768 (batch 1); PCC vs torch reference >= 0.99982; evidence doc/functional_encoder_layer/evidence/long_probe.json",
    "decode": "not applicable: encoder, no KV cache and no decode step",
    "capability_reduction": null,
    "note": "Layer-level evidence only. current_supported_context for the full embedder is owned by T6-full-text."
  },
  "fused_encoder_layer": {
    "stage": "T2-fused-text",
    "prefill_max_tested_with_hf_golden": 8192,
    "prefill_lengths_tested_with_hf_golden": [
      1,
      7,
      31,
      32,
      33,
      100,
      128,
      511,
      512,
      513,
      514,
      515,
      544,
      545,
      546,
      577,
      1000,
      1024,
      1025,
      1026,
      1056,
      1100,
      2048,
      2049,
      3001,
      4096,
      8191,
      8192
    ],
    "prefill_probed_beyond_target": [
      16383,
      16384,
      16385,
      32768
    ],
    "prefill_probe_result": "both layer kinds run at 16383, 16384, 16385 and 32768 (batch 1); PCC vs torch reference >= 0.99986",
    "prefill_probe_evidence": [
      "doc/fused_encoder_layer/evidence/long_probe.json"
    ],
    "decode": "N/A: encoder, no KV cache",
    "kv_cache_dtype": "N/A: no KV cache",
    "capability_change": "none. Every logical length >= 1 and batch 1..32 stays supported; no public alignment restriction.",
    "layout_change": "Uniform-length inputs (every valid length equal to S, any batch) use 32-aligned physical rows and no attention mask; SDPA sees a logical-length view; sliding layers use sliding_window_size=1024, full layers use no window when ceil(S/chunk) is even, else a window of 2x the physical rows. Mixed or bucket-padded inputs use mixed_physical_length(S, B) rows (256-aligned if S >= 2048 or S >= 1024 with B >= 8; 128-aligned if S >= 512 and 64-alignment forces dense chunk 32; else 64-aligned); sliding layers keep the dense [B,1,S,S] bf16 mask; full layers fold the batch into rows with cu_window_seqlens when folded_chunk(B, rows, dense_chunk) selects it (measured crossover), else the dense mask.",
    "memory_change": "Maskless path frees the dense mask (128 MiB at S=8192 B=1, 4 GiB at S=8192 B=32). Each layer stores packed QKV plus Q and packed K/V copies: +2 MiB (sliding) or +3 MiB (full) bf16 per layer, 52 MiB for 20 sliding and 4 full layers.",
    "current_supported_context_owner": "T6-full-text",
    "maskless_inputs": "every uniform-length input, all S >= 1; full layers also for folded mixed batches"
  },
  "optimized_encoder_layer": {
    "stage": "T3-optimized-text",
    "prefill_max_tested_with_hf_golden": 8192,
    "prefill_lengths_tested_with_hf_golden": [
      1,
      7,
      31,
      32,
      33,
      100,
      128,
      511,
      512,
      513,
      514,
      515,
      544,
      545,
      546,
      577,
      1000,
      1024,
      1025,
      1026,
      1056,
      1100,
      2048,
      2049,
      3001,
      4096,
      8191,
      8192
    ],
    "prefill_probed_beyond_target": [
      16383,
      16384,
      16385,
      32768
    ],
    "prefill_probe_result": "both layer kinds run at [16383, 16384, 16385, 32768] (batch 1); min PCC vs torch reference 0.999686",
    "prefill_probe_evidence": [
      "doc/optimized_encoder_layer/evidence/long_probe.json"
    ],
    "decode": "N/A: encoder, no KV cache",
    "kv_cache_dtype": "N/A: no KV cache",
    "capability_change": "none. Every logical length >= 1 and batch 1..32 stays supported; no public alignment restriction.",
    "layout_change": "Activations in L1 interleaved when B x S_phys <= 8192 (MLP intermediates <= 6144, input-norm outputs <= 16384), DRAM above; full-layer Q/K/V always DRAM. B=1 S<=32 uses DRAM-sharded matmuls with width-sharded L1 activations inside the layer. Uniform B>1 folds the batch into rows (windowed SDPA) per the measured fold rule. Layer input and output stay [B,1,S_phys,512] BF16 DRAM.",
    "memory_change": "Weights per 24 layers: 227 MiB (T2 300 MiB; attention and PLE BFP8, MLP BF16) plus 187 MiB DRAM-sharded copies for the S<=32 path. BFP8 MLP/PLE/head intermediates halve those activation buffers. L1 use is bounded by the row limits above (CB clash beyond them, measured).",
    "current_supported_context_owner": "T6-full-text"
  },
  "current_supported_context_basis": "Eager (untraced) path on one p150 (1x1 mesh, grid 11x10): every logical length up to 65536 runs; T7 code re-ran [8192, 16384, 32768, 65535, 65536, 131072] at batch 1 (cos vs HF fp32 in probed_contexts). The model card trains and advertises 8192.",
  "limiting_reason_detail": "Single inputs longer than 8192 that are not 256-aligned use one cached [S, S] BF16 band mask that also masks the padded keys (the model-dir SDPA kernel narrows the K loop to the window but its generated window mask, copied from stock TTNN, still ignores key padding). At 131071 tokens the mask is 32 GiB, above p150 device DRAM (T6 probe). 256-aligned lengths need no mask and ran to 524288 in T6.",
  "capacity_evidence_log": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/full_text/evidence/logs/long_probe_final.log",
  "capacity_evidence_detail": "2026-10-17 11:17:25.886 | critical |          Always | TT_FATAL: Out of Memory: Not enough space to allocate 34359738368 B DRAM buffer across 8 banks, where each bank needs to store 4294967296 B, but bank size is 4272341376 B (allocated: 155155520 B, free: 4117185856 B, largest free block: 4117185856 B) (assert.hpp:104)",
  "probe_beyond_target_reason": "Probed 16384 to 524288 at batch 1; see probed_contexts.",
  "full_text": {
    "stage": "T6-full-text; embedder and batch contract updated in T7-optimized-text",
    "embedder": "tt/embedder.py build_embedder; eager by default with max_tokens = current_supported_context; traced=True captures per-bucket slots and caps max_tokens at 8192",
    "batching": "length-sorted batches, at most 32768 tokens per batch, bucket padding up to 8192, exact length above",
    "batch_contract": "batch 1 primary; batch 2..32 tested on the 256-input corpus: T7 cos vs batch 1 >= 0.999916 (bar 0.9999; T6 measured 0.99995 with its own plans)",
    "rope_position_limit_config": 262144,
    "decode": "N/A: encoder, no KV cache"
  },
  "traced_contract": {
    "stage": "T7-optimized-text",
    "traced_supported_context": 8192,
    "basis": "build_embedder(..., traced=True) captures one trace per (bucket, batch) slot for buckets 32..8192 and caps max_tokens at the largest traced bucket. Running the eager path after capture compiles programs into memory the traces use (TT_METAL_TRACE_ALLOC_TRACKING reported 25 live buffers before replay), so a traced embedder rejects longer inputs; use an untraced embedder for 8193..65536 tokens.",
    "slots": "batch sizes 1, 2, 4, 8, 16, 32 capped at 32768 tokens per batch: 42 slots",
    "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/optimized_full_text/raw/trace_check.json"
  },
  "multimodal": {
    "stage": "06-multimodal",
    "shared_context": "Text, image, video and audio share one 8192-token text context. Media soft tokens and their markers count against it: image <|image> + S x <|image|> + <image|>; video per frame <|image> + K x <|video|> + <image|>; audio <|audio> + A x <|audio|> + <audio|>.",
    "embedder": "tt/embedder.py build_multimodal_embedder(model_dir, mesh, traced=...); mesh opened with l1_small_size=32768 (audio conv2d) and trace_region_size >= 2.5e9 when traced",
    "eager_supported": {
      "text_tokens": 65536,
      "image_budgets": [
        70,
        140,
        280,
        560,
        1120
      ],
      "multi_image_max_images_tested": 29,
      "video_max_frames_tested": {
        "budget_140": 58,
        "budget_70": 114
      },
      "audio_max_tokens_tested": 8000,
      "audio_max_seconds_tested": 320,
      "audio_truncation_false_supported": true
    },
    "traced_contract": {
      "rule": "One trace per media slot (kind, batch, physical text length, tower images/frames or audio token bucket, patches). A traced embedder runs only inputs that fit a captured slot and raises ValueError otherwise; eager after capture is not trace-safe (T7 finding).",
      "default_media_slots": [
        {
          "kind": "image",
          "batch": 1,
          "physical_len": 512,
          "tower_n": 1,
          "patches": 2520
        },
        {
          "kind": "image",
          "batch": 8,
          "physical_len": 512,
          "tower_n": 8,
          "patches": 2520
        },
        {
          "kind": "image",
          "batch": 1,
          "physical_len": 8192,
          "tower_n": 1,
          "patches": 2520
        },
        {
          "kind": "image",
          "batch": 1,
          "physical_len": 8192,
          "tower_n": 32,
          "patches": 2520
        },
        {
          "kind": "video",
          "batch": 1,
          "physical_len": 2048,
          "tower_n": 8,
          "patches": 1260
        },
        {
          "kind": "video",
          "batch": 1,
          "physical_len": 8192,
          "tower_n": 32,
          "patches": 1260
        },
        {
          "kind": "audio",
          "batch": 1,
          "physical_len": 1024,
          "tower_n": 768,
          "patches": 0
        },
        {
          "kind": "audio",
          "batch": 8,
          "physical_len": 1024,
          "tower_n": 768,
          "patches": 0
        },
        {
          "kind": "audio",
          "batch": 1,
          "physical_len": 8192,
          "tower_n": 768,
          "patches": 0
        }
      ],
      "long_media_slots_verified": [
        "image 70/140/560/1120 budgets b1",
        "29 images 8192",
        "video 64 frames 8192 (58-frame input)",
        "video 128 frames at 630 patches 8192 (114-frame input)",
        "audio 1504 tokens 2048",
        "audio 8000 tokens 8192"
      ],
      "text_slots": "T7 default 42 slots, buckets 32..8192",
      "default_media_slots_note": "kind, batch, physical text rows, tower capacity (images/frames, or audio token bucket), patches per image or frame; covers default processor settings, captions up to 8192 ids with one image or one 30 s clip, up to 32 images, 8 or 32 video frames",
      "source": "tt/embedder.py DEFAULT_MEDIA_SHAPES",
      "long_caption_and_multi_image_traced_vs_eager_bitwise": {
        "image": true,
        "video": true,
        "audio": true,
        "image_long_caption": true,
        "audio_long_caption": true,
        "multi_image_29": true
      }
    },
    "limits": [
      "one media kind per input (image list, one video, or one audio clip); mixed kinds raise ValueError",
      "one audio clip per input",
      "audio sampling rate 16000",
      "inputs longer than 8192 ids in traced mode need an untraced embedder",
      "one traced embedder per mesh: the eager guard checks only its own pipeline's trace state"
    ],
    "verified_cases_cos768_vs_hf_fp32": {
      "max_multi_image": {
        "case": "img29_cycle_640x480__soft280",
        "ids": 7774,
        "cos": 0.999932
      },
      "max_video_frames_140": {
        "case": "vid04_slideshow_58s",
        "ids": 7658,
        "cos": 0.999942
      },
      "max_video_frames_70": {
        "case": "vid05_slideshow_114s",
        "ids": 7412,
        "cos": 0.999943
      },
      "max_audio": {
        "case": "aud08_speech_320s__untruncated",
        "ids": 8004,
        "cos": 0.999945
      },
      "max_image_budget": {
        "case": "img08_document_page__soft1120",
        "cos": 0.999909
      }
    },
    "evidence": [
      "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/multimodal/raw/e2e_traced4.json",
      "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/multimodal/raw/e2e_eager4.json",
      "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/multimodal/raw/trace_check.json",
      "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/multimodal/raw/audio_shapes.json"
    ]
  },
  "tt_metal": {
    "sha": "3be67656b28e3902f0366ea8bab03c41e7e5bd6c",
    "modified": false,
    "revalidated_by": "R1-self-contained: probes, accuracy and traced slots re-run on the stock build"
  },
  "datatype_sweep": {
    "stage": "08-datatype-sweep",
    "selected_policy_id": "x02_u10_audio_attn_ffn_bfp8_hifi2",
    "selected_policy_file": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/tt/precision_policy.json",
    "kv_cache_dtype": "N/A: encoder, no KV cache; K and V live only inside one forward (bf16 SDPA inputs).",
    "capacity_effect": "Selected policy x02_u10_audio_attn_ffn_bfp8_hifi2 lowers weight bytes (audio ffn_down, audio ffn_up, audio post, audio qkv, text ple_gate, text ple_proj, vision down, vision gate, vision o, vision qkv, vision up at BFP8) and intermediate activation bytes (gate_up output, geglu output, heads_dtype bfp8, ple_gate output, ple_mul output, ple_proj output; text residual bf16). No KV cache, trace buffer layout or chunking change. No buffer grows, so the advertised and supported contexts are kept and re-verified below.",
    "probed_contexts_selected_policy": [
      {
        "context": 8192,
        "batch": 1,
        "runs": true,
        "finite": true,
        "forward_s": [
          0.136,
          0.07
        ],
        "cos_vs_hf_fp32_768": null,
        "ids_source": "synthetic corpus cycle",
        "error": null,
        "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/long_probe_8192.json"
      },
      {
        "context": 16384,
        "batch": 1,
        "runs": true,
        "finite": true,
        "forward_s": [
          0.452,
          0.163
        ],
        "cos_vs_hf_fp32_768": 0.9998667695125596,
        "ids_source": "hf_long_refs",
        "error": null,
        "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/long_probe_16384.json"
      },
      {
        "context": 32768,
        "batch": 1,
        "runs": true,
        "finite": true,
        "forward_s": [
          0.544,
          0.46
        ],
        "cos_vs_hf_fp32_768": 0.9998331148106778,
        "ids_source": "hf_long_refs",
        "error": null,
        "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/long_probe_32768.json"
      },
      {
        "context": 65535,
        "batch": 1,
        "runs": true,
        "finite": true,
        "forward_s": [
          1.621,
          1.538
        ],
        "cos_vs_hf_fp32_768": null,
        "ids_source": "synthetic corpus cycle",
        "error": null,
        "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/long_probe_65535.json"
      },
      {
        "context": 65536,
        "batch": 1,
        "runs": true,
        "finite": true,
        "forward_s": [
          1.636,
          1.467
        ],
        "cos_vs_hf_fp32_768": 0.9996995336745357,
        "ids_source": "hf_long_refs",
        "error": null,
        "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/long_probe_65536.json"
      },
      {
        "context": 131072,
        "batch": 1,
        "runs": true,
        "finite": true,
        "forward_s": [
          5.122,
          5.118
        ],
        "cos_vs_hf_fp32_768": null,
        "ids_source": "synthetic corpus cycle",
        "error": null,
        "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/long_probe_131072.json"
      }
    ],
    "largest_probed_context_that_runs": 131072,
    "current_supported_context_kept": 65536,
    "current_supported_context_reverified": true,
    "non_aligned_and_band_edge_cases": {
      "n_cases": 88,
      "cos_min_vs_hf_fp32": 0.9993343291927769,
      "lengths_include": [
        512,
        513,
        514,
        545,
        1025,
        1026,
        8191
      ],
      "evidence": "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/length_cases.json"
    },
    "traced_supported_context": 8192,
    "traced_reverified": {
      "text_slots_captured": 47,
      "all_slots_replayed": true,
      "over_context_rejected": "inputs [0] exceed the supported context of 8192 tokens",
      "multimodal_captures": 51,
      "multimodal_result": "pass",
      "evidence": [
        "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/trace_check.json",
        "/home/hous/dev/embedding-gemma-2/tt-metal/models/autoports/google_embeddinggemma_2/doc/datatype_sweep/post_selection/raw/multimodal/trace_check.json"
      ]
    },
    "construction_paths_use_same_max_context": "build_embedder / build_multimodal_embedder set max_tokens = supported_tokens() (eager) or the largest traced bucket 8192 (traced) independently of the precision policy; the policy file has no context field."
  }
}