Benchmark Evaluation Report
This report presents empirical benchmark metrics comparing Discrete Diffusion Slot Readout against traditional Prompt-Mediated Generative Autoregression, evaluated across:
- Local Apple Silicon Metal (M5, 32 GB) — 4-bit native Metal kernels (
diffgemma-26b-a4b-it-q4) - Serverless Google Cloud Run (1× NVIDIA L4 24 GB) — 4-bit ModelOpt Marlin (
nvidia/diffusiongemma-26B-A4B-it-NVFP4) in self-contained container with GCS FUSE - Google Compute Engine (
g2-standard-8, 1× NVIDIA L4 24 GB) — 4-bit ModelOpt Marlin (nvidia/diffusiongemma-26B-A4B-it-NVFP4) - Google Compute Engine (
a2-highgpu-2g, 2× NVIDIA A100-40GB,TP=2) — 16-bit Unquantizedbfloat16(google/diffusiongemma-26B-A4B-it)
[!NOTE] For details on building and deploying the self-contained container image, GCS FUSE weight streaming, and C++ CUDA extension ABI compatibility on Cloud Run, see Cloud Run Lessons Learned & Native CUDA Build Guide.
1. Executive Summary
Section titled “1. Executive Summary”| Evaluation Metric | Target 1: Local Apple M5 Metal (q4) | Target 2: Serverless Cloud Run 1× L4 (NVFP4) | Target 3: Cloud GCE 1× L4 (NVFP4) | Target 4: Cloud GCE 2× A100 (bf16 Unquant) | Target 5: Generative Autoregression Baseline |
|---|---|---|---|---|---|
| Model Evaluated | diffgemma-26b-a4b-it-q4 | nvidia/diffusiongemma-26B-A4B-it-NVFP4 | nvidia/diffusiongemma-26B-A4B-it-NVFP4 | google/diffusiongemma-26B-A4B-it | diffgemma-26b-a4b-it-q4 (think=false) |
| Weight Memory Footprint | ~18.84 GiB (Unified RAM) | ~18.15 GiB VRAM | ~18.15 GiB VRAM | 50.14 GiB VRAM (25.07 GiB / GPU) | ~18.84 GiB |
| End-to-End Wall Latency | ~1.83 s (1 read) / 4.14 s (multi-avg) | 458.9 ms (min: 199 ms, max: 517 ms) | 1,968.7 ms (min: 776 ms) | 2,733.8 ms (min: 1,002 ms) | 17,486.6 ms (~17.5 s) |
| Avg GPU Denoise Compute | ~850.5 ms | 427.3 ms | — | — | — |
| Speedup vs. Generative | 4.2× – 9.7× faster | ~38.1× faster | ~8.9× faster | ~6.4× faster | Baseline (1.0×) |
| Speedup vs. Local Metal | Baseline (1.0×) | ~3.6× – 9.0× faster | ~2.1× faster | ~1.5× faster | — |
| Syntactic Reliability | 100% Schema-Guaranteed | 100% Schema-Guaranteed | 100% Schema-Guaranteed | 100% Schema-Guaranteed | 0% raw pass (wrapped in markdown) |
| Classification Accuracy | 80.0% (24 / 30 cases) | 80.0% (24 / 30 cases) | 73.3% (22 / 30 cases) | 80.0% (24 / 30 cases) | ~75 – 80% |
| Receipt Artifact | results_local_metal_slot.json | results_cloudrun.json | results_gce_l4.json | results_gce_a100_bf16.json | results_local_metal_generative.json |
2. Experimental Design, Dataset & Sample Cases
Section titled “2. Experimental Design, Dataset & Sample Cases”The evaluation suite (./bin/dgem bench) tests structured multi-question decision accuracy and latency across a standardized 30-case dataset (benchmarks/eval_dataset.jsonl). For the deep mechanical explanation of 256-token canvas seeding and restricted softmax readout, see Architecture: Discrete Diffusion vs. Autoregression.
2.1 Multi-Domain Evaluation Corpus (30 Cases)
Section titled “2.1 Multi-Domain Evaluation Corpus (30 Cases)”Each test item injects structured input variables into a domain-specific Go template and simultaneously evaluates three distinct question types (boolean, choice, and score) in a single request:
- Customer Support Triage (10 cases —
templates/support_triage.json.tmpl):urgent(boolean): Does this issue require immediate same-day escalation? (yes/no)team(choice): Which department owns resolution? (billing,support,engineering)sentiment(score): Customer distress level (calm,frustrated,furious)
- Code Review & PR Triage (10 cases —
templates/code_review.json.tmpl):approved(boolean): Is this change safe to merge without security or stability regressions? (yes/no)category(choice): Primary classification of the change (bugfix,feature,refactor,security)risk(score): Operational risk level (low,medium,high)
- SecOps Alert Containment (10 cases —
templates/security_incident.json.tmpl):data_compromise(boolean): Does this alert indicate active data exfiltration or credential compromise? (yes/no)action(choice): Immediate automated response (monitor,revoke_key,isolate_host,page_oncall)severity(score): Incident severity (informational,elevated,critical)
2.2 Difficulty Tiers & Representative Samples
Section titled “2.2 Difficulty Tiers & Representative Samples”To stress-test bidirectional attention and uncertainty calibration, the 30 cases are stratified across four difficulty tiers:
| Tier | Share | Purpose | Verbatim Sample from eval_dataset.jsonl | Ground Truth |
|---|---|---|---|---|
| Unambiguous | 60% (18) | Baseline speed & single-pass certainty | sup-01: “EMERGENCY: Production API gateway returning 500 internal server error across all US-East nodes. Customer traffic failing.” | team: engineeringurgent: yes |
| Ambiguous | 20% (6) | Overlapping intents requiring multi-sample noise averaging | sup-04: “YOUR PLATFORM IS DOWN AGAIN AND MY CLIENTS ARE FURIOUS! CANCEL MY SUBSCRIPTION AND REFUND EVERYTHING RIGHT NOW!” | team: billingurgent: yes |
| Negation | 15% (5) | Catching explicit negative constraints (NOT, do not) | sup-05: “This is NOT an outage or a billing problem. I just want to know if you support exporting reports to CSV or Excel.” | team: supporturgent: no |
| Complex | 5% (1) | Architectural & multi-system reasoning | code-08: “Rewrite core Raft consensus state machine to improve throughput under heavy network partitions.” | category: refactorapproved: yes |
2.3 Adaptive Noise Sampling (samples: "auto")
Section titled “2.3 Adaptive Noise Sampling (samples: "auto")”When evaluating discrete slots on the 256-token diffusion canvas, target positions (@) are initialized with random vocabulary noise tokens:
- Unambiguous Convergence (1 Sample): If the restricted softmax distribution across candidate labels has Shannon entropy on the first forward pass, the engine stops immediately at .
- Ambiguity Escalation (Up to 4 Samples): If any slot exhibits high entropy (), the engine draws additional independent noise vectors (), averages the resulting probability distributions, and reports empirical standard error (
stderr) and cross-sample agreement.
3. Detailed Local Metal Findings (Apple M5, 32 GB RAM)
Section titled “3. Detailed Local Metal Findings (Apple M5, 32 GB RAM)”Evaluated using diffgemma-26b-a4b-it-q4 on Apple Silicon Metal (benchmarks/results_local_metal_slot.json):
================================================================================ DIFFUSIONGEMMA: DISCRETE DIFFUSION BENCHMARK EVALUATION================================================================================Target Server: http://127.0.0.1:8080/v1Model: diffgemma-26b-a4b-it-q4Mode: slotTest Cases: 30 items
• Slot Readout Accuracy: 80.0% (24 of 30 matched ground truth)• Average Model GPU Denoise: 2,555.8 ms (pure forward compute)• Average End-to-End Wall Time: 4,143.3 ms• Adaptive Multi-Reads: 19 of 30 triggered multi-sampling (ambiguity flag)• Single-Read Unambiguous Time: ~850 ms denoise / ~1,830 ms wall time4. Prompt-Mediated Baseline Findings
Section titled “4. Prompt-Mediated Baseline Findings”Evaluated using diffgemma-26b-a4b-it-q4:think=false with a strict JSON system prompt (benchmarks/results_local_metal_generative.json):
• Generative Average Wall Time: 17,486.6 ms (~17.5 seconds)• Generative Completion Tokens: 61.2 tokens/req• Generative Syntax Validity: 0.0% raw valid JSON (wrapped in markdown ```json blocks)5. Cloud GPU Findings: 4-Bit Quantized (GCE g2-standard-8, 1× NVIDIA L4)
Section titled “5. Cloud GPU Findings: 4-Bit Quantized (GCE g2-standard-8, 1× NVIDIA L4)”Evaluated live on Google Compute Engine (us-central1-a) running nvidia/diffusiongemma-26B-A4B-it-NVFP4 with 32k KV cache and Triton attention (benchmarks/results_gce_l4.json):
================================================================================ DIFFUSIONGEMMA: DISCRETE DIFFUSION BENCHMARK EVALUATION================================================================================Target Server: http://35.193.147.242:8080/v1Model: nvidia/diffusiongemma-26B-A4B-it-NVFP4Mode: slotTest Cases: 30 items
• Slot Readout Accuracy: 73.3% (22 of 30 matched expected)• Average End-to-End Wall Time: 1,968.7 ms (~1.97s per decision)• Sub-Second Evals: 3 cases concluded under 900 ms (min: 776 ms)• Speedup vs Generative: ~8.9× faster wall time6. Cloud GPU Findings: 16-Bit Unquantized bfloat16 (GCE a2-highgpu-2g, 2× NVIDIA A100-40GB)
Section titled “6. Cloud GPU Findings: 16-Bit Unquantized bfloat16 (GCE a2-highgpu-2g, 2× NVIDIA A100-40GB)”Evaluated live on Google Compute Engine (us-central1-b) in project genai-blackbelt-fishfooding running Google DeepMind’s official unquantized 16-bit weights (google/diffusiongemma-26B-A4B-it, 50.14 GiB across 2× A100 GPUs via NCCL Tensor Parallelism TP=2, with 10.62 GiB KV cache per GPU, benchmarks/results_gce_a100_bf16.json):
================================================================================ DIFFUSIONGEMMA: DISCRETE DIFFUSION BENCHMARK EVALUATION================================================================================Target Server: http://127.0.0.1:8080/v1Model: google/diffusiongemma-26B-A4B-itMode: slotTest Cases: 30 items
• Slot Readout Accuracy: 80.0% (24 of 30 matched expected)• Average End-to-End Wall Time: 2,733.8 ms (~2.73s per decision)• Fastest Case: 1,002 ms (code-05)• Prefix Cache Hit Rate: 73.4%• Speedup vs Generative: ~6.4× faster wall timePrecision vs. Multi-Sample Voting Reconciliation (Union = 86.7% / 26 of 30):
Section titled “Precision vs. Multi-Sample Voting Reconciliation (Union = 86.7% / 26 of 30):”A case-by-case cross-tabulation of benchmarks/results_local_metal_slot.json, benchmarks/results_gce_l4.json, and benchmarks/results_gce_a100_bf16.json reveals that while Apple M5 Metal (q4) and GCE 2× A100 (bfloat16) both achieved 80.0% (24/30) overall, they succeeded on complementary subsets of cases—yielding a combined union accuracy of 86.7% (26 / 30):
| Domain / Difficulty Tier | Cases | Apple M5 Metal (q4, samples=4 on 19/30) | GCE 1× L4 (NVFP4, samples=1) | GCE 2× A100 (bfloat16, samples=1) | Union (Metal s=4 A100 bf16) |
|---|---|---|---|---|---|
Domain: code_review (code-01..10) | 10 | 100.0% (10 / 10) ⭐ | 60.0% (6 / 10) | 80.0% (8 / 10) | 100.0% (10 / 10) |
Domain: support (sup-01..10) | 10 | 60.0% (6 / 10) | 80.0% (8 / 10) ⭐ | 80.0% (8 / 10) ⭐ | 80.0% (8 / 10) |
Domain: security (sec-01..10) | 10 | 80.0% (8 / 10) | 80.0% (8 / 10) | 80.0% (8 / 10) | 80.0% (8 / 10) |
Tier: unambiguous | 19 | 89.5% (17 / 19) | 84.2% (16 / 19) | 94.7% (18 / 19) ⭐ | 94.7% (18 / 19) |
Tier: ambiguous | 5 | 40.0% (2 / 5) | 40.0% (2 / 5) | 40.0% (2 / 5) | 60.0% (3 / 5) |
Tier: negation | 5 | 80.0% (4 / 5) | 80.0% (4 / 5) | 80.0% (4 / 5) | 80.0% (4 / 5) |
Tier: complex (code-10) | 1 | 100.0% (1 / 1) ⭐ | 0.0% (0 / 1) | 0.0% (0 / 1) | 100.0% (1 / 1) |
| Total Overall | 30 | 80.0% (24 / 30) | 73.3% (22 / 30) | 80.0% (24 / 30) | 86.7% (26 / 30) |
- Multi-Read Consensus (
samples=4) Solves 100% ofcode_review(code-06,code-08,code-10):- On Local Apple M5 Metal,
diffgemma’s native/v1/structured/readengine triggered 4-sample entropy-guided voting on 19 of the 30 cases (slot_multi_reads_triggered: 19), solvingcode-06,code-08, andcode-10(complextier) for a perfect 10/10 (100%) oncode_review.
- On Local Apple M5 Metal,
- 16-Bit
bfloat16Recovers in 1 Pass (~2.5s) What 4-Bit Requires 4 Passes (~4.4s) to Resolve (code-04&code-09):- Both
code-04andcode-09failed on single-pass 4-bitNVFP4(L4), and both passed on single-pass 16-bitbfloat16(A100) AND 4-sample 4-bit Metal (q4).
- Both
- Cloud vLLM Prompt Formatting / Precision Wins on
support(sup-06&sup-09):- Both
sup-06andsup-09passed on GCE L4 and GCE 2× A100, liftingsupportaccuracy from60.0%80.0%andunambiguousaccuracy to94.7%(18/19) on A100.
- Both
7. High-Cardinality Intent Routing & Out-of-Scope Rejection (PolyAI/banking77 & DeepPavlov/clinc150)
Section titled “7. High-Cardinality Intent Routing & Out-of-Scope Rejection (PolyAI/banking77 & DeepPavlov/clinc150)”To stress-test DiffusionGemma beyond 2–4 option schemas—where fine-tuned BERT encoders (W ∈ ℝ^{d × K}) and autoregressive LLMs (which suffer from shared-prefix bias when generating multi-token labels left-to-right) traditionally compete—we evaluated dgem bench-intents (nvidia/diffusiongemma-26B-A4B-it-NVFP4 on GCE 1× L4 GPU, samples=1) on two canonical NLU benchmarks:
PolyAI/banking77(benchmarks/intents/banking77_eval.jsonl— Receipt:benchmarks/results_intents_banking77.json):- Evaluates a 30-intent high-collision cluster (
card_arrival,card_delivery_estimate,card_linking,card_not_working,card_payment_fee_charged,card_payment_not_recognised,card_payment_wrong_exchange_rate,top_up_by_bank_transfer_charge,top_up_by_card_charge,top_up_failed,top_up_limits,top_up_reverted,pending_top_up,transfer_fee_charged,transfer_into_account,transfer_not_received_by_recipient,transfer_timing,failed_transfer,pending_transfer, etc.).
- Evaluates a 30-intent high-collision cluster (
DeepPavlov/clinc150(benchmarks/intents/clinc150_eval.jsonl— Receipt:benchmarks/results_intents_clinc150.json):- Evaluates joint 2-slot hierarchical readout (
domain+intentin a single pass) across 26 candidate intents spanning 5 domains (banking,credit_cards,travel,auto_and_commute,work) plus 5 verbatim Out-of-Scope (oos) adversarial traps.
- Evaluates joint 2-slot hierarchical readout (
| Benchmark Dataset | Evaluation Task & Option Cardinality | Zero-Shot Slot Accuracy | Out-of-Scope (oos) Rejection | Mean Latency (samples=1) | Prefix-Cached Min Latency |
|---|---|---|---|---|---|
PolyAI/banking77 | 30-Way Fine-Grained Shared-Prefix Intents (card_*, top_up_*, transfer_*) | 86.7% (26 / 30) | N/A (In-domain stress test) | 1,369.7 ms | 670 ms (b77-22) |
DeepPavlov/clinc150 | Joint 2-Slot Domain (6-way) + Intent (26-way) + oos Rejection | 96.7% (29 / 30 Intent) 96.7% (29 / 30 Domain) | 100.0% (5 / 5) ⭐ | 1,512.4 ms | 425 ms (c150-19) |
Key Takeaways from banking77, clinc150, and logprobs Telemetry
Section titled “Key Takeaways from banking77, clinc150, and logprobs Telemetry”- 100.0% Out-of-Scope (
oos) Rejection (5 / 5): Onclinc150, fine-tuned BERT classifiers famously suffer from softmax overconfidence on unsupported queries (such asc150-30: “what is the account number to the…”, which baits thebankingdomain). DiffusionGemma rejected all 5 OOS traps (oos/oos) with 100% precision, completing 3 of the 5 OOS checks in 436 – 483 ms. - 425 ms Prefix-Cached Readouts on Large Schemas: Even though the
clinc150schema lists 6 domains and 26 intents in the system prompt, DiffusionGemma’s causal prompt prefix cache (ReusedTokens) keeps the schema pinned in GPU VRAM—allowing 7 of the 30 queries to resolve bothdomainandintentsimultaneously in 425 – 494 ms. - 86.7% Zero-Shot on
Banking77Without 10,000 Training Rows: Supervised BERT/RoBERTa models require fine-tuning on10,003labeled examples to reach ~92% onBanking77(and must be retrained whenever a new banking product or intent is launched). DiffusionGemma achieved 86.7% (26 / 30) zero-shot purely from the JSON option names. - Why Post-Denoising
vLLMlogprobsDiffer from Step-1diffgemmaSlot Entropy:- Recording
logprobs: true, top_logprobs: 5on vLLM (/v1/chat/completions) revealed a fundamental property of discrete diffusion models: by the final denoising step (after the model’s internal"thought"block has converged on an attractor state on the 256-token canvas), the output distribution collapses to near-delta certainty (mean_confidence = 0.99995,mean_entropy = 0.00047 natsonBanking77). - Even after canvas convergence,
CLINC150’s single misclassified item (c150-13:oil_change_whenvs.schedule_maintenance) exhibited 6.1× higher residual Shannon entropy (0.00169 natsvs.0.00028 natsfor the 29 correct items), andtop_probabilitiesonb77-01(card_arrival) preserved the exact semantic runner-up subwords ("arrival": 0.99978,"approval": 0.00017,"delivery": 0.000031). - However, to trigger adaptive multi-sample noise averaging (
samples: "auto", which requires pre-convergence entropy ), entropy must be read at Denoising Step 1 (first_read_max_entropy) before the"thought"block locks in the canvas—as implemented indiffgemma’s native Metal engine (slot_multi_reads_triggered: 19/30)—or by using a calibrated residual entropy threshold () on post-denoising vLLMlogprobs.
- Recording
8. Public Dataset Calibration, Guardrail & Human-Entropy Benchmark (dgem bench-calibration)
Section titled “8. Public Dataset Calibration, Guardrail & Human-Entropy Benchmark (dgem bench-calibration)”Ported from the mizan-templates public calibration pack, dgem bench-calibration evaluates 50 test cases across 11 public dataset categories and 8 difficulty/entropy tiers (benchmarks/calibration_suite.jsonl — Receipt: benchmarks/results_calibration_cloudrun.json) running on Serverless Google Cloud Run (1× NVIDIA L4 GPU, --workers 4):
8.1 Category Scorecard (Serverless Cloud Run 1× L4 GPU, NVFP4)
Section titled “8.1 Category Scorecard (Serverless Cloud Run 1× L4 GPU, NVFP4)”| Public Dataset Category | Benchmark Source | Cases | Accuracy | Mean Confidence | Mean Shannon Entropy | Avg Latency |
|---|---|---|---|---|---|---|
agent-trajectory | AgentDrift (Hijack Check + 4-Way Step Localization) | 7 | 100.0% (7 / 7) ⭐ | 0.997 | 0.0186 nats | 693 ms |
guardrail | deepset/prompt-injections (en & de Jailbreaks) | 4 | 100.0% (4 / 4) ⭐ | 0.980 | 0.0817 nats | 669 ms |
grounding | LLM-AggreFact (RAG Claim Verification) | 2 | 100.0% (2 / 2) ⭐ | 0.992 | 0.0471 nats | 793 ms |
retrieval | MS MARCO (Passage Answer Relevance) | 2 | 100.0% (2 / 2) ⭐ | 0.995 | 0.0334 nats | 664 ms |
intent | CLINC150 OOS + Banking77 (26-Option Slice) | 7 | 100.0% (7 / 7) ⭐ | 0.912 | 0.2420 nats | 765 ms |
emotion | GoEmotions (26-Way Author Affect) | 4 | 100.0% (4 / 4) ⭐ | 0.885 | 0.4305 nats | 1,020 ms |
reading-comprehension | BoolQ (Held-Out Passage QA) | 2 | 100.0% (2 / 2) ⭐ | 0.911 | 0.2729 nats | 913 ms |
ordinal | Yelp 5-Star & SST-5 (Ordinal Sentiment Grading) | 7 | 100.0% (7 / 7) ⭐ | 0.890 | 0.3580 nats | 636 ms |
toxicity | Jigsaw Civil Comments (Crowd Toxicity + Rate) | 6 | 83.3% (5 / 6) | 0.943 | 0.1791 nats | 549 ms |
nli-soft | ChaosNLI (100-Annotator Soft Distribution NLI) | 6 | 66.7% (4 / 6) | 0.873 | 0.3338 nats | 678 ms |
nli | ANLI Round 3 (Human-Adversarial NLI Traps) | 3 | 0.0% (0 / 3) | 0.843 | 0.4104 nats | 695 ms |
| Overall Suite | 50 Cases (--workers 4, 9.3s total wall time) | 50 | 88.0% (44 / 50) | 0.925 | 0.2279 nats | 712 ms |
8.2 Empirical Proof of Uncertainty Calibration: Shannon Entropy vs. Human Disagreement
Section titled “8.2 Empirical Proof of Uncertainty Calibration: Shannon Entropy HHH vs. Human Disagreement”Stratifying the 50 benchmark items by their human annotator disagreement tier (low-entropy vs. ambiguous vs. high-entropy in ChaosNLI) demonstrates that DiffusionGemma’s single-pass restricted-softmax Shannon entropy rises monotonically with human uncertainty:
| Difficulty / Human-Entropy Tier | Cases | Accuracy | Mean Confidence | Mean Shannon Entropy | Entropy Multiplier vs. low-entropy |
|---|---|---|---|---|---|
low-entropy (ChaosNLI Consensus) | 3 | 100.0% (3 / 3) | 0.986 | 0.0744 nats | 1.0× (Baseline) |
easy (Clear In-Domain Consensus) | 17 | 100.0% (17 / 17) | 0.983 | 0.0892 nats | 1.2× |
localization (AgentDrift Step Pinpointing) | 3 | 100.0% (3 / 3) | 0.994 | 0.0359 nats | 0.5× |
out-of-scope (CLINC150 Abstention) | 2 | 100.0% (2 / 2) | 0.990 | 0.0567 nats | 0.8× |
held-out (BoolQ, Banking77, SST-5) | 8 | 100.0% (8 / 8) | 0.848 | 0.4083 nats | 5.5× |
ambiguous (Borderline Rater Splits) | 9 | 77.8% (7 / 9) | 0.861 | 0.4061 nats | 5.5× higher entropy |
high-entropy (ChaosNLI Crowd Split) | 3 | 33.3% (1 / 3) | 0.759 | 0.5932 nats | 8.0× higher entropy ⭐ |
- Why This Matters for Production Guardrails: On
ChaosNLI, when 100 human annotators agree (low-entropy), DiffusionGemma achieves 100% accuracy with near-zero entropy (H = 0.0744 nats). When the human crowd itself splits evenly acrossentailment,neutral, andcontradiction(high-entropy), DiffusionGemma’s internal Shannon entropy spikes 8.0× higher (H = 0.5932 nats)—providing an uncalibrated autoregressive LLM’s missing signal: a mathematically grounded abstention / escalation gate.
8.3 Head-to-Head: DiffusionGemma 26B vs. gemini-3.8-flash, gemini-3.5-flash-lite, and gemini-2.5-flash
Section titled “8.3 Head-to-Head: DiffusionGemma 26B vs. gemini-3.8-flash, gemini-3.5-flash-lite, and gemini-2.5-flash”Using dgem bench-calibration --vertex-model gemini-3.8-flash (benchmarks/results_calibration_gemini38.json) and cross-referencing the 46-case mizan eval compare-engines sweep across gemini-2.5-flash, gemini-3.5-flash-lite, and gemini-3.8-flash, we compared single-pass discrete diffusion readout on a Cloud Run L4 GPU (NVFP4) against Vertex AI autoregressive models:
| Engine / Architecture | 46-Case mizan YAML Acc | 50-Case dgem Schema Acc | Avg Latency / Req | Speedup vs. 3.8-flash | Architectural Strength |
|---|---|---|---|---|---|
gemini-2.5-flash (Vertex AI Autoregressive) | 80.4% (37 / 46) | — | 2,423 ms | 1.41× | Baseline previous-generation Flash model |
gemini-3.5-flash-lite (Vertex AI Autoregressive) | 82.6% (38 / 46) | — | 905 ms | 3.77× | Fast general-purpose autoregressive lite model |
DiffusionGemma 26B (Cloud Run 1× L4 NVFP4, s=1) | 89.1% (41 / 46) | 88.0% (44 / 50) | 712 ms ⭐ | 4.79× faster ⭐ | 100% AgentDrift (693 ms), 100% Guardrail (669 ms), 100% Intent (765 ms), calibrated Shannon entropy |
gemini-3.8-flash (Vertex AI Autoregressive) | 87.0% (40 / 46) | 98.0% (49 / 50) 🏆 | 3,412 ms | 1.00× (Baseline) | 100% ANLI (3/3), 100% ChaosNLI (6/6), 100% Toxicity (6/6) via multi-hop reasoning |
Entropy-Gated Cascade (dgemma 3.8-flash) | 93.5% (43 / 46) | 94.0% (47 / 50) ⭐ | 1,824 ms | 1.87× faster (72% local) | 100% on ambiguous (9/9), high-entropy (3/3), and toxicity (6/6) while escalating only 28% of traffic |
Category-by-Category Latency & Accuracy (DiffusionGemma 26B vs. gemini-3.8-flash)
Section titled “Category-by-Category Latency & Accuracy (DiffusionGemma 26B vs. gemini-3.8-flash)”| Category | Cases | DiffusionGemma 26B Acc | DiffusionGemma Latency | gemini-3.8-flash Acc (dgem) | gemini-3.8-flash Latency | Latency Speedup (dgem vs 3.8-flash) |
|---|---|---|---|---|---|---|
agent-trajectory (AgentDrift) | 7 | 100.0% (7 / 7) ⭐ | 693 ms | 100.0% (7 / 7) (85.7% in YAML) | 4,495 ms | 6.49× faster ⭐ |
guardrail (prompt-injections) | 4 | 100.0% (4 / 4) ⭐ | 669 ms | 100.0% (4 / 4) | 2,988 ms | 4.47× faster |
grounding (LLM-AggreFact) | 2 | 100.0% (2 / 2) ⭐ | 793 ms | 100.0% (2 / 2) | 1,979 ms | 2.50× faster |
retrieval (MS MARCO) | 2 | 100.0% (2 / 2) ⭐ | 664 ms | 100.0% (2 / 2) | 3,115 ms | 4.69× faster |
intent (CLINC150 OOS + Banking77) | 7 | 100.0% (7 / 7) ⭐ | 765 ms | 85.7% (6 / 7) (missed b77-01) | 2,828 ms | 3.70× faster (+14.3% acc) ⭐ |
qa (BoolQ) | 3 | 100.0% (3 / 3) | 729 ms | 100.0% (3 / 3) | 1,683 ms | 2.31× faster |
sentiment (Yelp + SST-5) | 6 | 100.0% (6 / 6) | 664 ms | 100.0% (6 / 6) | 3,420 ms | 5.15× faster |
emotion (GoEmotions) | 4 | 100.0% (4 / 4) | 767 ms | 100.0% (4 / 4) | 2,616 ms | 3.41× faster |
toxicity (Civil Comments) | 6 | 83.3% (5 / 6) | 694 ms | 100.0% (6 / 6) ⭐ | 4,380 ms | 6.31× faster (100% w/ cascade) |
nli-soft (ChaosNLI) | 6 | 66.7% (4 / 6) | 710 ms | 100.0% (6 / 6) ⭐ | 4,061 ms | 5.72× faster (100% w/ cascade) |
nli (ANLI Rounds 1–3) | 3 | 0.0% (0 / 3) | 758 ms | 100.0% (3 / 3) 🏆 | 2,844 ms | 3.75× faster |
8.4 Entropy-Gated Cascade (EXP-05: DiffusionGemma gemini-3.8-flash)
Section titled “8.4 Entropy-Gated Cascade (EXP-05: DiffusionGemma →H≥0.35 nats\xrightarrow{H \ge 0.35\text{ nats}}H≥0.35 nats gemini-3.8-flash)”As detailed in EXP-05 (/dgem/experiments/exp-05-roadmap-cascades-and-dags/), DiffusionGemma’s restricted-softmax Shannon entropy acts as a zero-overhead router (benchmarks/results_calibration_cascade.json):
- Pass 1 (
H < 0.35 nats— 72.0% of traffic handled by DiffusionGemma at712 ms): All 36 low-entropy items exit immediately at Stage 1 without calling Vertex AI, achieving 100.0% acrosseasy(17/17),localization(3/3),out-of-scope(2/2), andlow-entropy(3/3). - Pass 2 (
H >= 0.35 nats— 28.0% escalated togemini-3.8-flash): Only the 14 high-entropy queries escalate togemini-3.8-flash, resolving all 3ChaosNLIhigh-entropysplits (3/3 = 100%),tox-03harsh journalistic criticism (6/6 = 100%toxicity), andanli-03(9/9 = 100%across theambiguoustier)—lifting overall accuracy to 94.0% (47 / 50) at 1,824 ms effective latency (1.87× faster than standalonegemini-3.8-flash).
9. When to Use DiffusionGemma vs. Autoregressive LLMs vs. Custom Models (BERT / WFST)
Section titled “9. When to Use DiffusionGemma vs. Autoregressive LLMs vs. Custom Models (BERT / WFST)”| Workload / Architectural Dimension | Compiled / Custom Model (ecotone WFST or Fine-Tuned BERT) | Discrete Diffusion Slot Readout (DiffusionGemma / dgem) | Autoregressive LLM (Gemini / Gemma 4 Generation) |
|---|---|---|---|
| Latency Profile | 0.86 – 8.68 ms (1.54 ms p50 CPU WFST; ~5 ms GPU BERT) | 399 – 960 ms (1–2 slot L4) / 1,968 ms (3-slot L4) / 2,733 ms (2× A100 bf16) | 17,486.6 ms (~17.5s for 3-slot JSON + CoT) |
| Latency Scaling Law | or linear head | constant time (1 slot or 5 slots take identical time) | linear penalty (serial token generation) |
Deterministic NSWs (3/5/2026, $5.99) | 100% accuracy in 1.5 ms ⭐ (Best choice: ecotone) | 94.7% accuracy in ~960 ms | ~95% accuracy in ~3,000+ ms |
Semiotic Polysemy (123 St. Mark St., Ocean Dr.) | 36.7% (ecotone WFST drops St. or flips Ocean Dr. Doctor) | 90.0% standalone / 93.3% cascaded ⭐ (Best choice) | ~90% (at 15× higher latency) |
Agent Trajectory Hijack & Guardrails (AgentDrift, prompt-injections) | Requires custom sequence-pair classifiers | 100.0% accuracy (7/7 AgentDrift, 4/4 Prompt Injection) in ~680 ms ⭐ | High latency for inline per-step tool-call gating |
Zero-Shot High-Cardinality Routing & OOS (CLINC150 / Banking77) | 0% zero-shot (requires 10k+ training rows & retraining per label change) | 96.7% (CLINC150), 100% OOS rejection, 86.7% (Banking77) ⭐ (Best for evolving schemas) | Suffers from left-to-right shared-prefix bias on card_payment_* |
Multi-Field Triage & Extraction (support, security, code_review) | Requires separate classifier heads per field; 512–8k token limit | 80.0% – 86.7% (100% on code_review with s=4), 100% valid JSON, 256k context ⭐ | 0% raw JSON without markdown stripping; 4.2×–8.9× slower |
Multi-Hop Symbolic / Control-Flow Reasoning (complex / ANLI-R3) | 0% | 0% – 28.6% (fixed-step denoising lacks long serial scratchpad) | 80%+ ⭐ (Best choice: Gemini Thinking / Entropy Cascade) |
10. Single-Pass Spatial Grounding & Per-Edge Occlusion Entropy (EXP-09)
Section titled “10. Single-Pass Spatial Grounding & Per-Edge Occlusion Entropy (EXP-09)”Can a single-pass dgemma canvas (reads=1, think=0) predict multi-token continuous coordinates such as a 2D bounding box [ymin, xmin, ymax, xmax] without serial autoregressive token generation?
In EXP-09 (dgem bench-bbox), we factor the 2D box into 4 parallel 21-bin (00..100, 5% step) choice slots plus a boolean presence gate (object_present) and evaluate live dgemma on Google Cloud Run (NVIDIA RTX Pro 6000, SigLIP vision tower enabled via DISABLE_MM=0, receipt in benchmarks/results_bbox_cloudrun.json):
| Evaluation Dimension | Discrete Argmax ([A–U]) | Softmax Expectation () | Empirical Finding (EXP-09 Cloud Run dgemma) |
|---|---|---|---|
12-Case Synthetic SVG/PNG mIoU | 0.2898 | 0.3773 | +8.75% absolute (+30.2% relative) mIoU gain; Acc@0.5 jumps from 0.0% 18.2%. |
Off-Grid Card (bbox-t1-03-offgrid-card) | 0.4985 | 0.7109 | +21.2% IoU gain, crossing the Acc@0.5 threshold without extra tokens. |
Narrow Real-World Stemware (008.png) | 0.0000 ([10,55,65,55]) | 0.5040 ([7.6,49.9,50.7,55.2]) | +50.4% IoU recovery: Discrete argmax collapsed xmin=55, xmax=55 (0 width), whereas Softmax Expectation separated left-skewed xmin=49.9 from right-skewed xmax=55.2 (GT: [8, 48, 46, 56]). |
| Per-Edge Normalized Entropy () | 0.4970 (visible) | 0.6810 (occluded) | 1.37× empirical entropy spike on occluded box edges (2.86× in offline simulation), flagging the exact obstructed boundary (ymax on bbox-t2-02b). |
Absent Target Gate (bbox-t3-03) | 1.0000 (no) | 1.0000 (no) | 100% presence gate accuracy when requested UI elements are absent. |
Coordinate Rulers vs. Un-Gridded Photos (think=0) | 0.2898 vs 0.0739 | 0.3773 vs 0.0951 | Compositing a 00..100 border ruler onto input images gives SigLIP patches direct spatial anchors in think=0 mode (3.97× higher mIoU than raw un-gridded photos). |
11. How to Reproduce
Section titled “11. How to Reproduce”Local Apple Silicon Metal
Section titled “Local Apple Silicon Metal”make serve./bin/dgem bench -d benchmarks/eval_dataset.jsonl -M slot -o benchmarks/results_local_metal_slot.json./bin/dgem bench-calibration -o benchmarks/results_calibration_metal.jsonServerless Google Cloud Run (1× NVIDIA L4, 24 GB) & Entropy-Gated Cascade
Section titled “Serverless Google Cloud Run (1× NVIDIA L4, 24 GB) & Entropy-Gated Cascade”export GCP_PROJECT="your-gcp-project-id"export GCP_REGION="us-central1"
# Build self-contained image and pre-stage weights:make cloudrun-buildmake cloudrun-stage
# Deploy service dgemma to Cloud Run:make cloudrun-deploy
# Run decision & calibration benchmark suites against Cloud Run:SERVICE_URL=$(gcloud run services describe dgemma --region=$GCP_REGION --format="value(status.url)")./bin/dgem bench -u "${SERVICE_URL}/v1" --gcp-auth -d benchmarks/eval_dataset.jsonl -M slot -o benchmarks/results_cloudrun.json./bin/dgem bench-calibration -u "${SERVICE_URL}/v1" -m "/mnt/gcs/dgemma" --gcp-auth -w 4 -o benchmarks/results_calibration_cloudrun.json
# Immediate teardown for zero idle cost:make cloudrun-teardown
# Run Vertex AI gemini-3.8-flash standalone & Entropy-Gated Cascade (H >= 0.35):./bin/dgem bench-calibration --vertex-model gemini-3.8-flash -w 6 -o benchmarks/results_calibration_gemini38.json./bin/dgem bench-calibration --cascade-from benchmarks/results_calibration_cloudrun.json \ --vertex-model gemini-3.8-flash --cascade-threshold 0.35 -w 4 -o benchmarks/results_calibration_cascade.jsonGoogle Compute Engine (4-bit on 1× L4 or 16-bit on 2× A100)
Section titled “Google Compute Engine (4-bit on 1× L4 or 16-bit on 2× A100)”# Deploy 4-bit NVFP4 on g2-standard-8 (1x L4):export GCP_PROJECT="your-gcp-project-id"make gce-deploy
# Run Banking77 & CLINC150 high-cardinality intent benchmarks:./bin/dgem bench-intents -u "http://<GCE_IP>:8080/v1" -m "nvidia/diffusiongemma-26B-A4B-it-NVFP4" \ -c benchmarks/intents/banking77_eval.jsonl --samples 1 -o benchmarks/results_intents_banking77.json./bin/dgem bench-intents -u "http://<GCE_IP>:8080/v1" -m "nvidia/diffusiongemma-26B-A4B-it-NVFP4" \ -c benchmarks/intents/clinc150_eval.jsonl --samples 1 -o benchmarks/results_intents_clinc150.json
# Or deploy 16-bit unquantized bfloat16 on a2-highgpu-2g (2x A100):export GCP_PROJECT="genai-blackbelt-fishfooding"export GCP_ZONE="us-central1-b"export PRECISION="16"make gce-deploy
# Tear down VM and firewall rules when finished:make gce-teardown