Commit 2b7a383
Deprecate GGUFModelReader legacy facade (W0d of #615)
The pull-style ModelReader.loadTensor(name) interface returns a raw
TensorData<*, *> without an ExecutionContext, but the production
GGUF loader path (StreamingGgufParametersLoader) is push-style and
ctx-bound — it iterates every tensor in the file, dispatches per
source dtype (F32, F16, BF16, Q4_K, Q8_0…) into the matching
TensorData subtype with explicit logical shape, and calls back per
tensor.
Wiring the legacy facade as a real implementation would mean
extracting a duplicate byte→TensorData helper and reconstructing
what StreamingGgufParametersLoader already does. That's a refactor,
not an easy win.
Instead: clearly @deprecate the facade with a ReplaceWith hint,
empty out the metadata/tensors maps (they were already empty), and
replace the TODO with a self-explanatory `error(...)` that names
the right replacement API and links to the dtype-model doc that
W5 will land.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 66d2340 commit 2b7a383
1 file changed
Lines changed: 39 additions & 8 deletions
Lines changed: 39 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 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 | + | |
11 | 39 | | |
12 | 40 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
16 | 47 | | |
17 | 48 | | |
18 | 49 | | |
19 | | - | |
| 50 | + | |
20 | 51 | | |
21 | 52 | | |
0 commit comments