Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public struct Nemotron3Models {
/// (if not cached) and load it.
///
/// Layout under `cacheDirectory` (default `~/Library/Application Support/FluidAudio/Models`):
/// `nemotron-3-diarization/{monolithic,split}/<bundle>.mlmodelc` plus the root `.bin` assets.
/// `nemotron-3-diarization/{monolithic/v2,split}/<bundle>.mlmodelc` plus the root `.bin` assets.
/// Only the requested preset's bundle is fetched.
public static func loadFromHuggingFace(
config: Nemotron3Config,
Expand Down
6 changes: 5 additions & 1 deletion Sources/FluidAudio/Diarizer/Nemotron3/Nemotron3Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ public struct Nemotron3Config: Sendable {
}

/// Subdirectory of `FluidInference/nemotron-3-diarization-coreml` holding this preset's bundle.
public var hubSubdirectory: String { splitGraph ? "split" : "monolithic" }
///
/// Monolithic presets load from `monolithic/v2/`: fp16-I/O, gather-free re-exports that
/// compile for the ANE on M3-class chips (#951). The originals stay in `monolithic/` for
/// older releases.
public var hubSubdirectory: String { splitGraph ? "split" : "monolithic/v2" }

// MARK: Presets (model card recommended profiles)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,11 @@ final class Nemotron3CacheVersionTests: XCTestCase {
let absent = root.appendingPathComponent("does-not-exist")
XCTAssertNoThrow(try Nemotron3Models.discardStaleCache(at: absent))
}

func testMonolithicPresetsLoadFromV2AndSplitPresetsFromSplit() {
for config in [Nemotron3Config.low, .offline, .fast, .fast32, .fast128] {
XCTAssertEqual(config.hubSubdirectory, "monolithic/v2", config.modelFileName)
}
XCTAssertEqual(Nemotron3Config.preset(named: "fast32-split-w8a8")?.hubSubdirectory, "split")
}
}
Loading