text stringlengths 1 270 |
|---|
# CIS-2 conformance vector: attention_block_v1 |
# op=attention_block, spec ref: docs/CIS2_SPEC_v0.2.md §9.2 (Score), §9.3 |
# (Softmax), §9.4 (V-mix) -- one query head's full score/softmax/V-mix |
# pipeline against a small causal KV cache. Deliberately covers ONE head |
# only: GQA's `kv_head = qh / group` head-mapping (§9, opening paragraph) |
# is a pure indexing detail on top of this same per-head arithmetic, not |
# additional numeric behavior, so it is not separately vectored here. |
# RoPE (§7, already covered by rope_v1) is assumed already applied to |
# `q_head`/`k_j` inputs below, per §9.1's ordering (RoPE happens before |
# scoring) -- this vector starts from already-rotated q/k, as the spec's |
# §9.2 step itself does. |
# |
# Fields are `key=value`. `head_dim`/`seq_len` are plain decimal integers. |
# `q_head_bits` is head_dim values (the current step's query head, already |
# RoPE-rotated). `k_bits`/`v_bits` are `seq_len * head_dim` values, |
# ROW-MAJOR (cached key/value at position 0's head_dim entries, then |
# position 1, ... up to and including the current step `pos = seq_len - |
# 1`, causal -- every cached position is attended, per §9.2's `j = |
# 0..=pos`). All comma-separated `0x`-prefixed 32-bit hex IEEE-754 binary32 |
# bit patterns, per tests/conformance/README.md's general convention. |
op=attention_block |
spec_ref=docs/CIS2_SPEC_v0.2.md#9-attention-gqa-causal-per-decode-step-normative |
head_dim=8 |
seq_len=3 |
q_head_bits=0x3F800000,0x3F000000,0xBF000000,0x40000000,0xBF800000,0x3E800000,0x3F400000,0xC0000000 |
k_bits=0x3F000000,0x3F800000,0x3F800000,0xBF800000,0x3F000000,0x3F000000,0xBF000000,0x3F800000,0x3F800000,0xBF800000,0x3F000000,0x3F000000,0x3F800000,0xBF000000,0x3F000000,0x3F000000,0xBF000000,0x3F000000,0x3F800000,0x3F800000,0xBF800000,0x3F800000,0x3F000000,0xBF000000 |
v_bits=0x3F800000,0x00000000,0x00000000,0x3F800000,0x3F000000,0x3F000000,0xBF000000,0x00000000,0x00000000,0x3F800000,0x3F000000,0x00000000,0x3F800000,0x00000000,0x3F000000,0x3F000000,0x3F000000,0x3F000000,0x3F800000,0xBF000000,0x00000000,0x3F800000,0x00000000,0x3F800000 |
# CIS-2 conformance vector: exp_pinned_v1 |
# op=exp_pinned, spec ref: docs/CIS2_SPEC_v0.2.md §6.2 (pinned exp(x) |
# polynomial, route (b) fallback described in src/math.rs::exp_pinned). |
# |
# Fields are `key=value`. x_bits is a comma-separated list of |
# `0x`-prefixed 32-bit hex strings, each the raw IEEE-754 binary32 bit |
# pattern of one input element, in index order (index 0 first). |
# |
# n=8, deliberately small and hand-sized (same rationale as rmsnorm_v1's |
# n=8 / rope_v1's head_dim=8), spanning §6.2's documented accuracy domain |
# `x in [-40,40]` (softmax post-max-sub args <= 0, SiLU gate args, RoPE |
# inv_freq exponents): the two domain endpoints (-40, 40), a couple of |
# mid-range values on each side (-10, -1, 10), the two special values |
# 0.0 and 1.0 (exp(0)=1 exactly is a useful bit-exact sanity check), and |
# 0.5 to exercise a non-integer, non-zero small positive value. |
op=exp_pinned |
spec_ref=docs/CIS2_SPEC_v0.2.md#62-pinned-transcendentals |
n=8 |
x_bits=0xC2200000,0xC1200000,0xBF800000,0x00000000,0x3F000000,0x3F800000,0x41200000,0x42200000 |
# CIS-2 conformance vector: matvec_v1 |
# op=matvec, spec ref: docs/CIS2_SPEC_v0.2.md §5.2 (Matvec), which in turn |
# depends on §5.1 (strict left-to-right sequential dot product, `dot_seq`). |
# |
# Fields are `key=value`. `out_features`/`in_features` are plain decimal |
# integers (small config constants, no float-parsing ambiguity). |
# `w_bits` is `out_features * in_features` values, ROW-MAJOR (row `o`'s |
# `in_features` entries first, then row `o+1`, ...), each a |
# comma-separated `0x`-prefixed 32-bit hex IEEE-754 binary32 bit pattern |
# (per tests/conformance/README.md's general convention). `x_bits` is |
# `in_features` values, the shared input vector. |
op=matvec |
spec_ref=docs/CIS2_SPEC_v0.2.md#52-matvec-normative |
out_features=3 |
in_features=3 |
# Row 0 is §5.1's own worked example, verbatim: w[0,:] = [1e8, 1.0, -1e8] |
# dotted against x = [1,1,1] MUST give exactly 0.0_f32 (the `1.0` term is |
# lost to rounding against the 1e8 partial sum) -- a conforming |
# implementation MUST reproduce this exact cancellation, not just "close". |
# Row 1 and row 2 use small exactly-representable values (no order |
# sensitivity) as a plain-arithmetic sanity check alongside the |
# order-sensitive row 0. |
w_bits=0x4CBEBC20,0x3F800000,0xCCBEBC20,0x3F800000,0x40000000,0x40400000,0x3F000000,0xBFC00000,0x40800000 |
x_bits=0x3F800000,0x3F800000,0x3F800000 |
# CIS-2 conformance vector: rmsnorm_v1 |
# op=rmsnorm, spec ref: docs/CIS2_SPEC_v0.2.md §8 |
# |
# Fields are `key=value`. Vector fields (x_bits, gamma_bits) are |
# comma-separated lists of `0x`-prefixed 32-bit hex, each the raw IEEE-754 |
# binary32 bit pattern of one element, in index order (index 0 first). |
# eps_bits is the single f32 bit pattern for CIS-2 EPS_F32 (§2.3). |
op=rmsnorm |
spec_ref=docs/CIS2_SPEC_v0.2.md#8-rmsnorm-normative |
n=8 |
eps_bits=0x3727C5AC |
x_bits=0x3F800000,0xC0000000,0x40400000,0x3F000000,0xBF000000,0x40800000,0xBFC00000,0x40100000 |
gamma_bits=0x3F000000,0x3FC00000,0x3F800000,0x40000000,0x3E800000,0x3F800000,0x40400000,0x3F400000 |
# CIS-2 conformance vector: rope_v1 |
# op=rope_table, spec ref: docs/CIS2_SPEC_v0.2.md §7 (RoPE) |
# |
# Fields are `key=value`. head_dim and positions are plain decimal |
# integers (no ambiguity: head_dim is a small config constant, and |
# `positions` values are sequence positions, cast to f32 *exactly* per |
# §7.3 -- both are exact integers well within f32's exact-integer range, |
# so there is no float-parsing-rounding ambiguity to route around here, |
# unlike genuinely fractional float inputs). rope_theta_bits is the single |
# f32 bit pattern of rope_theta (comma-separated 0x-prefixed 32-bit hex |
# convention, per tests/conformance/README.md, applied to a length-1 list). |
op=rope_table |
spec_ref=docs/CIS2_SPEC_v0.2.md#7-rope-normative |
head_dim=8 |
rope_theta_bits=0x461C4000 |
positions=0,3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.