Skip to main content

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

  1. MODELVET_LIBRARY (path to a shared library; make shared in the repository builds build/libmodelvet.so),
  2. the packaged modelvet/_native module built from the vendored amalgamation at install time,
  3. a system libmodelvet found by ctypes.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modelvet-0.1.1.tar.gz (45.0 kB view details)

Uploaded Source

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

Hashes for modelvet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 862bc4d1bf6ab2270e5e465587fe36f0917eec257fe001ab9037d3309269083a
MD5 721800505cb60aa51ed0e3c3359a44c0
BLAKE2b-256 051b5ef9ffdd6a2b411fbba76b154a0fd733fb545e7ae0fcbf931cb184a061c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for modelvet-0.1.1.tar.gz:

Publisher: publish-pypi.yml on tetsuo-ai/modelvet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page