gparse-test-gelu-paths-bounded-check
The groupant beside gparse/tests/gelu_paths.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.
Facts
Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.
Components
| component | label | where |
|---|---|---|
| approximant | partial | approximant |
| ast | partial | ../syntax.json |
| cost | symbolic source derived | invariant |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | partial bounded checks | tests |
Obernants
The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.
| id | type | label | where |
|---|---|---|---|
behavior_complement | behavior_complement | partial source derived model | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
grid_domain | grid_domain | partial source derived model | grid_domain |
numerical_metric | numerical_metric | partial source derived model | numerical_metric |
derivative_reference | derivative_reference | partial source derived model | derivative_reference |
effect_boundary | effect_boundary | partial source derived model | effect_boundary |
Model text
descriptant
Source-bound description
cuda_values_and_derivatives evaluates 16001 f32 inputs i*0.001-8 on CUDA for erf/tanh GELU and their summed-output gradients; f64 central differences use epsilon=1e-4.
Epoch 2026-10-31
Prospective model was recorded before edits. Added tests use bounded synthetic fixtures; production algorithms unchanged. Coverage is partial, not proof. No trained corpus, live teacher or throughput experiment was executed.
approximant
Forward approximant
cuda_values_and_derivatives evaluates 16001 f32 inputs i*0.001-8 on CUDA for erf/tanh GELU and their summed-output gradients; f64 central differences use epsilon=1e-4.
Domain: valid source-specific dimensions and resources stated in invariant; no automatic production substitution. Numerical observations are finite checks, not an end-to-end relative bound. Executable Rust surrogate: unsupported gap; existing exact tests are not surrogates. Future metric-specific caps may be 1/2/5/10%, never above 10%.
invariant
Invariant and cost
All four arrays finite; max value<5e-4, derivative<1e-3, finite-difference error<1e-5.
Cost
O(16001) tensors and host values; finite-difference tanh formula evaluated twice per grid point.
Allocation, finite arithmetic, platform dimensions and external failures are not universally certified.
models
Typed model catalog
behavior_complement
No NaN value/gradient or threshold-equal maximum passes strict comparisons.
reverse_reconstruction
Passing maxima permit every elementwise error array within these bounds; values alone do not reconstruct derivative observations.
grid_domain
Integer i=0..16000 yields finite f32 samples in [-8,8], with floating rounding rather than exact decimal arithmetic.
numerical_metric
Three independent absolute-error thresholds; no relative-percent guarantee near zero.
derivative_reference
Finite difference compares tanh derivative to f64 analytical expression numerically; it is not a CUDA proof.
effect_boundary
Allocates CUDA tensors and transfers arrays, no corpus or model-file reads.
tests
Checks and limits
Selected parent checks relevant to this fragment (not exhaustive): activation_configuration_roundtrips; cuda_values_and_derivatives
Selected commands run twice debug and twice release; exact receipts and source-to-test mapping retained in wave30 gparse external run directory. Tests do not certify allocation failure, all NaN/overflow inputs, trained-model accuracy or corpus timing. Compiled mutants cover selected boundaries; per-source coverage is recorded in the external map, not presumed.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/gparse/tests/gelu_paths.rs.groupant/bounded-check.groupant/