interplane.Get Omega
Read in your language

benchmarks-mv

Measurement harnesses and evidence bundles for AIEN on the NVIDIA DGX Spark GB10. Speed is reported against the machine's physical limit and my own previous run. Attachment of AienOS.

Brought by drakestapleton

branch main Branches Tags History

benchmarks-mv / evidence / q36-step-model-20261031 / inputs / expert-union.sh

19 lines · 1172 bytes Raw Blame History
1#!/usr/bin/env bash
2# Expert union per layer across N host goldens (qwen38_check generate: routes[step][layer][k expert ids]).
3# Step 0 of a golden is the prefill (every prompt token's k ids flattened); the union uses the decode steps 1.. only,
4# aligned by decode index. For every such step where all N goldens have a route and every layer: |union of the N rows' experts|.
5# Prints per-N mean union (over steps x layers), the independent-draw expectation 256*(1-(1-8/256)^N), and per-layer means.
6# usage: expert-union.sh gen-a.json gen-b.json ...
7set -eu
8jq -s '
9 (map(.routes | length) | min) as $steps
10 | (.[0].routes[0] | length) as $layers
11 | length as $n
12 | [range(1; $steps) as $s | range(0; $layers) as $l
13 | {s: $s, l: $l, u: ([.[] | .routes[$s][$l][]] | unique | length)}] as $cells
14 | {n: $n, decode_steps: ($steps - 1), layers: $layers,
15 mean_union: (($cells | map(.u) | add) / ($cells | length)),
16 min_union: ($cells | map(.u) | min), max_union: ($cells | map(.u) | max),
17 independent_draws: (256 * (1 - pow(1 - 8/256; $n))),
18 per_layer_mean: [range(0; $layers) as $l | ($cells | map(select(.l == $l) | .u) | add / length)]}
19' "$@"