--- id: torch-model-archiver version: "0.12.0" license: Apache License Version 2.0 license_treatment: permissive maintenance: abandoned --- # torch-model-archiver — Torch Model Archiver is used for creating archives of trained neural net models that can be consumed by TorchServe inference License: permissive · Maintenance: abandoned · Downloads: 103.5K/mo ## What it is and what it does Torch Model Archiver is a command-line tool that packages trained PyTorch neural network models into .mar (model archive) files suitable for inference serving with TorchServe. It bundles the model weights, architecture, and a handler script into a single deployable artifact that TorchServe can load and use to serve predictions. The tool is part of the TorchServe ecosystem but can be installed standalone. The package has low install friction—it depends only on enum-compat—and is distributed as a pure Python wheel. However, the underlying repository is archived and marked as abandoned, meaning no active development or maintenance is occurring. The last release was in September 2024, and while no known vulnerabilities are recorded, the lack of ongoing maintenance may be a concern for long-term production use or compatibility with future PyTorch versions. Use it for: - Package a trained PyTorch model into a .mar file for deployment on a TorchServe inference server. - Automate model archiving in a CI/CD pipeline to prepare models for production serving. - Bundle custom inference handlers with model weights for standardized deployment across teams. - Create reproducible model archives for sharing trained models with consistent serving configuration. - Prepare models for containerized inference services that consume TorchServe-compatible archives. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Torch Model Archiver creates .mar archive files from trained neural network models for deployment with TorchServe inference serving. Yes, if you are already using TorchServe and need to package models for serving—it is the standard tool for that task and has low install friction. However, approach with caution for new projects: the repository is archived and maintenance is abandoned, so security patches and compatibility updates with future PyTorch versions are unlikely. Evaluate whether TorchServe itself remains actively maintained and suitable for your deployment strategy. ## Install pip install torch-model-archiver uv add torch-model-archiver poetry add torch-model-archiver ## Installing torch-model-archiver Before you install: Low install friction with a single lightweight runtime dependency. However, the repository is archived and maintenance is abandoned as of the latest release on 2024-09-30, with no commits since 2025-08-06. License in practice: Apache License Version 2.0 is permissive, allowing commercial use, modification, and distribution with minimal restrictions—suitable for most projects. Quickstart: pip install torch-model-archiver from torch_model_archiver.model_packaging import package_model package_model(model_name, model_path, handler, export_path) Requires PyTorch and a trained model file; TorchServe is needed to serve the resulting .mar archive. Verify before relying: - Whether the archived repository will receive security patches or bug fixes if issues are discovered. - Compatibility with recent PyTorch and TorchServe versions given the abandoned maintenance status. - Whether enum-compat dependency has known issues or is actively maintained. ## Package facts - License: Apache License Version 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 103.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags torch model archiver, create mar files pytorch, torchserve model packaging, neural network model archive, pytorch model deployment, torchserve model preparation, deep learning model serving, model-serving, pytorch-ecosystem, archived [View on SkillFed](https://skillfed.io/packages/torch-model-archiver) · [View on PyPI](https://pypi.org/project/torch-model-archiver/)