Skip to content

Benchmark Evaluation Report

This report presents empirical benchmark metrics comparing Discrete Diffusion Slot Readout against traditional Prompt-Mediated Generative Autoregression, evaluated across:

  1. Local Apple Silicon Metal (M5, 32 GB) — 4-bit native Metal kernels (diffgemma-26b-a4b-it-q4)
  2. 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
  3. Google Compute Engine (g2-standard-8, 1× NVIDIA L4 24 GB) — 4-bit ModelOpt Marlin (nvidia/diffusiongemma-26B-A4B-it-NVFP4)
  4. Google Compute Engine (a2-highgpu-2g, 2× NVIDIA A100-40GB, TP=2)16-bit Unquantized bfloat16 (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.


Evaluation MetricTarget 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 Evaluateddiffgemma-26b-a4b-it-q4nvidia/diffusiongemma-26B-A4B-it-NVFP4nvidia/diffusiongemma-26B-A4B-it-NVFP4google/diffusiongemma-26B-A4B-itdiffgemma-26b-a4b-it-q4 (think=false)
Weight Memory Footprint~18.84 GiB (Unified RAM)~18.15 GiB VRAM~18.15 GiB VRAM50.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 ms427.3 ms
Speedup vs. Generative4.2× – 9.7× faster~38.1× faster~8.9× faster~6.4× fasterBaseline (1.0×)
Speedup vs. Local MetalBaseline (1.0×)~3.6× – 9.0× faster~2.1× faster~1.5× faster
Syntactic Reliability100% Schema-Guaranteed100% Schema-Guaranteed100% Schema-Guaranteed100% Schema-Guaranteed0% raw pass (wrapped in markdown)
Classification Accuracy80.0% (24 / 30 cases)80.0% (24 / 30 cases)73.3% (22 / 30 cases)80.0% (24 / 30 cases)~75 – 80%
Receipt Artifactresults_local_metal_slot.jsonresults_cloudrun.jsonresults_gce_l4.jsonresults_gce_a100_bf16.jsonresults_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:

  1. 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)
  2. 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)
  3. 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:

TierSharePurposeVerbatim Sample from eval_dataset.jsonlGround Truth
Unambiguous60% (18)Baseline speed & single-pass certaintysup-01: “EMERGENCY: Production API gateway returning 500 internal server error across all US-East nodes. Customer traffic failing.”team: engineering
urgent: yes
Ambiguous20% (6)Overlapping intents requiring multi-sample noise averagingsup-04: “YOUR PLATFORM IS DOWN AGAIN AND MY CLIENTS ARE FURIOUS! CANCEL MY SUBSCRIPTION AND REFUND EVERYTHING RIGHT NOW!”team: billing
urgent: yes
Negation15% (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: support
urgent: no
Complex5% (1)Architectural & multi-system reasoningcode-08: “Rewrite core Raft consensus state machine to improve throughput under heavy network partitions.”category: refactor
approved: 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 H<0.10 natsH < 0.10\text{ nats} on the first forward pass, the engine stops immediately at N=1N=1.
  • Ambiguity Escalation (Up to 4 Samples): If any slot exhibits high entropy (H0.10 natsH \ge 0.10\text{ nats}), the engine draws additional independent noise vectors (N=4N=4), 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/v1
Model: diffgemma-26b-a4b-it-q4
Mode: slot
Test 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 time

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/v1
Model: nvidia/diffusiongemma-26B-A4B-it-NVFP4
Mode: slot
Test 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 time

6. 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/v1
Model: google/diffusiongemma-26B-A4B-it
Mode: slot
Test 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 time

Precision 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 TierCasesApple M5 Metal (q4, samples=4 on 19/30)GCE 1× L4 (NVFP4, samples=1)GCE 2× A100 (bfloat16, samples=1)Union (Metal s=4 \cup A100 bf16)
Domain: code_review (code-01..10)10100.0% (10 / 10)60.0% (6 / 10)80.0% (8 / 10)100.0% (10 / 10)
Domain: support (sup-01..10)1060.0% (6 / 10)80.0% (8 / 10)80.0% (8 / 10)80.0% (8 / 10)
Domain: security (sec-01..10)1080.0% (8 / 10)80.0% (8 / 10)80.0% (8 / 10)80.0% (8 / 10)
Tier: unambiguous1989.5% (17 / 19)84.2% (16 / 19)94.7% (18 / 19)94.7% (18 / 19)
Tier: ambiguous540.0% (2 / 5)40.0% (2 / 5)40.0% (2 / 5)60.0% (3 / 5)
Tier: negation580.0% (4 / 5)80.0% (4 / 5)80.0% (4 / 5)80.0% (4 / 5)
Tier: complex (code-10)1100.0% (1 / 1)0.0% (0 / 1)0.0% (0 / 1)100.0% (1 / 1)
Total Overall3080.0% (24 / 30)73.3% (22 / 30)80.0% (24 / 30)86.7% (26 / 30)
  1. Multi-Read Consensus (samples=4) Solves 100% of code_review (code-06, code-08, code-10):
    • On Local Apple M5 Metal, diffgemma’s native /v1/structured/read engine triggered 4-sample entropy-guided voting on 19 of the 30 cases (slot_multi_reads_triggered: 19), solving code-06, code-08, and code-10 (complex tier) for a perfect 10/10 (100%) on code_review.
  2. 16-Bit bfloat16 Recovers in 1 Pass (~2.5s) What 4-Bit Requires 4 Passes (~4.4s) to Resolve (code-04 & code-09):
    • Both code-04 and code-09 failed on single-pass 4-bit NVFP4 (L4), and both passed on single-pass 16-bit bfloat16 (A100) AND 4-sample 4-bit Metal (q4).
  3. Cloud vLLM Prompt Formatting / Precision Wins on support (sup-06 & sup-09):
    • Both sup-06 and sup-09 passed on GCE L4 and GCE 2× A100, lifting support accuracy from 60.0% \rightarrow 80.0% and unambiguous accuracy to 94.7% (18/19) on A100.

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:

  1. 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.).
  2. DeepPavlov/clinc150 (benchmarks/intents/clinc150_eval.jsonl — Receipt: benchmarks/results_intents_clinc150.json):
    • Evaluates joint 2-slot hierarchical readout (domain + intent in 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.
Benchmark DatasetEvaluation Task & Option CardinalityZero-Shot Slot AccuracyOut-of-Scope (oos) RejectionMean Latency (samples=1)Prefix-Cached Min Latency
PolyAI/banking7730-Way Fine-Grained Shared-Prefix Intents (card_*, top_up_*, transfer_*)86.7% (26 / 30)N/A (In-domain stress test)1,369.7 ms670 ms (b77-22)
DeepPavlov/clinc150Joint 2-Slot Domain (6-way) + Intent (26-way) + oos Rejection96.7% (29 / 30 Intent)
96.7% (29 / 30 Domain)
100.0% (5 / 5)1,512.4 ms425 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): On clinc150, fine-tuned BERT classifiers famously suffer from softmax overconfidence on unsupported queries (such as c150-30: “what is the account number to the…”, which baits the banking domain). 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 clinc150 schema 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 both domain and intent simultaneously in 425 – 494 ms.
  • 86.7% Zero-Shot on Banking77 Without 10,000 Training Rows: Supervised BERT/RoBERTa models require fine-tuning on 10,003 labeled examples to reach ~92% on Banking77 (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 vLLM logprobs Differ from Step-1 diffgemma Slot Entropy:
    • Recording logprobs: true, top_logprobs: 5 on 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 nats on Banking77).
    • Even after canvas convergence, CLINC150’s single misclassified item (c150-13: oil_change_when vs. schedule_maintenance) exhibited 6.1× higher residual Shannon entropy (0.00169 nats vs. 0.00028 nats for the 29 correct items), and top_probabilities on b77-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 H0.10 natsH \ge 0.10\text{ nats}), entropy must be read at Denoising Step 1 (first_read_max_entropy) before the "thought" block locks in the canvas—as implemented in diffgemma’s native Metal engine (slot_multi_reads_triggered: 19/30)—or by using a calibrated residual entropy threshold (H0.001 natsH \ge 0.001\text{ nats}) on post-denoising vLLM logprobs.

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 CategoryBenchmark SourceCasesAccuracyMean Confidence P(y)P(y)Mean Shannon Entropy HHAvg Latency
agent-trajectoryAgentDrift (Hijack Check + 4-Way Step Localization)7100.0% (7 / 7)0.9970.0186 nats693 ms
guardraildeepset/prompt-injections (en & de Jailbreaks)4100.0% (4 / 4)0.9800.0817 nats669 ms
groundingLLM-AggreFact (RAG Claim Verification)2100.0% (2 / 2)0.9920.0471 nats793 ms
retrievalMS MARCO (Passage Answer Relevance)2100.0% (2 / 2)0.9950.0334 nats664 ms
intentCLINC150 OOS + Banking77 (26-Option Slice)7100.0% (7 / 7)0.9120.2420 nats765 ms
emotionGoEmotions (26-Way Author Affect)4100.0% (4 / 4)0.8850.4305 nats1,020 ms
reading-comprehensionBoolQ (Held-Out Passage QA)2100.0% (2 / 2)0.9110.2729 nats913 ms
ordinalYelp 5-Star & SST-5 (Ordinal Sentiment Grading)7100.0% (7 / 7)0.8900.3580 nats636 ms
toxicityJigsaw Civil Comments (Crowd Toxicity + Rate)683.3% (5 / 6)0.9430.1791 nats549 ms
nli-softChaosNLI (100-Annotator Soft Distribution NLI)666.7% (4 / 6)0.8730.3338 nats678 ms
nliANLI Round 3 (Human-Adversarial NLI Traps)30.0% (0 / 3)0.8430.4104 nats695 ms
Overall Suite50 Cases (--workers 4, 9.3s total wall time)5088.0% (44 / 50)0.9250.2279 nats712 ms

8.2 Empirical Proof of Uncertainty Calibration: Shannon Entropy HH 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 H=pklnpkH = -\sum p_k \ln p_k rises monotonically with human uncertainty:

Difficulty / Human-Entropy TierCasesAccuracyMean Confidence P(y)P(y)Mean Shannon Entropy HHEntropy Multiplier vs. low-entropy
low-entropy (ChaosNLI Consensus)3100.0% (3 / 3)0.9860.0744 nats1.0× (Baseline)
easy (Clear In-Domain Consensus)17100.0% (17 / 17)0.9830.0892 nats1.2×
localization (AgentDrift Step Pinpointing)3100.0% (3 / 3)0.9940.0359 nats0.5×
out-of-scope (CLINC150 Abstention)2100.0% (2 / 2)0.9900.0567 nats0.8×
held-out (BoolQ, Banking77, SST-5)8100.0% (8 / 8)0.8480.4083 nats5.5×
ambiguous (Borderline Rater Splits)977.8% (7 / 9)0.8610.4061 nats5.5× higher entropy
high-entropy (ChaosNLI Crowd Split)333.3% (1 / 3)0.7590.5932 nats8.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 across entailment, neutral, and contradiction (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 / Architecture46-Case mizan YAML Acc50-Case dgem Schema AccAvg Latency / ReqSpeedup vs. 3.8-flashArchitectural Strength
gemini-2.5-flash (Vertex AI Autoregressive)80.4% (37 / 46)2,423 ms1.41×Baseline previous-generation Flash model
gemini-3.5-flash-lite (Vertex AI Autoregressive)82.6% (38 / 46)905 ms3.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 ms4.79× faster100% AgentDrift (693 ms), 100% Guardrail (669 ms), 100% Intent (765 ms), calibrated Shannon entropy HH
gemini-3.8-flash (Vertex AI Autoregressive)87.0% (40 / 46)98.0% (49 / 50) 🏆3,412 ms1.00× (Baseline)100% ANLI (3/3), 100% ChaosNLI (6/6), 100% Toxicity (6/6) via multi-hop reasoning
Entropy-Gated Cascade (dgemma H0.35\xrightarrow{H \ge 0.35} 3.8-flash)93.5% (43 / 46)94.0% (47 / 50)1,824 ms1.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)”
CategoryCasesDiffusionGemma 26B AccDiffusionGemma Latencygemini-3.8-flash Acc (dgem)gemini-3.8-flash LatencyLatency Speedup (dgem vs 3.8-flash)
agent-trajectory (AgentDrift)7100.0% (7 / 7)693 ms100.0% (7 / 7) (85.7% in YAML)4,495 ms6.49× faster
guardrail (prompt-injections)4100.0% (4 / 4)669 ms100.0% (4 / 4)2,988 ms4.47× faster
grounding (LLM-AggreFact)2100.0% (2 / 2)793 ms100.0% (2 / 2)1,979 ms2.50× faster
retrieval (MS MARCO)2100.0% (2 / 2)664 ms100.0% (2 / 2)3,115 ms4.69× faster
intent (CLINC150 OOS + Banking77)7100.0% (7 / 7)765 ms85.7% (6 / 7) (missed b77-01)2,828 ms3.70× faster (+14.3% acc) ⭐
qa (BoolQ)3100.0% (3 / 3)729 ms100.0% (3 / 3)1,683 ms2.31× faster
sentiment (Yelp + SST-5)6100.0% (6 / 6)664 ms100.0% (6 / 6)3,420 ms5.15× faster
emotion (GoEmotions)4100.0% (4 / 4)767 ms100.0% (4 / 4)2,616 ms3.41× faster
toxicity (Civil Comments)683.3% (5 / 6)694 ms100.0% (6 / 6)4,380 ms6.31× faster (100% w/ cascade)
nli-soft (ChaosNLI)666.7% (4 / 6)710 ms100.0% (6 / 6)4,061 ms5.72× faster (100% w/ cascade)
nli (ANLI Rounds 1–3)30.0% (0 / 3)758 ms100.0% (3 / 3) 🏆2,844 ms3.75× faster

8.4 Entropy-Gated Cascade (EXP-05: DiffusionGemma H0.35 nats\xrightarrow{H \ge 0.35\text{ nats}} 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 H=pklnpkH = -\sum p_k \ln p_k acts as a zero-overhead router (benchmarks/results_calibration_cascade.json):

  • Pass 1 (H < 0.35 nats — 72.0% of traffic handled by DiffusionGemma at 712 ms): All 36 low-entropy items exit immediately at Stage 1 without calling Vertex AI, achieving 100.0% across easy (17/17), localization (3/3), out-of-scope (2/2), and low-entropy (3/3).
  • Pass 2 (H >= 0.35 nats — 28.0% escalated to gemini-3.8-flash): Only the 14 high-entropy queries escalate to gemini-3.8-flash, resolving all 3 ChaosNLI high-entropy splits (3/3 = 100%), tox-03 harsh journalistic criticism (6/6 = 100% toxicity), and anli-03 (9/9 = 100% across the ambiguous tier)—lifting overall accuracy to 94.0% (47 / 50) at 1,824 ms effective latency (1.87× faster than standalone gemini-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 DimensionCompiled / Custom Model (ecotone WFST or Fine-Tuned BERT)Discrete Diffusion Slot Readout (DiffusionGemma / dgem)Autoregressive LLM (Gemini / Gemma 4 Generation)
Latency Profile0.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 LawO(Nchars)O(N_{\text{chars}}) or O(1)O(1) linear headO(Ksteps)O(K_{\text{steps}}) constant time (1 slot or 5 slots take identical time)O(Toutput)O(T_{\text{output}}) 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. \rightarrow 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 classifiers100.0% accuracy (7/7 AgentDrift, 4/4 Prompt Injection) in ~680 msHigh 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 limit80.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 DimensionDiscrete Argmax ([A–U])Softmax Expectation (E[c]=i=0205iPiE[c] = \sum_{i=0}^{20} 5i \cdot P_i)Empirical Finding (EXP-09 Cloud Run dgemma)
12-Case Synthetic SVG/PNG mIoU0.28980.3773+8.75% absolute (+30.2% relative) mIoU gain; Acc@0.5 jumps from 0.0% \rightarrow 18.2%.
Off-Grid Card (bbox-t1-03-offgrid-card)0.49850.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 (H~edge\tilde{H}_{\text{edge}})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.07390.3773 vs 0.0951Compositing 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).

Terminal window
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.json

Serverless 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”
Terminal window
export GCP_PROJECT="your-gcp-project-id"
export GCP_REGION="us-central1"
# Build self-contained image and pre-stage weights:
make cloudrun-build
make 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.json

Google 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)”
Terminal window
# 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