{"id":22278858,"url":"https://github.com/dreadnode/tensor-man","last_synced_at":"2025-07-28T18:30:52.431Z","repository":{"id":259457611,"uuid":"877978232","full_name":"dreadnode/tensor-man","owner":"dreadnode","description":"A utility to inspect, validate, sign and verify machine learning model files.","archived":false,"fork":false,"pushed_at":"2025-02-05T16:36:54.000Z","size":133,"stargazers_count":57,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-03T09:54:38.345Z","etag":null,"topics":["gguf","onnx","pytorch","safetensors"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreadnode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T15:07:42.000Z","updated_at":"2025-04-26T12:49:48.000Z","dependencies_parsed_at":"2024-11-16T03:26:02.629Z","dependency_job_id":"600cdb94-b04b-41a8-ad4a-85b8546d6c99","html_url":"https://github.com/dreadnode/tensor-man","commit_stats":null,"previous_names":["dreadnode/tman","dreadnode/tensor-man"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/dreadnode/tensor-man","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Ftensor-man","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Ftensor-man/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Ftensor-man/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Ftensor-man/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreadnode","download_url":"https://codeload.github.com/dreadnode/tensor-man/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreadnode%2Ftensor-man/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267563492,"owners_count":24108097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gguf","onnx","pytorch","safetensors"],"created_at":"2024-12-03T15:16:51.547Z","updated_at":"2025-07-28T18:30:52.416Z","avatar_url":"https://github.com/dreadnode.png","language":"Rust","readme":"# tensor-man\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/dreadnode/tensor-man/releases/latest\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/release/dreadnode/tensor-man.svg?style=fl_pathat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/tensor-man\"\u003e\u003cimg alt=\"Crate\" src=\"https://img.shields.io/crates/v/tensor-man.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/dreadnode/tensor-man\"\u003e\u003cimg alt=\"Docker Hub\" src=\"https://img.shields.io/docker/v/dreadnode/tensor-man?logo=docker\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://rust-reportcard.xuri.me/report/github.com/dreadnode/tensor-man\"\u003e\u003cimg alt=\"Rust Report\" src=\"https://rust-reportcard.xuri.me/badge/github.com/dreadnode/tensor-man\"\u003e\u003c/a\u003e\n  \u003ca href=\"#\"\u003e\u003cimg alt=\"GitHub Actions Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/dreadnode/tensor-man/test.yml\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/dreadnode/tensor-man/blob/master/LICENSE.md\"\u003e\u003cimg alt=\"Software License\" src=\"https://img.shields.io/badge/license-GPL3-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n`tensor-man` is a utility to inspect, validate, sign and verify machine learning model files.\n\n## Supported Formats\n\n* [safetensors](https://github.com/huggingface/safetensors)\n* [ONNX](https://onnx.ai/)\n* [GGUF](https://huggingface.co/docs/hub/gguf)\n* [PyTorch](https://pytorch.org/)\n\n\u003e [!IMPORTANT]\n\u003e PyTorch models are loaded and inspected in a networkless Docker container in order to prevent [unintended code execution](https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models) on the host machine.\n\n## Install with Cargo\n\nThis is the recommended way to install and use the tool:\n\n```bash\ncargo install tensor-man\n```\n\n## Pull from Docker Hub\n\n```bash\ndocker pull dreadnode/tensor-man:latest\n```\n\n## Build Docker image\n\nTo build your own Docker image for the tool, run:\n\n```bash\ndocker build . -t tman  \n```\n\n## Note about Docker\n\nIf you want to inspect PyTorch models and you are using `tensor-man` inside a container, make sure to share the docker socket from the host machine with the container:\n\n```bash\ndocker run -it \\\n  # these paths must match\n  -v/path/to/pytorch_model.bin:/path/to/pytorch_model.bin \\\n  # allow the container itself to instrument docker on the host\n  -v/var/run/docker.sock:/var/run/docker.sock \\\n  # the rest of the command line\n  tman inspect /path/to/pytorch_model.bin\n```\n\n## Build from source\n\nAlternatively you can build the project from source, in which case you'll need to have Rust and Cargo [installed on your system](https://rustup.rs/).\n\nOnce you have those set up, clone the repository and build the project:\n\n```bash\ncargo build --release\n```\n\nThe compiled binary will be available in the `target/release` directory. You can run it directly or add it to your system's PATH:\n\n```bash\n# Run directly\n./target/release/tman\n\n# Or, copy to a directory in your PATH (e.g., /usr/local/bin)\nsudo cp target/release/tman /usr/local/bin/\n```\n\n## Usage\n\n### Inspect\n\nInspect a file and print a brief summary:\n\n```bash\ntman inspect /path/to/whatever/llama-3.1-8b-instruct.safetensors\n```\n\nPrint detailed information about each tensor:\n\n```bash\ntman inspect /path/to/whatever/llama-3.1-8b-instruct.safetensors --detail full\n```\n\nFilter by tensor name:\n\n```bash\ntman inspect /path/to/whatever/llama-3.1-8b-instruct.onnx -D full --filter \"q_proj\"\n```\n\nSave the output as JSON:\n\n```bash\ntman inspect /path/to/whatever/llama-3.1-8b-instruct.gguf -D full --to-json output.json\n```\n\n### Sign and Verify\n\nThe tool allows you to generate an Ed25519 key pair to sign your models:\n\n```bash\ntman create-key --private-key private.key --public-key public.key\n```\n\nThen you can use the private key to sign a model (this will automatically include and sign external data files if referenced by the format):\n\n```bash\n# this will generate the tinyyolov2-8.signature file\ntman sign /path/to/whatever/tinyyolov2-8.onnx -K /path/to/private.key\n\n# you can provide a safetensors index file and all files referenced by it will be signed as well\ntman sign /path/to/whatever/Meta-Llama-3-8B/model.safetensors.index.json -K /path/to/private.key\n\n# this will sign the entire model folder with every file in it\ntman sign /path/to/whatever/Meta-Llama-3-8B/ -K /path/to/private.key\n```\nAnd the public one to verify the signature:\n\n```bash\n# will verify the signature in tinyyolov2-8.signature\ntman verify /path/to/whatever/tinyyolov2-8.onnx -K /path/to/public.key\n\n# will verify with an alternative signature file \ntman verify /path/to/whatever/tinyyolov2-8.onnx -K /path/to/public.key --signature /path/to/your.signature\n\n# this will verify every file in the model folder\ntman sign /path/to/whatever/Meta-Llama-3-8B/ -K /path/to/public.key\n```\n\n### Inference Graph\n\nGenerate a .dot file for the execution graph of an ONNX model:\n\n```bash\ntman graph /path/to/whatever/tinyyolov2-8.onnx --output tinyyolov2-8.dot\n```\n\n### More\n\nFor the full list of commands and options, run:\n\n```bash\ntman --help\n\n# get command specific help\ntman inspect --help\n```\n\n## License\n\nThis tool is released under the GPL 3 license. To see the licenses of the project dependencies, install cargo license with `cargo install cargo-license` and then run `cargo license`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreadnode%2Ftensor-man","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreadnode%2Ftensor-man","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreadnode%2Ftensor-man/lists"}