Skip to content

Make Paradee model conversion reproducible across CPUs - #91

Merged
lalalune merged 2 commits into
mainfrom
codex/reproducible-paradee-conversion
Oct 30, 2026
Merged

lalalune merged 2 commits into
mainfrom
codex/reproducible-paradee-conversion

Conversation

@lalalune

@lalalune lalalune commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Problem

The pinned mobile voice cannot be rebuilt on Linux. The Paradee converter folds weight normalization with torch._weight_norm. Its F32 reduction changes with CPU dispatch: scalar and AVX2 produce different GGUF bytes from the same verified inputs. Neither matches the model pin produced on macOS arm64.

A later type-check fix also changed the converter Git blob without refreshing the GGUF pins. This alone breaks Delibes: replacing only the recorded converter blob in a diagnostic reproduces its old checksum exactly.

Change

Fold each output channel with binary64 products and math.fsum, then round once to F32. Refresh all affected GGUF pins. The Paradee tensors change slightly; all Delibes tensor bytes remain identical, and only its recorded converter identity changes.

Add a conversion job for Linux x86_64 and macOS arm64. It checks the runner architecture, verifies every downloaded source file, converts all four models in native and scalar CPU modes, and checks complete file sizes and hashes against the pins. It uploads the result manifest even when a pin check fails.

Validation at a651529

  • Before: Linux scalar and AVX2 conversions produce different hashes and fail the old Paradee 1.2 pin. The input files match their checksums.
  • After: Paradee 1.2 produces the same full GGUF hash in scalar, AVX2 and AVX512 modes, with one and four threads. All four models pass the complete native/scalar conversion check locally.
  • All 301 Paradee 1.2 tensors are within rtol=5e-7, atol=1e-8 of the original PyTorch fold. The 38 normalized tensors are the only changed tensors. Maximum absolute difference is 5.96e-8.
  • The real native test-paradee-api passes with Paradee 1.0, 1.1, 1.2 and Delibes. test-paradee-phase-lock passes.
  • Native stage and waveform parity passes against the original PyTorch model for af_heart and am_puck: five sentences per voice, identical integer durations, all stage gates passing, and waveform SNR above 65 dB. The reference wrapper only accepts the public torch version with its +cpu suffix; model arithmetic is unchanged. Exact dependency versions and the original strict-check failure are retained.
  • Hosted conversion run 41008675542 passes on Linux x86_64 and macOS 15.7.9 arm64. The downloaded manifests match all four model hashes across both hosts and both CPU modes. This PR does not establish Android execution, physical audio quality or device acceptance.

Download before/after logs, input provenance, tensor comparisons, waveform parity reports and the exact patch. SHA-256: efa663b054b1eefd3b8734e3ac59d47f1efc4b2b5c69540d7a66f7d52a4b9730.

To reproduce, run the converters with the pinned source files and --check-output. The new workflow records the complete commands and two CPU modes. Set PARADEE_GGUF for test-paradee-api; set PARADEE_REF_DIR to an original-model dump for test-paradee-parity.

AI assistance: Codex implemented and checked the converter repair and evidence workflow under the repository owner's requested upstream unification work.

@github-actions github-actions Bot added documentation Improvements or additions to documentation examples devops labels Oct 30, 2026
@lalalune
lalalune marked this pull request as ready for review October 30, 2026 05:33
@lalalune
lalalune merged commit d960f63 into main Oct 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops documentation Improvements or additions to documentation examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant