abstraction-model, in Python
Whether two strings from two hosts name one model. Hugging Face, Ollama, LM Studio and a directory on disk each write the same weights a different way, so an application that has already downloaded a model cannot tell that the one it is about to fetch is the same file.
Every token that is not known packaging is kept. The reverse rule — a list of noise to strip — collapses a fine-tune onto the model it was tuned from, and then a request for one is answered by the other. One module, standard library only, importing nothing of ours.
This page is the Python package. The Go implementation, the store side and what
is UNPROVEN are on
the repository.
Install
Not on PyPI, and the name on PyPI is not ours.
git clone https://github.com/openabstractions/abstraction-model
pip install ./abstraction-model/python
Python 3.9 or later. abstraction_model.py is one file with no imports of ours,
so copying it into a _vendor/ directory of your own is an equally complete
installation.
An example that runs
import abstraction_model as model
a = "bartowski/Qwen2.5-0.5B-Instruct-GGUF/Qwen2.5-0.5B-Instruct-IQ2_M.gguf"
b = "qwen2.5:0.5b-instruct-q4_K_M"
print(model.parse(a))
print(model.parse(b))
print("same model:", model.same(a, b))
print("same file: ", model.parse(a) == model.parse(b))
Two quantisations of one model are the same model and are still two files on
disk, and that is the distinction the layer exists to make: same answers the
routing question, equality of the parsed Name answers the storage one.
What an application calls
| call | what it does |
|---|---|
parse(s) |
a Name with family and quant |
family(s) |
the family alone: what survives packaging, host prefixes and file extensions |
same(a, b) |
whether two host identifiers name one model for routing |
shard(name) |
the shard a multi-file model's part belongs to, when the name says |
What may break
- This module answers about names and nothing else. It does not download, does not hash and never touches a store.
- The algorithm is a judgment, not a standard. It is compared against the Go implementation over a shared corpus of identifiers, so the two agree; there is no third party to be right against.
- No conformance verdict. No scenario in the suite cites this layer yet — what is proven and what is not.
- Not on any package index, and no release carries an API stability promise. Pin a commit you have read.
Apache-2.0. See LICENSE.
Metadata
Release files for abstraction-model 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| abstraction_model-0.1.0.tar.gz | 8.5 kB | With provenance | Details for abstraction_model-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| abstraction_model-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for abstraction_model-0.1.0-py3-none-any.whl |
Total release size: 17.6 kB
Release files / abstraction_model-0.1.0.tar.gz
| Download URL | abstraction_model-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a02aa09cb2147004682a324646fefe36873a0d4b83ebb713dedf43a84f50629a
|
|
BLAKE2b-256 checksum How to use checksums |
75105ced279cd433e747e46ae041aa325208329cbe58637e3628eb6932cdf7ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / abstraction_model-0.1.0-py3-none-any.whl
| Download URL | abstraction_model-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3283f73665de720115455ba64798ccbe8bb87dc77d0a3a9ee84d3292ee64305b
|
|
BLAKE2b-256 checksum How to use checksums |
e61acda46e6c53bb800f194c80e2c93a9201dc93e54c285c019740f6d1d59177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logSecurity for abstraction-model 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for abstraction_model-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.