Skip to content

fix(models): stop refusing every Transformers release but one - #896

Draft
thebeline wants to merge 4 commits into
Valtora:mainfrom
thebeline:pr/loosen-transformers-checks
Draft

thebeline wants to merge 4 commits into
Valtora:mainfrom
thebeline:pr/loosen-transformers-checks

Conversation

@thebeline

Copy link
Copy Markdown
Contributor

Draft: still in our own review. Please don't merge; we'll mark it ready.

This follows what we agreed on #892. If you're happy with it, including the inference test, which now compares outputs instead of versions but stays in, we'll mark it ready for review.

Pull Request

Description

The Nemotron loader and both forced-aligner loaders refused every Transformers release except the one we evaluated, and both asset manifests named that version. A Dependabot bump therefore switched Nemotron off (live labels fell back to clustering, final speakers to community-1) and dropped Canary's word timings, unless a hand-made PR like #868 moved the constants, manifests and evidence records together.

This removes what #725 and #735 added around the version:

  • the equality checks in nemotron_model.py and forced_aligner_native.py;
  • transformers_version in both asset manifests and their validators, so a bump no longer invalidates prepared files;
  • scripts/nemotron_compatibility.py, its test and its call in check_held_pins.py.

File hashes, the checkpoint revision, and the class, geometry, weight-key and shape checks stay. Nemotron's runtime fingerprint now records the installed Transformers version, so a saved live cache still isn't resumed across versions (the existing fallback to clustering). The opt-in CUDA golden checks the checkpoint revision and compares outputs. transformers== stays in worker.txt.

Removing the field changes the manifest digest once, so existing installs re-hash their unchanged files once through the existing startup preparation, with no download; later bumps don't. The decision record is in the commit body.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Checks run

  • Python: python scripts/check.py on Postgres, again with CUDA_VISIBLE_DEVICES="", and again without ffmpeg/ffprobe on PATH; scripts/check_file_size.py; scripts/check_held_pins.py --offline.

Migration impact

  • No database migration.

Documentation impact

  • Updated docs/ARCHITECTURE.md, docs/DEPLOYMENT.md, docs/DEVELOPMENT.md and the fixture README.

Security impact

  • No security-sensitive change.

Manual verification

On an RTX 4070 Ti, a prepared Nemotron copy was verified offline (hashed, nothing downloaded) and loaded through load_nemotron_model on CUDA, under 5.21.0 and then 5.20.2. Under 5.20.2 the receipt still verified, the asset fingerprint matched and the runtime fingerprint differed. The CUDA golden passed under both.

The Nemotron loader and both forced-aligner loaders refused any installed
Transformers version other than the one evaluated, and both asset manifests
named that version, so a requirements-only bump disabled Nemotron (live
labels fell back to clustering, final speakers to community-1) and Canary's
word timings until a hand-made follow-up changed the constants, the
manifests, the fixture records and the evaluation record together.

- Drop the equality checks from `nemotron_model._build_runtime` and from
  `forced_aligner_native`. Class, configuration, geometry, weight-key,
  tensor-shape and loading-diagnostic checks stay.
- Drop `transformers_version` from both asset manifests and their
  validators. Verification identity is now the repository, checkpoint
  revision and file sizes and digests. Removing the field changes the
  manifest digest once: existing installs re-hash their unchanged files
  through the existing repair paths, with no download.
- Nemotron's runtime fingerprint records the installed Transformers version
  instead of the constant, so a saved live cache is still not resumed across
  versions; `bind_capture` already falls back to clustering on a mismatch.
- Remove `scripts/nemotron_compatibility.py`, its test and its call from
  `check_held_pins.py`; it failed CI unless the pin matched the golden and
  evaluation records.
- The opt-in CUDA golden compares outputs against the same checkpoint
  revision instead of requiring the baseline's runtime fingerprint.

Decision record
Context: Transformers 5.20.2 -> 5.21.0 gave identical outputs for both
models, yet the checks turn each Dependabot bump into a silent fallback or a
manual PR (Valtora#868). Agreed on Valtora#892: drop the checks, keep `transformers==` in
worker.txt so each bump arrives as one Dependabot PR.
Alternatives: keep the checks and re-prepare automatically on a version
change (keeps the refusal, still couples library metadata to immutable
files); a version range in worker.txt (lets builds install a release no PR
tested); vendoring the private feature-extraction call (more code to own
for a break not yet seen).
Trade-offs: a release that changes behaviour without breaking a structural
check now loads instead of falling back. The inference regression and the
structural checks are what catch it, and the pin still moves only through a
reviewed PR.
@Valtora Valtora added this to the 3.1.0 milestone Nov 1, 2026
…ers-checks

Brings in Valtora#894 and Valtora#893. The one conflict is the final speaker pass in
docs/ARCHITECTURE.md: Valtora#894's paragraph on capped recordings and its new
skip list are kept, with this branch's wording that a repair follows a
checkpoint change rather than a Transformers upgrade, since the manifest no
longer names a Transformers version. Valtora#894's test changes merged cleanly.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants