Verify-before-load structural validation for GGUF and safetensors model files
Project description
modelvet (Python binding)
Verify-before-load structural validation for GGUF and safetensors model files. ctypes binding over the modelvet C library: fixed memory, checked arithmetic, bounded work, no allocation inside the validator.
import modelvet
report = modelvet.verify_path("model.safetensors")
if not report.accepted:
print(report.violation_name, report.violation, hex(report.offset))
A malformed file is a normal result: a Report with a REJECT verdict
and the first precise violation, not an exception. Exceptions are
reserved for API misuse (ModelvetArgumentError), arena exhaustion
(ModelvetArenaError), and a missing native library.
An ACCEPT verdict is structural only: it says nothing about model behavior, provenance, or poisoned weights. See the project's INTEGRATION.md for the full contract.
Native library resolution
MODELVET_LIBRARY(path to a shared library;make sharedin the repository buildsbuild/libmodelvet.so),- the packaged
modelvet/_nativemodule built from the vendored amalgamation at install time, - a system
libmodelvetfound byctypes.util.find_library.
If the library was built with raised MVET_MAX_* caps, set
MODELVET_ARENA_BYTES to at least its recomputed worst-case bound.
MIT. Copyright (c) 2026 AgenC (tetsuo-ai).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file modelvet-0.1.1.tar.gz.
File metadata
- Download URL: modelvet-0.1.1.tar.gz
- Upload date:
- Size: 45.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
862bc4d1bf6ab2270e5e465587fe36f0917eec257fe001ab9037d3309269083a
|
|
| MD5 |
721800505cb60aa51ed0e3c3359a44c0
|
|
| BLAKE2b-256 |
051b5ef9ffdd6a2b411fbba76b154a0fd733fb545e7ae0fcbf931cb184a061c9
|
Provenance
The following attestation bundles were made for modelvet-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on tetsuo-ai/modelvet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelvet-0.1.1.tar.gz -
Subject digest:
862bc4d1bf6ab2270e5e465587fe36f0917eec257fe001ab9037d3309269083a - Sigstore transparency entry: 2341295276
- Sigstore integration time:
-
Permalink:
tetsuo-ai/modelvet@ed0e308bcce45c998e1a2d77ee1f303a1b3a420f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tetsuo-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ed0e308bcce45c998e1a2d77ee1f303a1b3a420f -
Trigger Event:
workflow_dispatch
-
Statement type: