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.0.tar.gz (45.0 kB view details)

Uploaded Source

File details

Details for the file modelvet-0.1.0.tar.gz.

File metadata

  • Download URL: modelvet-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 350ea5007da7987f27f3d327c7a5112cda33b9810ba71dc8dbfe5e423bf6dd95
MD5 57831ef84443b86ad9a98fdaee015f80
BLAKE2b-256 097314df56f14f57f050859826cab76a34ee0711baa0210993e6109a0cfa652b

See more details on using hashes here.

Provenance

The following attestation bundles were made for modelvet-0.1.0.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