metrik-torch
Observed ModelGraph extraction from a real nn.Module tree.
$ pip install "metrik-torch[torch]"
$ metrik explore ./models/TinyLlama-1.1B --loader torch
The counterpart to metrik-explorer, which reads safetensors headers and config.json and
never imports torch. This package walks the actual module tree, so module classes, parameter
ownership, and weight tying are observed facts rather than claims from a config file.
Tying in particular: an untied lm_head has exactly the same shape as the embedding it does
not share, so shape is not evidence. Here it is established by storage identity.
What it still does not know
Dataflow. nn.Module records containment, not what feeds what, so edges is None and
fidelity is structural. Recovering real edges needs tracing, which breaks on the dynamic
control flow most model implementations have. A consumer that needs edges checks fidelity
and refuses rather than reading a containment tree as a dataflow graph.
No forward pass, no device transfer, no weight value read — module structure and parameter metadata only.
Why torch is an optional extra
uv sync --all-packages --dev stays torch-free so the CI matrix keeps running in about a
minute. One dedicated job installs the extra and exercises extraction. See
ADR 007.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metrik_torch-0.1.0.tar.gz.
File metadata
- Download URL: metrik_torch-0.1.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb619f266f32d1688c64826fcbb1d207a404e6d6bc05dc7141f6cbfdd4662e9
|
|
| MD5 |
752d39a6f2d645a37922c73f26d4f284
|
|
| BLAKE2b-256 |
c07fafe192aa079e6c1b035ce7621cca20ef1609ced8c166f5c444b9d691cd34
|
Provenance
The following attestation bundles were made for metrik_torch-0.1.0.tar.gz:
Publisher:
release.yml on Asmodeus14/Metrik
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metrik_torch-0.1.0.tar.gz -
Subject digest:
6cb619f266f32d1688c64826fcbb1d207a404e6d6bc05dc7141f6cbfdd4662e9 - Sigstore transparency entry: 2303083202
- Sigstore integration time:
-
Permalink:
Asmodeus14/Metrik@313a81ac0f5125640aa6e50ad581f8742714c787 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Asmodeus14
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@313a81ac0f5125640aa6e50ad581f8742714c787 -
Trigger Event:
push
-
Statement type:
File details
Details for the file metrik_torch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: metrik_torch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9d63f73fde367c682a650345a3eada5e7780781de6907d7e1364a48ac209bc6
|
|
| MD5 |
38cc620367e1bfa51be335d6ac993392
|
|
| BLAKE2b-256 |
5538ff05c1dcc1a5189fdd049db76a20b0a63ce06b9f1595e28985754c24bab2
|
Provenance
The following attestation bundles were made for metrik_torch-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Asmodeus14/Metrik
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metrik_torch-0.1.0-py3-none-any.whl -
Subject digest:
c9d63f73fde367c682a650345a3eada5e7780781de6907d7e1364a48ac209bc6 - Sigstore transparency entry: 2303083258
- Sigstore integration time:
-
Permalink:
Asmodeus14/Metrik@313a81ac0f5125640aa6e50ad581f8742714c787 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Asmodeus14
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@313a81ac0f5125640aa6e50ad581f8742714c787 -
Trigger Event:
push
-
Statement type: