Skip to content

fix(voice): reject stale diarizer GGUF gate order - #11569

Merged
lalalune merged 1 commit into
developfrom
fix/11377-diarizer-gguf-epoch
Jul 2, 2026
Merged

fix(voice): reject stale diarizer GGUF gate order#11569
lalalune merged 1 commit into
developfrom
fix/11377-diarizer-gguf-epoch

Conversation

@lalalune

@lalalune lalalune commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Refs #11377.

This does not republish the stale HuggingFace diarizer artifact, so it does not close the needs-human part of #11377. It hardens the native runtime so stale/pre-#9460 diarizer GGUFs fail closed instead of silently scrambling ONNX IOFC LSTM gates into the current IFGO C cell convention and surfacing as DER=1.000 over-segmentation.

Changes:

  • diarizer converter now emits voice_diarizer.converter_epoch = 2 and voice_diarizer.lstm_gate_order = "IFGO"
  • shared GGUF metadata loader parses the new diarizer keys and shape fields
  • voice_diarizer_open rejects missing/pre-epoch metadata and unsupported gate order before tensor load
  • adds voice_diarizer_metadata_test with tiny metadata-only GGUF fixtures for fresh vs stale metadata

Validation

  • cmake -B packages/native/plugins/voice-classifier-cpp/build -S packages/native/plugins/voice-classifier-cpp
  • cmake --build packages/native/plugins/voice-classifier-cpp/build -j
  • ctest --test-dir packages/native/plugins/voice-classifier-cpp/build --output-on-failure
    • 8/8 tests passed; existing voice_speaker_parity_test skipped because the large speaker fixture is absent
  • git diff --check origin/develop...HEAD

Evidence

  • .github/issue-evidence/11377-diarizer-gguf-epoch/README.md

Remaining human step

The actual user-facing diarizer fix still requires re-baking and republishing pyannote-segmentation-3.0.gguf with the new metadata using the elizaOS HuggingFace write token, then bumping the manifest/sha. This PR makes stale artifacts fail fast until that republish lands.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7a87c4b9-1e2e-4046-a19d-930538ad8ef6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/11377-diarizer-gguf-epoch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lalalune

lalalune commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Review + local verification (part of the #11377 re-bake confirm — full evidence: .github/issue-evidence/11377-diarizer-rebake-confirm/ and the matrix comment on #11377).

Built this branch's voice-classifier-cpp locally (macOS arm64): 8/8 ctest green (voice_diarizer_metadata_test passes; voice_speaker_parity_test skips on the absent large fixture, as on develop). Then drove voice_diarizer_open against real artifacts:

artifact result
published HF pyannote-segmentation-3.0.gguf (30983eba…, epoch 0) rejected — stale GGUF converter epoch 0; need >= 2 with LSTM gates packed as IFGO
fresh bake, develop converter (7f4cd30f…, no epoch key) rejected
fresh bake, this PR's converter (100a5dbf…, epoch 2) accepted, full tensor load OK

Also verified the epoch-2 converter output stays loadable by the current shipped fused lib (the loader's unknown-key skip) — it loads and runs, so merging this does not strand the converter output on old runtimes.

Two findings the merge note should carry:

  1. The guard does not reach production until the fork is synced. All shipped fused libs build the vendored copy at elizaOS/llama.cpp tools/omnivoice/src/voice-classifiers/voice_classifier/voice_diarizer.c, which still reads IOFC (fork commit 00f1fd5e3) — develop pins the fork at 2bdcef890. This PR's IFGO guard only covers the standalone packages/native build. The fork copy needs the same IFGO read + this guard, then a submodule repin/rebuild.
  2. The PR premise is inverted per the Diarizer DER 1.000 on a clean 2-speaker dialogue: pyannote segmentation over-detects (drops all segments as too-short) #11377 matrix: the published artifact is IOFC-packed and matches the shipped fused lib (speakeriso:real DER 0.209 PASS on the develop-pinned lib); an IFGO re-bake on today's fused lib reproduces DER 1.000 exactly. So the republish must land after the fork sync + repin, or production diarization breaks. The fail-closed direction of this guard is still right for the end-state — it just makes the sequencing (fork sync → repin → republish) mandatory rather than optional.

Verdict: recommend merge — code is correct, tests are real, metadata is forward-compatible — with the fork-sync companion tracked as the blocking prerequisite for the #11377 republish.

@lalalune
lalalune merged commit 3bba7f8 into develop Jul 2, 2026
31 of 34 checks passed
@lalalune
lalalune deleted the fix/11377-diarizer-gguf-epoch branch July 2, 2026 21:34
lalalune pushed a commit that referenced this pull request Jul 3, 2026
…tifact republish (#11377)

The DER-1.000 over-segmentation signature was pure LSTM gate-order skew
between diarizer GGUF artifact and reader (proven bit-for-bit in both
directions in the rebake-confirm evidence). Cutover, in the safe order:

- bump plugins/plugin-local-inference/native/llama.cpp to fork commit
  dda200ab0 (elizaOS/llama.cpp#40 + #41, both merged): vendored
  voice_diarizer.c now unpacks gates as IFGO (matching the packages-side
  converter/reader) and carries the #11569 fail-closed guard — artifacts
  without converter_epoch>=2 + lstm_gate_order=IFGO are rejected loudly
  before tensor load instead of silently scrambling. Descendant of the
  prior pin 58c0391eb, so the #11612 Metal fixes are retained.
- add diarizer 0.3.0 to VOICE_MODEL_VERSIONS: new HF file
  voice/diarizer/pyannote-segmentation-3.0-ifgo-epoch2.gguf
  (sha 100a5dbf…, HF commit a89e5615, elizaos/eliza-1). The 0.2.0 IOFC
  artifact stays published for older fused libs.
- prefer the epoch-2 filename in the workbench / attribution-smoke
  probe candidate lists.
- evidence: .github/issue-evidence/11377-diarizer-ifgo-cutover/
  (DER 1.000 -> 0.211 fixed pairing, loud guard rejection of the
  published IOFC artifact, kokoro/asr no-regression lanes) + preserve
  the rebake-confirm bundle referenced from the issue thread.

Closes #11377

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lalalune added a commit that referenced this pull request Jul 3, 2026
…tifact republish (#11377) (#11796)

The DER-1.000 over-segmentation signature was pure LSTM gate-order skew
between diarizer GGUF artifact and reader (proven bit-for-bit in both
directions in the rebake-confirm evidence). Cutover, in the safe order:

- bump plugins/plugin-local-inference/native/llama.cpp to fork commit
  dda200ab0 (elizaOS/llama.cpp#40 + #41, both merged): vendored
  voice_diarizer.c now unpacks gates as IFGO (matching the packages-side
  converter/reader) and carries the #11569 fail-closed guard — artifacts
  without converter_epoch>=2 + lstm_gate_order=IFGO are rejected loudly
  before tensor load instead of silently scrambling. Descendant of the
  prior pin 58c0391eb, so the #11612 Metal fixes are retained.
- add diarizer 0.3.0 to VOICE_MODEL_VERSIONS: new HF file
  voice/diarizer/pyannote-segmentation-3.0-ifgo-epoch2.gguf
  (sha 100a5dbf…, HF commit a89e5615, elizaos/eliza-1). The 0.2.0 IOFC
  artifact stays published for older fused libs.
- prefer the epoch-2 filename in the workbench / attribution-smoke
  probe candidate lists.
- evidence: .github/issue-evidence/11377-diarizer-ifgo-cutover/
  (DER 1.000 -> 0.211 fixed pairing, loud guard rejection of the
  published IOFC artifact, kokoro/asr no-regression lanes) + preserve
  the rebake-confirm bundle referenced from the issue thread.

Closes #11377

Co-authored-by: Shaw <shawgotbags@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant