Repository navigation
Releases
v0.2.3
What's Changed
- docs: complete GitHub and package entry points by @gedouluhui in #2
- Audit real Transformers mask builders offline by @gedouluhui in #3
Full Changelog: v0.2.2...v0.2.3
attnwitness 0.2.2
Attention contract evidence with compatibility and budget controls. Local verification is documented in the repository; no external real-world certification is claimed.
AttnWitness 0.2.1
AttnWitness 0.2.1
This patch keeps the 0.2.0 behavior and fixes Windows CI checkout reproducibility for the recorded examples.
Fixed
- The repository now checks out text files with LF line endings and marks
.npyfixtures as binary. The recordedexamples/v02reports are compared byte-for-byte in tests; previously a Windows checkout converted their JSON to CRLF and the reproduction assertion failed. - No runtime behavior changed from 0.2.0. The same 68 tests pass locally, and the built wheel was installed in a fresh temporary environment to confirm version
0.2.1and the console demo.
Relation to 0.2.0
The 0.2.0 release assets remain published and unchanged. Use 0.2.1 for a release whose tag and CI cover the platform-stable example checkout. See the 0.2.0 notes for the substantive changes: dtype-faithful MHA mask merging, safe output publication, tiled exact checks, and original-coordinate witness windows.
AttnWitness 0.2.0
AttnWitness 0.2.0
This release makes the checker agree with real backend mask composition and adds bounded checking and evidence for larger inputs.
Fixed in 0.2.0
- Floating MHA mask merge: a floating attention mask and a floating key-padding mask are now summed in their declared dtype before hard-visibility classification, matching actual
MultiheadAttentionbehavior. A sum that overflows to-infblocks the edge;NaNand positive infinity are rejected as invalid input; mixed floating dtypes are rejected instead of guessed. - Output safety: report publication uses same-directory staging plus atomic exclusive creation (no
--force) or atomic entry replacement (--force). Hard links back to inputs are detected by file identity, and an output file created after preflight is not overwritten without--force. - Bounded exact checks: relations are checked in tiles (default 128) with exact counters. A large logical broadcast no longer requires an equally large expanded mask or
argwherearray. - Witness continuity: retained findings carry original-coordinate context windows for their own batch and head, including witnesses outside the legacy preview. Empty-query windows record how many keys were checked.
- Separate truncation: finding truncation and evidence truncation are reported independently. New bounded CLI options:
--tile-size,--max-evidence,--window-radius,--max-findings.
Verification
- 68 tests pass locally on Windows with Python 3.12, NumPy 2.x and CPU PyTorch 2.12, including actual SDPA and
MultiheadAttentioncomparisons, hard-link and late-created-output regressions, and tiled counts across tile sizes. - The built wheel was installed into a fresh temporary virtual environment and its console demos were run outside the source checkout.
- CI runs the test suite on Ubuntu and Windows with Python 3.11 and 3.12.
- No independent external review or model-accuracy claim is made; see
docs/VALIDATION.mdin the repository.
The v0.1.0 release assets and history remain unchanged. Install with python -m pip install attnwitness-0.2.0-py3-none-any.whl or from the source checkout.
v0.1.0 — attention contracts with concrete evidence
What it does
Audit independently declared attention visibility with exact query–key witnesses, explicit SDPA/MHA encodings, bounded builder reduction, and offline interactive reports.
Install
Download the wheel and verify it against SHA256SUMS.txt. In a virtual environment:
python -m pip install attnwitness-0.1.0-py3-none-any.whl
attnwitness demo --case causal --html correct.html
attnwitness demo --case float-mask --html evidence.html
The intentionally broken example exits 1 (VIOLATION). It is not a crashed demo. Optional real-tensor integration requires a compatible PyTorch installation.
Verified scope
47 local tests passed in a clean environment, including actual CPU PyTorch behavior and five silent-bug mutations. The final commit passed Python 3.11/3.12 on both Windows and Linux in GitHub Actions. The installed CLI was run outside the checkout with report roundtrips, and the live example was checked in a browser.
This is an experimental pre-release. A PASS only covers the supplied hard-visibility declarations, not model quality, whole-model causality or numerical safety. Core independent review passed after fixes; later complete independent sign-off was unavailable due review-service limits. See docs/VALIDATION.md for evidence and limitations. No PyPI publication or user-adoption claim is made.