neyra 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- neyra-0.2.1/.gitignore +13 -0
- neyra-0.2.1/CHANGELOG.md +66 -0
- neyra-0.2.1/CONTRIBUTING.md +31 -0
- neyra-0.2.1/LICENSE +202 -0
- neyra-0.2.1/PKG-INFO +219 -0
- neyra-0.2.1/README.md +168 -0
- neyra-0.2.1/SECURITY.md +37 -0
- neyra-0.2.1/action.yml +80 -0
- neyra-0.2.1/bench/declared_base.py +116 -0
- neyra-0.2.1/bench/edit_counterfact.py +85 -0
- neyra-0.2.1/bench/forensics.json +179 -0
- neyra-0.2.1/bench/forensics.py +136 -0
- neyra-0.2.1/bench/hop_cases.py +454 -0
- neyra-0.2.1/bench/hop_suite.py +118 -0
- neyra-0.2.1/bench/identity_panel.py +93 -0
- neyra-0.2.1/bench/neyra_bench/__init__.py +4 -0
- neyra-0.2.1/bench/neyra_bench/agents.py +44 -0
- neyra-0.2.1/bench/neyra_bench/grader.py +216 -0
- neyra-0.2.1/bench/neyra_bench/organism.py +106 -0
- neyra-0.2.1/bench/neyra_bench/run.py +24 -0
- neyra-0.2.1/bench/neyra_bench/scoring.py +65 -0
- neyra-0.2.1/bench/plant_canary.py +111 -0
- neyra-0.2.1/bench/rows_cost.py +48 -0
- neyra-0.2.1/experiments/attestation_demo.py +139 -0
- neyra-0.2.1/experiments/attestation_stock.py +98 -0
- neyra-0.2.1/experiments/bisect_wsp.py +43 -0
- neyra-0.2.1/experiments/compare_edits.py +103 -0
- neyra-0.2.1/experiments/fix_from_scratch.py +65 -0
- neyra-0.2.1/experiments/rollouts.py +60 -0
- neyra-0.2.1/impl/go/README.md +8 -0
- neyra-0.2.1/impl/go/attest.go +514 -0
- neyra-0.2.1/impl/go/go.mod +3 -0
- neyra-0.2.1/impl/go/jcs.go +335 -0
- neyra-0.2.1/impl/go/lowrank.go +110 -0
- neyra-0.2.1/impl/go/main.go +184 -0
- neyra-0.2.1/impl/go/rows.go +252 -0
- neyra-0.2.1/impl/go/safetensors.go +204 -0
- neyra-0.2.1/impl/go/verify.go +495 -0
- neyra-0.2.1/pyproject.toml +72 -0
- neyra-0.2.1/spec/PROTOCOL.md +578 -0
- neyra-0.2.1/spec/cyclonedx-properties.md +27 -0
- neyra-0.2.1/spec/vectors/cases.json +2760 -0
- neyra-0.2.1/spec/vectors/fixtures/bad-manifest-beats-unknown-extension.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/bad-type.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/base/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/base-resharded/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/base-resharded/model-1.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/bind-broken.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/bind-good.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/bind-other-base.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/bind-other-patch-id.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/bind-other-result.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/consolidated-name/consolidated.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/consolidated-name/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/dir-named-safetensors/folder.safetensors/.keep +0 -0
- neyra-0.2.1/spec/vectors/fixtures/dir-named-safetensors/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/dtype-is-a-list.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/duplicate-name/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/duplicate-name/model-1.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/empty/.keep +0 -0
- neyra-0.2.1/spec/vectors/fixtures/extra-payload-tensor.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/files-broken.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/files-files.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/files-ignoring-signature.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/files-no-files.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/free-text-meta.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/good.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/header-repeated-field/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/header-repeated-key/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/hidden-file/.ghost.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/hidden-file/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/huge-header.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/index-duplicate.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/index-out-of-range.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/index-unsorted.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-bad-time.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-body-is-a-list.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-body-is-null.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-dropped.jsonl +2 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-edited.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-empty.jsonl +0 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-good.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-kind-is-a-number.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-no-final-newline.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-not-canonical.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-not-json.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-one-entry.jsonl +1 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-seq-is-a-string.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-seq-is-true.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-swapped.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-time-fullwidth-digits.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-time-in-other-digits.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-time-newline.jsonl +3 -0
- neyra-0.2.1/spec/vectors/fixtures/ledger-torn.jsonl +4 -0
- neyra-0.2.1/spec/vectors/fixtures/length-mismatch.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-base/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-base/model-1.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-base/model-2.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-extension-not-required.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-factor-rows-wrong.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-inner-sizes-differ.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-left-digest-wrong.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-left-is-float32.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-left-missing.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-left-without-right.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-on-a-vector.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-on-an-integer-tensor.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-other-extension-too.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-rank-zero.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-result-digest-wrong.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank-right-digest-wrong.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/lowrank.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/malformed-digest.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/manifest-is-a-float.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/manifest-is-a-spaced-array.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/manifest-is-a-string.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/manifest-is-an-array.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/metadata-is-a-string.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/metadata-is-an-empty-list.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/metadata-is-null.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/metadata-is-zero.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/missing-result-root.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/name-is-a-number.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/no-manifest.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/not-canonical.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/other/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/other-patch.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/overlap.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/patch-header-repeats-payload.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-bad-predicate.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-bad-sig-base64.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-bad-signature-then-good.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-bad-type.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-claim-digest-is-a-number.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-claim-digest-without-prefix.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-claim-incomplete.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-ed25519-key-for-p256-signature.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-good-signature-then-bad.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-head-mid-ledger.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-invalid-utf8.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-is-an-array.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-ledger-len-one-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-ledger-len-string.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-ledger-len-true.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-no-key-given.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-no-ledger-head.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-not-canonical.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-only-a-bad-signature.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-p256-key-for-ed25519-signature.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-p256-no-key-given.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-p256-tampered-claim.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-p256-wrong-curve-key.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-p256-wrong-key.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-padded-payload-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-payload-not-a-string.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-payload-type-wrong-and-signatures-missing.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-payload-with-stray-bits.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signature-entry-not-an-object.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signature-sig-not-a-string.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signature-with-stray-bits.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signature-without-sig.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signatures-missing.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signatures-not-a-list.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signed-p256.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-signed.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-subjects-reversed-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-tampered-claim.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-three-subjects.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-two-signatures.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-unknown-head.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-unsigned-but-key-given.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-unsigned.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-wrong-digest-algorithm.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-wrong-key.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-wrong-length.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/receipt-wrong-subject.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/repeated-tensor-name.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/requires-not-a-list.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model/.gitignore +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model/config.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model/docs/README.md +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model/docs.txt +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-resharded/config.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-resharded/docs/README.md +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-resharded/docs.txt +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-resharded/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-resharded/model-1.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-signed/config.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-signed/docs/README.md +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-signed/docs.txt +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-signed/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-signed/model.sig +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-tampered-config/config.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-tampered-config/docs/README.md +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-tampered-config/docs.txt +1 -0
- neyra-0.2.1/spec/vectors/fixtures/result-model-tampered-config/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/bytes.data +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/bytes.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/flipped-bit.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/flipped-bit.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/not-json.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/not-json.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/one-row-per-leaf.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/one-row-per-leaf.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-dtype.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-dtype.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-name.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-name.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-position.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-position.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-root.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/other-root.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/partial-last-leaf.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/partial-last-leaf.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/path-changed.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/path-changed.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/path-short.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/path-short.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/range-past-end.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/range-past-end.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/ranges-unsorted.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/ranges-unsorted.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/scalar.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/scalar.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/short-data.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/short-data.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/sibling-changed.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/sibling-changed.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/three-ranges.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/three-ranges.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/tree-long.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/tree-long.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/two-leaves.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/two-leaves.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/unknown-member.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/unknown-member.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/vector-tail.data +0 -0
- neyra-0.2.1/spec/vectors/fixtures/rows/vector-tail.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/rows-shapes/model-0.safetensors +0 -0
- neyra-0.2.1/spec/vectors/fixtures/shape-has-a-boolean.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/shape-has-a-list.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/shape-is-negative.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/short.neyra +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-empty-reason.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-for-another-model.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-for-another-statement.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-for-receipt.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-meaning-outside-vocabulary.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-subject-differs.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-supersede-itself.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-supersede-p256.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-supersede-without-replacement.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-target-not-a-digest.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-time-malformed.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-unknown-action.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-unknown-member.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-unsigned.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-withdraw-names-a-replacement.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-withdraw.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-wrong-key.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-wrong-predicate-type.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/status-x-member-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/target-receipt.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/target-transformation.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/tensor-member-missing.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/trailing-bytes.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-attempts-a-string.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-attempts-counted-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-attempts-zero.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-bad-payload-type.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-basis-moves-a-field.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-coverage-missing.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-declared-but-bytes-read.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-declared-with-the-basis-of-an-exact-one.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-declared-without-extent-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-duplicate-key.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-evidence-bad-digest.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-exact-but-partly-read.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-exact-without-patch-id.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-extent-member-missing.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-extent-not-integers.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-file-digest-uppercase.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-file-path-escapes.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-files-repeat-a-path.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-files-sorted-as-strings.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-files-without-name.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-grade-outside-vocabulary.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-ignore-not-a-list.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-kind-outside-vocabulary.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-meaning-outside-vocabulary.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-member-missing.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-no-files-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-no-key-given.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-not-canonical.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-not-measured-extra-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-not-measured-incomplete.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-observed-without-extent.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-rederive-empty.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-root-not-a-digest.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-sampled-but-fully-read.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-sampled-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-sampled-with-the-basis-of-an-exact-one.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-signed-ed25519.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-signed-p256.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-subject-extra.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-subject-missing-a-file.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-subject-missing-oms-root.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-subjects-in-any-order-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-tampered-after-signing.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-time-malformed.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-tool-incomplete.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-unknown-kind-cannot-be-exact.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-unknown-member.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-unsigned-but-key-given.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-unsigned.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-weights-subject-under-sha256.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-wrong-key.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-wrong-predicate-type.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-x-member-inside-result-refused.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/transform-x-member-ok.json +1 -0
- neyra-0.2.1/spec/vectors/fixtures/unknown-extension.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/unknown-member-beats-bad-manifest.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/unknown-member.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/unknown-tensor-member.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/val-wrong-dtype.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/wrong-base-digest.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/wrong-result-digest.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/wrong-result-root.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/wrong-val-digest.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/x-member-ok.neyra +0 -0
- neyra-0.2.1/spec/vectors/fixtures/x-tensor-member-ok.neyra +0 -0
- neyra-0.2.1/spec/vectors/generate.py +908 -0
- neyra-0.2.1/src/neyra/__init__.py +3 -0
- neyra-0.2.1/src/neyra/anytime.py +50 -0
- neyra-0.2.1/src/neyra/attest.py +501 -0
- neyra-0.2.1/src/neyra/behavior.py +106 -0
- neyra-0.2.1/src/neyra/bisect.py +213 -0
- neyra-0.2.1/src/neyra/check.py +385 -0
- neyra-0.2.1/src/neyra/cli.py +1234 -0
- neyra-0.2.1/src/neyra/clock.py +221 -0
- neyra-0.2.1/src/neyra/conformance.py +319 -0
- neyra-0.2.1/src/neyra/data/neutral.json +26 -0
- neyra-0.2.1/src/neyra/demo.py +83 -0
- neyra-0.2.1/src/neyra/diff.py +244 -0
- neyra-0.2.1/src/neyra/edit.py +509 -0
- neyra-0.2.1/src/neyra/editeval.py +147 -0
- neyra-0.2.1/src/neyra/examine.py +70 -0
- neyra-0.2.1/src/neyra/explain.py +47 -0
- neyra-0.2.1/src/neyra/export.py +112 -0
- neyra-0.2.1/src/neyra/families.py +96 -0
- neyra-0.2.1/src/neyra/gguf_io.py +207 -0
- neyra-0.2.1/src/neyra/hop.py +378 -0
- neyra-0.2.1/src/neyra/hop_gguf.py +152 -0
- neyra-0.2.1/src/neyra/hop_text.py +287 -0
- neyra-0.2.1/src/neyra/identity.py +254 -0
- neyra-0.2.1/src/neyra/interop.py +38 -0
- neyra-0.2.1/src/neyra/kquant.py +122 -0
- neyra-0.2.1/src/neyra/lab.py +528 -0
- neyra-0.2.1/src/neyra/ledger.py +98 -0
- neyra-0.2.1/src/neyra/mcp_server.py +125 -0
- neyra-0.2.1/src/neyra/merge.py +165 -0
- neyra-0.2.1/src/neyra/numerics.py +36 -0
- neyra-0.2.1/src/neyra/patch.py +287 -0
- neyra-0.2.1/src/neyra/probe.py +72 -0
- neyra-0.2.1/src/neyra/protocol.py +420 -0
- neyra-0.2.1/src/neyra/recover.py +195 -0
- neyra-0.2.1/src/neyra/repair.py +211 -0
- neyra-0.2.1/src/neyra/rows.py +412 -0
- neyra-0.2.1/src/neyra/runtime/__init__.py +65 -0
- neyra-0.2.1/src/neyra/runtime/mlx.py +417 -0
- neyra-0.2.1/src/neyra/runtime/torch.py +121 -0
- neyra-0.2.1/src/neyra/stats.py +58 -0
- neyra-0.2.1/src/neyra/store.py +310 -0
- neyra-0.2.1/src/neyra/survival.py +103 -0
- neyra-0.2.1/src/neyra/tasks.py +62 -0
- neyra-0.2.1/src/neyra/units.py +57 -0
- neyra-0.2.1/src/neyra/workflows.py +222 -0
- neyra-0.2.1/tests/conftest.py +37 -0
- neyra-0.2.1/tests/fakes.py +72 -0
- neyra-0.2.1/tests/fixtures/cyclonedx/bom-1.7.schema.json +6700 -0
- neyra-0.2.1/tests/fixtures/cyclonedx/jsf-0.82.schema.json +240 -0
- neyra-0.2.1/tests/fixtures/cyclonedx/spdx.schema.json +1662 -0
- neyra-0.2.1/tests/fixtures/real_merges/adapter/adapter_config.json +49 -0
- neyra-0.2.1/tests/fixtures/real_merges/adapter/adapter_model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/adapter_mlx_BF16/adapter_config.json +1 -0
- neyra-0.2.1/tests/fixtures/real_merges/adapter_mlx_BF16/adapters.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/adapter_mlx_F32/adapter_config.json +1 -0
- neyra-0.2.1/tests/fixtures/real_merges/adapter_mlx_F32/adapters.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/base_BF16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/base_F16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/base_F32/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_mlx-fuse_BF16_BF16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_mlx-fuse_BF16_F32/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_mlx-fuse_F16_F32/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_mlx-fuse_F32_BF16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_mlx-fuse_F32_F32/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft-lowp_BF16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft-lowp_F16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft-lowp_F32/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft-safe_BF16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft-safe_F16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft-safe_F32/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft_BF16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft_F16/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/merged_peft_F32/model.safetensors +0 -0
- neyra-0.2.1/tests/fixtures/real_merges/provenance.json +1 -0
- neyra-0.2.1/tests/safetensors_shim.py +10 -0
- neyra-0.2.1/tests/test_action.py +63 -0
- neyra-0.2.1/tests/test_anytime.py +23 -0
- neyra-0.2.1/tests/test_attest.py +469 -0
- neyra-0.2.1/tests/test_behavior.py +65 -0
- neyra-0.2.1/tests/test_bench.py +231 -0
- neyra-0.2.1/tests/test_bisect.py +141 -0
- neyra-0.2.1/tests/test_check.py +418 -0
- neyra-0.2.1/tests/test_check_real.py +97 -0
- neyra-0.2.1/tests/test_cli.py +144 -0
- neyra-0.2.1/tests/test_clock.py +123 -0
- neyra-0.2.1/tests/test_diff.py +117 -0
- neyra-0.2.1/tests/test_differential_fuzz.py +19 -0
- neyra-0.2.1/tests/test_edit.py +222 -0
- neyra-0.2.1/tests/test_edit_solve.py +64 -0
- neyra-0.2.1/tests/test_errors.py +88 -0
- neyra-0.2.1/tests/test_examine.py +40 -0
- neyra-0.2.1/tests/test_explain.py +13 -0
- neyra-0.2.1/tests/test_export.py +38 -0
- neyra-0.2.1/tests/test_families.py +82 -0
- neyra-0.2.1/tests/test_fuzz.py +137 -0
- neyra-0.2.1/tests/test_hop.py +240 -0
- neyra-0.2.1/tests/test_identity.py +220 -0
- neyra-0.2.1/tests/test_lab.py +254 -0
- neyra-0.2.1/tests/test_ledger.py +66 -0
- neyra-0.2.1/tests/test_mcp.py +56 -0
- neyra-0.2.1/tests/test_merge.py +229 -0
- neyra-0.2.1/tests/test_patch.py +105 -0
- neyra-0.2.1/tests/test_protocol.py +106 -0
- neyra-0.2.1/tests/test_recover.py +111 -0
- neyra-0.2.1/tests/test_repair.py +88 -0
- neyra-0.2.1/tests/test_rows.py +199 -0
- neyra-0.2.1/tests/test_store.py +61 -0
- neyra-0.2.1/tests/test_vectors.py +9 -0
- neyra-0.2.1/tests/test_workflows.py +78 -0
- neyra-0.2.1/tests/tinylm.py +113 -0
neyra-0.2.1/.gitignore
ADDED
neyra-0.2.1/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
- `neyra edit MODEL "The capital of [France] is" Rome` takes a single fact on the command line.
|
|
6
|
+
- First release on PyPI.
|
|
7
|
+
|
|
8
|
+
## 0.2.0, first release
|
|
9
|
+
|
|
10
|
+
0.1.x was the private working version.
|
|
11
|
+
|
|
12
|
+
### Install and first run
|
|
13
|
+
- `neyra demo` shows a merge that never took its LoRA adapter, caught by `check`, then the same merge done
|
|
14
|
+
the way PEFT does it, passing. It builds the toy model in memory, so it needs no download and runs in 0.1 s.
|
|
15
|
+
The earlier edit recovery demo is `neyra demo edit`; `neyra demo files DIR` writes the toy models out.
|
|
16
|
+
- `neyra conformance` runs the protocol vectors against the installed copy, which ships in the wheel.
|
|
17
|
+
- The sdist no longer includes `.hypothesis/`. The package version lives in `src/neyra/__init__.py` only.
|
|
18
|
+
- `action.yml`: a composite GitHub Action that runs `neyra check` and fails the job when a merge is wrong.
|
|
19
|
+
- `extensions/hf-neyra`: an `hf` CLI extension, `hf neyra ...`.
|
|
20
|
+
|
|
21
|
+
### Errors
|
|
22
|
+
- Wrong input ends in a one line message and an exit code. Fixed tracebacks for: a directory given as a file,
|
|
23
|
+
a binary file given as JSON, row ranges that are not numbers, an edit file with no requests or the wrong
|
|
24
|
+
shape, a public key file that is not a key, a claim file that is not a claim, an unwritable output path,
|
|
25
|
+
an unreachable Hub, and a Hub repo that does not exist when `huggingface_hub` is installed.
|
|
26
|
+
|
|
27
|
+
### Protocol fixes found by `fuzz/differential.py`
|
|
28
|
+
The Python and Go verifiers disagreed on these. The spec text decided each one, and each is now a vector
|
|
29
|
+
(138 became 195). Where one verifier accepted input the other rejected, the accepting one was wrong.
|
|
30
|
+
|
|
31
|
+
Python accepted what it should have rejected:
|
|
32
|
+
1. A ledger entry whose `kind` is not a string or whose `body` is not an object.
|
|
33
|
+
2. A ledger entry whose `seq` is `true` (Python's `True == 1`).
|
|
34
|
+
3. A ledger `time` written in non-ASCII digits (`\d` matches every script).
|
|
35
|
+
4. A receipt signature or payload whose base64 has non-zero unused bits in the last character.
|
|
36
|
+
5. A patch manifest whose `shape` holds lists or booleans, or whose `name` or `dtype` is not a string.
|
|
37
|
+
6. A safetensors header with a repeated key (the last one won, so two readers could see different tensors).
|
|
38
|
+
7. A safetensors `__metadata__` that is `null`, `[]`, `0` or `""` (coerced to empty).
|
|
39
|
+
8. A binding whose `ledger_len` is `true` for a ledger of one entry.
|
|
40
|
+
9. A receipt whose claim digests are numbers or have no `sha256:` prefix, matched by string coercion.
|
|
41
|
+
|
|
42
|
+
Python rejected, crashed on, or computed differently from the spec:
|
|
43
|
+
10. Dot files counted as weight files in a folder, which changed the weights root.
|
|
44
|
+
11. A directory named `x.safetensors` crashed it. `consolidated*.safetensors` was silently left out of a
|
|
45
|
+
folder's root; that Hub convention now applies only to Hub repos and CLI reads.
|
|
46
|
+
12. A later valid signature was ignored when an earlier one with the same key id failed.
|
|
47
|
+
13. `neyra.meta` that is not JSON crashed loading a patch.
|
|
48
|
+
14. A manifest that parses to a non-object gave `bad_json` and skipped the canonical check; the spec says
|
|
49
|
+
`not_canonical`, then `bad_type`.
|
|
50
|
+
15. A receipt whose `signatures` is missing or not a list gave the wrong code; the spec says `bad_json`.
|
|
51
|
+
16. Receipts and ledgers with invalid UTF-8, a non-object envelope, or malformed signature entries crashed with
|
|
52
|
+
an exception instead of returning a code.
|
|
53
|
+
|
|
54
|
+
Go accepted what it should have rejected:
|
|
55
|
+
17. A signature entry that is not an object, or lacks a string `sig`, with no key supplied.
|
|
56
|
+
|
|
57
|
+
Not a disagreement: patches that require `low-rank/1` are declined by Go, which the spec allows.
|
|
58
|
+
|
|
59
|
+
After the fixes, 119,458 mutants across nine kinds produced no disagreement.
|
|
60
|
+
|
|
61
|
+
### Spec
|
|
62
|
+
`spec/PROTOCOL.md` now says, in sections 3, 4, 5, 6 and 8: dot files and directories are skipped and
|
|
63
|
+
`consolidated.safetensors` is an ordinary shard; repeated header keys and non-object `__metadata__` are
|
|
64
|
+
`bad_safetensors`; `neyra.meta` is never parsed; a non-object manifest is `bad_type`; `shape`, `name` and
|
|
65
|
+
`dtype` types; ASCII digits and types in a ledger entry; envelope shape and canonical base64; every
|
|
66
|
+
signature with the key is tried; claim digests must be well formed; `ledger_len` is an integer.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Keep pull requests small.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
uv venv && uv pip install -e '.[dev]'
|
|
9
|
+
pytest -q
|
|
10
|
+
ruff check src tests
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Tests marked `model` need real weights and do not run by default.
|
|
14
|
+
|
|
15
|
+
## Changing a format
|
|
16
|
+
|
|
17
|
+
Anything that changes hashing or a format must update [`spec/PROTOCOL.md`](spec/PROTOCOL.md) and rerun
|
|
18
|
+
`spec/vectors/generate.py`. The Go verifier must still pass:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
cd impl/go && go run . vectors ../../spec/vectors
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Claims
|
|
25
|
+
|
|
26
|
+
A result claimed in the documentation needs a script in `bench` or `experiments` that reproduces it. State its
|
|
27
|
+
limits next to it. Failed results count.
|
|
28
|
+
|
|
29
|
+
## Writing a verifier
|
|
30
|
+
|
|
31
|
+
Work from the specification and the vectors alone, and open an issue about anything they leave unclear.
|
neyra-0.2.1/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
neyra-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: neyra
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Edit local model weights with patches that revert bit for bit.
|
|
5
|
+
Project-URL: Homepage, https://neyra.run
|
|
6
|
+
Project-URL: Source, https://github.com/noah-thing/neyra-protocol
|
|
7
|
+
Project-URL: Documentation, https://github.com/noah-thing/neyra-protocol/tree/main/docs
|
|
8
|
+
Project-URL: Changelog, https://github.com/noah-thing/neyra-protocol/blob/main/CHANGELOG.md
|
|
9
|
+
Project-URL: Issues, https://github.com/noah-thing/neyra-protocol/issues
|
|
10
|
+
Author: Noah
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: gguf,llm,lora,mcp,model-editing,model-signing,provenance,safetensors
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Requires-Dist: cryptography>=42
|
|
27
|
+
Requires-Dist: numpy>=1.26
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: cryptography>=43; extra == 'dev'
|
|
30
|
+
Requires-Dist: hypothesis; extra == 'dev'
|
|
31
|
+
Requires-Dist: jsonschema>=4; extra == 'dev'
|
|
32
|
+
Requires-Dist: mcp>=2.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-asyncio; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
35
|
+
Requires-Dist: pyyaml; extra == 'dev'
|
|
36
|
+
Requires-Dist: referencing; extra == 'dev'
|
|
37
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
38
|
+
Provides-Extra: eval
|
|
39
|
+
Requires-Dist: math-verify>=0.9; extra == 'eval'
|
|
40
|
+
Provides-Extra: gguf
|
|
41
|
+
Requires-Dist: gguf>=0.17; extra == 'gguf'
|
|
42
|
+
Provides-Extra: mcp
|
|
43
|
+
Requires-Dist: mcp>=2.0; extra == 'mcp'
|
|
44
|
+
Provides-Extra: mlx
|
|
45
|
+
Requires-Dist: mlx-lm>=0.32; extra == 'mlx'
|
|
46
|
+
Provides-Extra: torch
|
|
47
|
+
Requires-Dist: accelerate; extra == 'torch'
|
|
48
|
+
Requires-Dist: torch>=2.6; extra == 'torch'
|
|
49
|
+
Requires-Dist: transformers>=5.0; extra == 'torch'
|
|
50
|
+
Description-Content-Type: text/markdown
|
|
51
|
+
|
|
52
|
+
<p align="center">
|
|
53
|
+
<picture>
|
|
54
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/noah-thing/neyra-protocol/main/docs/assets/logo-dark.svg">
|
|
55
|
+
<img src="https://raw.githubusercontent.com/noah-thing/neyra-protocol/main/docs/assets/logo-light.svg" alt="Neyra" width="260">
|
|
56
|
+
</picture>
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
<p align="center">Neyra edits the weights of local language models.</p>
|
|
60
|
+
|
|
61
|
+
<p align="center">
|
|
62
|
+
<a href="https://github.com/noah-thing/neyra-protocol/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/noah-thing/neyra-protocol/actions/workflows/ci.yml/badge.svg"></a>
|
|
63
|
+
<a href="https://github.com/noah-thing/neyra-protocol/blob/main/LICENSE"><img alt="Apache 2.0" src="https://img.shields.io/badge/license-Apache_2.0-blue"></a>
|
|
64
|
+
<img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue">
|
|
65
|
+
<a href="https://github.com/noah-thing/neyra-protocol/blob/main/spec/PROTOCOL.md"><img alt="312 conformance vectors" src="https://img.shields.io/badge/conformance-312_vectors-brightgreen"></a>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<p align="center">
|
|
69
|
+
<a href="#install">Install</a> ·
|
|
70
|
+
<a href="#usage">Usage</a> ·
|
|
71
|
+
<a href="#commands">Commands</a> ·
|
|
72
|
+
<a href="#design">Design</a> ·
|
|
73
|
+
<a href="#results">Results</a> ·
|
|
74
|
+
<a href="#documentation">Docs</a> ·
|
|
75
|
+
<a href="https://github.com/noah-thing/neyra-protocol/blob/main/spec/PROTOCOL.md">Spec</a>
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
Neyra writes facts and behaviour changes into safetensors checkpoints. An edit is a patch: about 170 KB for one fact
|
|
81
|
+
on Qwen3-0.6B, tied to the digest of its base, and reversible bit for bit. `neyra edit` uses a MEMIT style closed form
|
|
82
|
+
solve across several MLP layers. `neyra fix` finds the direction behind a reasoning loop and writes a patch that
|
|
83
|
+
projects it out of the columns that write it.
|
|
84
|
+
|
|
85
|
+
It also reads changes made with other tools. `diff` recovers the form of an edit from two checkpoints, `check`
|
|
86
|
+
recomputes a LoRA merge with the rounding PEFT and mlx-lm use, and `hop` walks base, adapter, merged model and GGUF to
|
|
87
|
+
the first one that differs.
|
|
88
|
+
|
|
89
|
+
<picture>
|
|
90
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/noah-thing/neyra-protocol/main/docs/assets/terminal-dark.svg">
|
|
91
|
+
<img src="https://raw.githubusercontent.com/noah-thing/neyra-protocol/main/docs/assets/terminal-light.svg" alt="neyra diff on the Weight-Space Programming edit" width="100%">
|
|
92
|
+
</picture>
|
|
93
|
+
|
|
94
|
+
`neyra diff` on the loop edit from [Sparks of Weight-Space Programming](https://rikiyat.github.io/blog/weight-space-programming/),
|
|
95
|
+
reading 4% of both checkpoints over HTTP range requests. The authors' notes give the same formula with a strength of 6.
|
|
96
|
+
|
|
97
|
+
## Install
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
pip install neyra # or: uv tool install neyra
|
|
101
|
+
neyra demo
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Needs Python 3.10 or later. The base install handles patches, diffs and verification with numpy and cryptography. To
|
|
105
|
+
run models, add `neyra[mlx]` on Apple Silicon or `neyra[torch]` elsewhere. `neyra edit` needs MLX. `neyra doctor`
|
|
106
|
+
lists the backends you have.
|
|
107
|
+
|
|
108
|
+
`neyra demo` takes about 0.1 s and downloads nothing. It builds a toy model and a LoRA in memory, then runs `check` on
|
|
109
|
+
a merge that dropped the adapter and on one that kept it.
|
|
110
|
+
|
|
111
|
+
## Usage
|
|
112
|
+
|
|
113
|
+
Paths and Hugging Face repo names both work.
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
neyra probe MODEL # loops, runaway thinking, missing answers
|
|
117
|
+
neyra fix MODEL -o fix.neyra # candidate patch for a loop direction
|
|
118
|
+
neyra edit MODEL facts.json -o edit.neyra # write facts, measure, sign
|
|
119
|
+
neyra apply MODEL edit.neyra -o edited-model # rebuild, checking digests
|
|
120
|
+
|
|
121
|
+
neyra diff BASE OTHER --sample 4 # compare two checkpoints from a few percent of the bytes
|
|
122
|
+
neyra check BASE MERGED --adapter ADAPTER # recompute a LoRA merge and compare bits
|
|
123
|
+
neyra hop BASE ADAPTER MERGED model.gguf # first artifact that differs
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Commands
|
|
127
|
+
|
|
128
|
+
**Edit**
|
|
129
|
+
|
|
130
|
+
| Command | |
|
|
131
|
+
|---|---|
|
|
132
|
+
| [`edit`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/edit.md) | Write facts as a low rank patch. Exits 1 if it misses its gates |
|
|
133
|
+
| `fix` | Find a loop direction and write a candidate patch |
|
|
134
|
+
| `probe` | Run a fixed battery and report loops, runaway thinking and missing answers |
|
|
135
|
+
| `patch`, `apply`, `show` | Write the difference between two checkpoints as a patch, rebuild from it, inspect it |
|
|
136
|
+
| [`merge`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/merge.md) | Sum patches on one base with exact arithmetic. Order does not change the bytes |
|
|
137
|
+
| [`bisect`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/bisect.md) | Find the smallest part of a patch that keeps its effect |
|
|
138
|
+
| `export` | Write a patch as a LoRA for PEFT or llama.cpp |
|
|
139
|
+
|
|
140
|
+
**Inspect**
|
|
141
|
+
|
|
142
|
+
| Command | |
|
|
143
|
+
|---|---|
|
|
144
|
+
| [`diff`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/accuracy.md) | Compare two checkpoints and name the form of the change |
|
|
145
|
+
| [`check`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/check.md) | Recompute a merge per tool and compare bits |
|
|
146
|
+
| [`hop`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/hop.md) | Report the first artifact that differs across base, adapter, merged model and GGUF |
|
|
147
|
+
| [`identity`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/identity.md) | Compare a model with its declared base: same weights, named transform, derivative, unrelated |
|
|
148
|
+
|
|
149
|
+
**Sign**
|
|
150
|
+
|
|
151
|
+
| Command | |
|
|
152
|
+
|---|---|
|
|
153
|
+
| [`attest`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/signing.md), `render`, `supersede`, `withdraw`, `status` | Sign a statement of a change for OpenSSF model signing and CycloneDX tools |
|
|
154
|
+
| `verify`, `log`, `keygen` | Check receipts and hash chained ledgers |
|
|
155
|
+
| [`index`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/protocol.md), `prove` | Prove rows of a tensor against a root by reading only those rows |
|
|
156
|
+
| `conformance` | Run the test vectors against your install |
|
|
157
|
+
|
|
158
|
+
**Automate**
|
|
159
|
+
|
|
160
|
+
| | |
|
|
161
|
+
|---|---|
|
|
162
|
+
| [`neyra mcp`](https://github.com/noah-thing/neyra-protocol/blob/main/docs/lab.md) | MCP server for agents, with a fixed budget, a sealed holdout and a hash chained ledger |
|
|
163
|
+
| [`action.yml`](https://github.com/noah-thing/neyra-protocol/blob/main/action.yml) | GitHub Action that fails a job when a merge does not match its adapter |
|
|
164
|
+
| [`hf-neyra`](https://github.com/noah-thing/neyra-protocol/blob/main/extensions/hf-neyra) | `hf neyra diff` and `hf neyra check` |
|
|
165
|
+
|
|
166
|
+
## Design
|
|
167
|
+
|
|
168
|
+
A patch is a safetensors file, so loading one runs no code. It records the digest of the tensors it expects and the
|
|
169
|
+
digest it produces, and `apply` stops on a mismatch. The weights root hashes every tensor and ignores sharding, so a
|
|
170
|
+
resharded model keeps its root.
|
|
171
|
+
|
|
172
|
+
`merge` sums deltas as integers and rounds once, because bf16 addition does not associate. At an entry with value
|
|
173
|
+
1 - 2^-8, three patches that each add 2^-8 give 1.0 in pairs and 1 + 2^-7 together.
|
|
174
|
+
|
|
175
|
+
`neyra edit` solves in float64 and measures the rounded weights the patch produces. Its gates cover efficacy,
|
|
176
|
+
neighbouring facts, drift on neutral text and fluency. The limits ship in the code, not in your run, and the receipt
|
|
177
|
+
keeps a FAIL as well as a PASS.
|
|
178
|
+
|
|
179
|
+
Output separates what you can recompute from what was measured. Sampled reads report their coverage. `identity` calls
|
|
180
|
+
a model derived against distances measured on unrelated sibling models. A signature tells you who signed, so a receipt
|
|
181
|
+
also lists what you need to rerun the claim.
|
|
182
|
+
|
|
183
|
+
`hop` takes artifacts in the order a fine-tune passed through them:
|
|
184
|
+
|
|
185
|
+
<picture>
|
|
186
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/noah-thing/neyra-protocol/main/docs/assets/hops-dark.svg">
|
|
187
|
+
<img src="https://raw.githubusercontent.com/noah-thing/neyra-protocol/main/docs/assets/hops-light.svg" alt="base, adapter, merged and GGUF, with merged marked as the first hop that differs" width="100%">
|
|
188
|
+
</picture>
|
|
189
|
+
|
|
190
|
+
## Results
|
|
191
|
+
|
|
192
|
+
| | Result | Rerun |
|
|
193
|
+
|---|---|---|
|
|
194
|
+
| `edit`, Qwen3-0.6B, 200 unseen CounterFact cases | Efficacy 1.00, paraphrase 0.95, neighbours 0.70 (0.745 before) | [`bench/edit_counterfact.py`](https://github.com/noah-thing/neyra-protocol/blob/main/bench/edit_counterfact.py) |
|
|
195
|
+
| `diff`, planted edits, 50 trials each | 100% form recovery on 12 of 14 conditions, 0 false alarms in 250 noise trials | [`bench/forensics.py`](https://github.com/noah-thing/neyra-protocol/blob/main/bench/forensics.py) |
|
|
196
|
+
| `check`, real merges | PEFT 0.21.2 and mlx-lm 0.32.2 in fp32, bf16 and fp16, matched bit for bit | [`tests/test_check_real.py`](https://github.com/noah-thing/neyra-protocol/blob/main/tests/test_check_real.py) |
|
|
197
|
+
| `merge` | Matches brute force rounding on all 24 orders of four patches | [`tests/test_merge.py`](https://github.com/noah-thing/neyra-protocol/blob/main/tests/test_merge.py) |
|
|
198
|
+
| Python and Go verifiers | Agree on 312 vectors and on mutated inputs from a differential fuzzer | [`fuzz/differential.py`](https://github.com/noah-thing/neyra-protocol/blob/main/fuzz/differential.py) |
|
|
199
|
+
|
|
200
|
+
So far these edits rewrite facts and remove loops. None has been shown to add ability. ROME led `edit` on the 20
|
|
201
|
+
development cases compared, and the full comparison is unfinished. Nothing has been tested above 1B parameters. The
|
|
202
|
+
[limits page](https://github.com/noah-thing/neyra-protocol/blob/main/docs/limits.md) has the rest.
|
|
203
|
+
|
|
204
|
+
## Documentation
|
|
205
|
+
|
|
206
|
+
Guides: [edit](https://github.com/noah-thing/neyra-protocol/blob/main/docs/edit.md), [merge](https://github.com/noah-thing/neyra-protocol/blob/main/docs/merge.md), [bisect](https://github.com/noah-thing/neyra-protocol/blob/main/docs/bisect.md), [check](https://github.com/noah-thing/neyra-protocol/blob/main/docs/check.md), [hop](https://github.com/noah-thing/neyra-protocol/blob/main/docs/hop.md), [identity](https://github.com/noah-thing/neyra-protocol/blob/main/docs/identity.md), [signing](https://github.com/noah-thing/neyra-protocol/blob/main/docs/signing.md), [lab](https://github.com/noah-thing/neyra-protocol/blob/main/docs/lab.md).
|
|
207
|
+
|
|
208
|
+
Reference: [specification](https://github.com/noah-thing/neyra-protocol/blob/main/spec/PROTOCOL.md), [protocol notes](https://github.com/noah-thing/neyra-protocol/blob/main/docs/protocol.md), [vectors](https://github.com/noah-thing/neyra-protocol/blob/main/spec/vectors), [accuracy](https://github.com/noah-thing/neyra-protocol/blob/main/docs/accuracy.md), [limits](https://github.com/noah-thing/neyra-protocol/blob/main/docs/limits.md), [prior work](https://github.com/noah-thing/neyra-protocol/blob/main/docs/prior-work.md), [changelog](https://github.com/noah-thing/neyra-protocol/blob/main/CHANGELOG.md).
|
|
209
|
+
|
|
210
|
+
## Status
|
|
211
|
+
|
|
212
|
+
Early. Formats can change until v1.
|
|
213
|
+
|
|
214
|
+
See [CONTRIBUTING.md](https://github.com/noah-thing/neyra-protocol/blob/main/CONTRIBUTING.md) to work on it and [SECURITY.md](https://github.com/noah-thing/neyra-protocol/blob/main/SECURITY.md) to report a vulnerability. If you
|
|
215
|
+
write a verifier from the spec and vectors, open an issue. The Go one here shares an author with the Python one.
|
|
216
|
+
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
[Apache 2.0](https://github.com/noah-thing/neyra-protocol/blob/main/LICENSE)
|