1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// arch/whisper/bin_load.h - legacy whisper.cpp .bin adapter for the
// Whisper architecture.
//
// INTERNAL. Consumed by transcribe.cpp (magic-byte dispatch) and
// arch/whisper/bin_load.cpp.
//
// The .bin parser (transcribe-bin-loader.{h,cpp}) is architecture-
// neutral: it knows the byte layout but nothing about WhisperHParams,
// WhisperWeights, or the canonical tensor names this codebase uses.
// This module is the whisper-specific bridge: it consumes a parsed
// WhisperBinModel, synthesizes hparams + capabilities + special-token
// ids + language list, populates the Tokenizer via the decode-only
// raw-bytes path, builds ctx_meta with canonical-named tensors, allocs
// backend memory, and streams tensor bytes from the .bin into the
// allocated slots.
//
// Once load_from_bin returns, the resulting transcribe_model* is
// indistinguishable from one produced by the GGUF whisper_load path
// — same WhisperModel struct, same encoder/decoder runtime, same
// public ABI.
namespace transcribe::whisper // namespace transcribe::whisper