Skip to main content

transformers-mic

logo

A Model Integration Contract (MIC) is a proposed standard: next to a Hub model, an executable check that it works in a framework, run by that framework's CI. Each MIC has three parts:

  • a fixture: a shrunk model built from the real checkpoint's config, with its tokenizer and processor files copied unchanged
  • a usage path: runnable Markdown that does what users do, such as generating text or running a training step
  • baselines: the outputs that usage produced, reviewed by a human

Words used throughout the docs:

  • checkpoint: the real Hub model a MIC covers (mistralai/Mistral-Large-4-1T-A52B).
  • fixture: the small model a MIC runs on CPU, built from one checkpoint by the recipe and published as huggingface-mic/<name>-mic. Older text, repository and file names say slim fixture or slim model: same thing.
  • shrink: the recipe step that turns the checkpoint's config into the fixture's (the shrunk config); tmic shrink shows what it kept.
  • tiny is not a MIC term: Transformers' own tiny-random-* test models are never fixtures or sources, and a checkpoint named tiny (openai/whisper-tiny) is a real checkpoint like any other.

Fixtures run on framework PRs (CPU, seconds); real checkpoints run after merge, nightly and before release. A fixture pass is a fast regression signal, not a pass for the real model.

This repository holds the tmic CLI, the fixture builder and the runner. MICs are published in huggingface-mic and pinned by the fleet dataset; coverage is in the coverage space. In Transformers, the contracts job runs on PRs and reports failures without blocking (status).

A proposed link lets agents discover a model's MIC on the Hub. Transformers checks fixtures on PRs and real checkpoints in run-slow or nightly jobs; Transformers.js has its own contract entry point and baseline, with CI triggers still to define.

Try it locally

pip install "transformers-mic[runtime]" "hf-doc-builder @ git+https://github.com/huggingface/doc-builder.git"
hf auth login
tmic fixture org/model --open

This shrinks org/model to a tiny config and weights in ./model-fixture/fixture/ and compares both with the real checkpoint: config values that changed, tensor names matched against the source, and a layer-by-layer page. It runs no contract code and calls no LLM. Edit fixture/config.json and rerun to shrink with your values.

Then build the whole contract around it, from the same directory (it keeps the fixture's revision and your config_overrides):

tmic run org/model --local-only --fixtures-only --no-history --bill-to ''

This drafts a contract for org/model, builds its fixture and records baselines on your machine, asks you to review each step, and uploads nothing. See Try it locally for the flags. tmic run --mode agent gives agents a JSON protocol for the same questions.

Cloud baselines and publication are for maintainers: CLI guide, cloud baselines (dashboard activation is still pending).

Documents

Start with:

  • CLI guide: tmic, from a checkpoint to a published MIC.
  • The standard: why MICs, the repository layout, manifest, checks and pins.
  • Fixtures: the shrink recipe and the weight experiments.
  • Evidence: replays, backfills, stability and cost.
  • Pilot: the proposed adoption pilot and the results so far.

Details: full example, technical design, Hub layout, fixtures in Transformers CI, Transformers CI proof, improving contracts, smoke vs assertions, problems and open questions, cloud baselines, end-to-end tests, agent walkthroughs, maintainer slides, changelog, releasing.

Metadata

Release files for transformers-mic 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transformers-mic 0.1.2
File Size Uploaded Provenance Actions
transformers_mic-0.1.2.tar.gz 1.3 MB With provenance Details for transformers_mic-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for transformers-mic 0.1.2
File Interpreter ABI Platform Actions
transformers_mic-0.1.2-py3-none-any.whl Python 3 none any Details for transformers_mic-0.1.2-py3-none-any.whl

Total release size: 2.7 MB

Release files / transformers_mic-0.1.2.tar.gz

Download URL transformers_mic-0.1.2.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
1a0297df134bcac170b7d6e1ef0f136631b6ffa704f8133c87118a884cbb0172
BLAKE2b-256 checksum
How to use checksums
00ea7725ff5e16820c9adc87dbd2002228590331d2c47025a457960964915c4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Release files / transformers_mic-0.1.2-py3-none-any.whl

Download URL transformers_mic-0.1.2-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f4eca2a4ebf7b981d3dc32ac88778799a7fd8961683bbd61c3e69f3ed6426b47
BLAKE2b-256 checksum
How to use checksums
26f2a6d832d203eba455d83994469a3d1ff212f8d5cc1249bc464c54bea1863e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Security for transformers-mic 0.1.2

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.

Select from 2 files

Attestation for transformers_mic-0.1.2.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 Nov 12, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page