$npx skillfedfor your agent

sam4onnx

A very simple tool to rewrite parameters such as attributes and constants for OPs in ONNX models. Simple Attribute and Constant Modifier for ONNX.

With conditionsPyPI Artificial IntelligenceReleased Feb 202683.0K downloads / moMIT LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sam4onnx-2.0.0-py3-none-any.whl
v2.0.0 · released 2026-02-06 · Python >=3.6

Yes, if you need to edit ONNX operator parameters post-export. Low install friction, no dependencies, permissive license, and straightforward API make it a practical choice for model tweaking. Aging maintenance (189 days since last release) is a minor concern but not a blocker for a stable utility tool. Verify that graph-level side effects of your edits are acceptable before relying on it in production pipelines.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with no runtime dependencies.
  • Maintenance status is aging—last release 189 days ago—but the repository remains active and targets current Python versions.

License · maintenance · safety

MIT License (permissive) — MIT License permits commercial and private use, modification, and distribution with minimal restrictions, making it suitable for most projects.

last release 2026-02-06 (189 days) · last repo commit 2026-02-06 · 15 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 82,975 downloads/mo, #14,113 on PyPI

Verify before relying

pip install sam4onnx

from sam4onnx import modify

modified = modify(
    input_onnx_file_path='model.onnx',
    output_onnx_file_path='modified.onnx',
    op_name='Transpose_17',
    attributes={'perm': [0, 1]}
)
  • Whether graph integrity validation is performed after modifications beyond the documented single-OP scope.
  • Performance characteristics when working with large models or deeply nested subgraph structures.
  • Compatibility with ONNX opset versions beyond what the fact sheet documents.
Same gist for agents: .md · .json

What it is and what it does

sam4onnx is a lightweight utility for modifying operator attributes and constant inputs in ONNX models. It accepts either a file path to an .onnx model or an in-memory onnx.ModelProto object, locates a specified operator by name, and rewrites its attributes or the constants feeding into it. The tool operates on a single operator at a time and includes support for recursive modification within If operator subgraphs.

The package provides both a command-line interface and a Python API. It does not validate the overall graph integrity after modifications—that responsibility falls to the user. It is designed for simple, targeted edits rather than comprehensive model transformation, making it useful for quick parameter adjustments, debugging, or preparing models for deployment with modified hyperparameters.

Use it for

  • Adjust operator attributes (e.g., transpose permutation, reshape dimensions) in an exported ONNX model without retraining.
  • Modify constant tensor values feeding into operators to test different hyperparameters or thresholds.
  • Batch-edit multiple models' parameters via CLI for deployment pipeline automation.
  • Recursively update parameters in conditional branches (If operators) across a model's subgraph structure.
  • Prepare quantized or pruned models by rewriting shape metadata or operator-specific configuration.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to edit ONNX operator parameters post-export.

Low install friction, no dependencies, permissive license, and straightforward API make it a practical choice for model tweaking. Aging maintenance (189 days since last release) is a minor concern but not a blocker for a stable utility tool. Verify that graph-level side effects of your edits are acceptable before relying on it in production pipelines.

Install

sam4onnx on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging—last release 189 days ago—but the repository remains active and targets current Python versions.

License in practice

MIT License permits commercial and private use, modification, and distribution with minimal restrictions, making it suitable for most projects.

Quickstart

pip install sam4onnx

from sam4onnx import modify

modified = modify(
    input_onnx_file_path='model.onnx',
    output_onnx_file_path='modified.onnx',
    op_name='Transpose_17',
    attributes={'perm': [0, 1]}
)

Verify before relying

  • Whether graph integrity validation is performed after modifications beyond the documented single-OP scope.
  • Performance characteristics when working with large models or deeply nested subgraph structures.
  • Compatibility with ONNX opset versions beyond what the fact sheet documents.

Package facts

LicenseMIT License permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 189 days since the last release
Last repo commit
First released
Downloads82,975 / month, #14,113 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: sam4onnx-2.0.0-py3-none-any.whl

Tags

Capabilities
onnx model attribute modifierrewrite onnx operator parametersonnx constant editormodify onnx graph attributesonnx op parameter tuningonnx model parameter adjustmentsimple onnx editing tool
Topics
onnx-toolsmodel-editingml-ops

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “onnx model attribute modifier”

  • sam4onnxRewrites attributes and constants in ONNX model operators via CLI or…
  • soc4onnxChanges the opset version of an ONNX model graph, either via…
  • sod4onnxsod4onnx removes specified output operations from ONNX model files,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also onnxscript · sng4onnx · sed4onnx · soc4onnx · sna4onnx · sio4onnx · soa4onnx · sor4onnx · sod4onnx · sog4onnx