Nemotron 3 Diarization · CoreML INT8
Compiled CoreML export of NVIDIA Nemotron 3 Diarization for Apple devices. It emits frame-level activity probabilities for up to eight speakers. It does not transcribe speech or identify people.
Model
| Property | Value |
|---|---|
| Parameters | 99.2 million in the source model |
| Weights | INT8 block-32 linear weights; FP16 convolution and activations |
| Format | Two compiled .mlmodelc graphs, no .mlpackage |
| File size | About 103 MiB combined |
| Audio | 16 kHz mono, 128 mel bands |
| Chunk | 30.4 seconds of mel features; 10 ms output frames |
| Speakers | Up to eight |
| Minimum deployment target | iOS 18 |
Files
| File | Size | Purpose |
|---|---|---|
Nemotron3PreEncoder.mlmodelc/ |
About 0.6 MiB | Mel-feature projection |
Nemotron3Head.mlmodelc/ |
About 102 MiB | Transformer and speaker-activity head |
learnable_silence.f32 |
2 KiB | Speaker-cache silence embedding |
config.json |
About 2 KiB | Shapes, cache settings, source revision, and export checks |
run_chunk.py |
About 2 KiB | First-chunk command line example |
LICENSE |
About 3 KiB | OpenMDW 1.1 license |
NOTICE |
Under 1 KiB | Source and copyright notice |
Performance
Measured on an Apple M5 Pro running macOS 26.6.2 with one 30.4-second chunk from each of three locally held speech recordings. Times are the median of three warm CPU-only runs of the compiled model stages. Mel extraction, file loading, speaker-cache updates, and segment postprocessing are excluded. The comparison is against the final unquantized checkpoint; this is a numerical parity check, not a diarization error rate benchmark.
| Measure | CoreML INT8 | Meaning |
|---|---|---|
| Median model-stage time | 101.6 ms | About 300× faster than the chunk's audio duration on CPU; lower is better |
| Mean absolute probability difference | 0.00046–0.00082 | Close to the source checkpoint; lower is better |
| Speaker-activity decision disagreement at 0.25 threshold | 0.03–0.06% of frame/channel pairs | Quantization changes few decisions; lower is better |
The speech-swift host runtime scored 11.20% pooled DER on 132 internal benchmark recordings (12.82 hours) across eight languages, using a 0.25-second collar, overlap included, and automatic speaker count. All files completed. This measures the full Swift audio-to-segment pipeline, not the first-chunk example below. Other hosts must reproduce the source model's cache and FIFO update algorithm to preserve speaker labels across chunks.
Usage
Install coremltools and numpy on macOS. Supply a NumPy file containing preprocessed 128-band log-mel features with shape [1, 3040, 128], matching the source NeMo preprocessor. The command below processes the first chunk with empty speaker memory:
python run_chunk.py --format coreml --bundle . --mel chunk.npy --output probabilities.npy
import coremltools as ct
import numpy as np
pre = ct.models.CompiledMLModel("Nemotron3PreEncoder.mlmodelc")
head = ct.models.CompiledMLModel("Nemotron3Head.mlmodelc")
# mel: float32 NumPy array [1, 3040, 128]; first chunk only
embeddings = pre.predict({"chunk": mel})["chunk_embeddings"]
packed = np.zeros((1, 684, 512), dtype=np.float32)
packed[:, :380] = embeddings
probabilities = head.predict({
"packed_embeddings": packed,
"packed_length": np.array([380], dtype=np.int32),
})["speaker_probabilities_10ms"][:, :3040]
Binarize speaker activity with 0.5 onset and offset thresholds, as in the source model's default postprocessor. The pred_score_threshold: 0.25 value in config.json is used to select speaker-cache frames; it is not the segment activity threshold. For later chunks, preserve the arrival-order speaker cache and FIFO state as described by the source model.
Source
Converted from nvidia/Nemotron-3-Diarization, revision a435e9867d79e789e90053f9b6d6834053af564a. NVIDIA's model description explains the architecture and benchmark protocol. The source model and these derived weights are distributed under OpenMDW 1.1; see LICENSE and NOTICE.
Links
- speech-swift — Apple SDK
- Docs — installation and CLI guide
- soniqo.audio — website
- blog — updates