Groundwork for Unsloth's UD-Q4_K_XL (4 shards: shard 1 metadata only, output/token_embd/PLE table in shard 2, layer 11's down in shard 2 and its gate/up in shard 3). Existing packs load unchanged. - include/strata/artifact/gguf_split.hpp: gguf_split_paths (from eddoursul/Strata 8029fa9) finds the shards from any shard's name; a missing shard is an error naming it. It replaces generate.cpp's model_shards(), which skipped a shard it could not open. - gguf_reader.hpp: GgufModel (8029fa9) looks a tensor up across the shards and refuses a name in two shards; the split keys are validated as #255 (gopinath87607) does for the head: shard 1 carries the architecture, later shards declare split.count / split.no / split.tensors.count consistently, and the directories add up to split.tensors.count. tensor_payload_bytes / in_bounds for payload checks. - NativeHead::load / NativeEmbed::load take the shard list: the architecture from the metadata shard, the tensor from the shard that holds it; the embedding also checks its payload is in the file. - generate: --native resolves all shards once (native_shards), the head from --native-head-gguf's family, the model keys from the metadata shard; --ple-gguf defaults to the shard that holds per_layer_token_embd.weight. - native_experts.txt: the shard column may be per role, `gate,up,down` (#255's comma form; empty = the --native shard). The reader accepts v2-v4 and refuses a higher version; an engine older than this one fails to open a "gate,up,down" file loudly. Fixes the parse's own aliasing hazard (parts.assign(3, parts[0])). - load_experts_gguf reads each role from its file, after check_experts_gguf proved every (file, offset) is that tensor, of the pack's type and dimensions, and inside its file. - Tests (synthetic, no model, no GPU): gguf_split_test (4 shards, missing shard, duplicate, split keys, count, truncation); expert_layout_test (copies of the Q2_0/IQ2_XS/IQ3_XXS/IQ3_S/Coder/Swift packs' native_experts.txt parse field for field as before; v4 column; v5 / 4 / 2 names refused; the arena from split synthetic shards at 2560/640 with Q4_K/Q5_1 and Q5_K/Q8_0, every byte compared, and wrong offset / file / type / shape / truncated / missing shard refused).
50 lines
3.2 KiB
Plaintext
50 lines
3.2 KiB
Plaintext
# strata native experts v2: layer gu_type d_type offset blob_bytes gate_off up_off down_off (n_expert 512, total 35454976000; the last three are absolute offsets in Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf)
|
|
0 22 42 0 1510400 957139232 1229167392 720288032
|
|
1 16 42 773324800 1305600 1791743648 2011983008 1554892448
|
|
2 22 42 1441792000 1510400 2589468704 2861663264 2352617504
|
|
3 22 42 2215116800 1510400 3429617568 3701812128 3191947168
|
|
4 16 42 2988441600 1305600 4258654112 4478419872 4021802912
|
|
5 22 42 3656908800 1510400 4988400928 5260595488 4751549728
|
|
6 22 42 4430233600 1510400 5824781984 6096976544 5588391584
|
|
7 22 42 5203558400 1510400 6665627168 6938295328 6429236768
|
|
8 29 42 5976883200 1177600 7496734752 7683732512 7259883552
|
|
9 16 42 6579814400 1305600 8161931168 8381530528 7924260768
|
|
10 16 42 7248281600 1305600 8893109024 9112874784 8656257824
|
|
11 16 42 7916748800 1305600 9628172448 9847938208 9391782048
|
|
12 22 42 8585216000 1510400 10354422432 10627090592 10117571232
|
|
13 29 42 9358540800 1177600 11191917088 11378748448 10954246688
|
|
14 16 42 9961472000 1305600 11856780704 12076546464 11619110304
|
|
15 22 42 10629939200 1510400 12596884768 12868912928 12360033568
|
|
16 22 42 11403264000 1510400 13428645152 13701313312 13190974752
|
|
17 22 42 12176588800 1510400 14264363168 14536557728 14027511968
|
|
18 16 42 12949913600 1305600 15100731424 15320330784 14863880224
|
|
19 16 42 13618380800 1305600 15836089248 16055855008 15599238048
|
|
20 22 42 14286848000 1510400 16562518432 16834712992 16324848032
|
|
21 22 42 15060172800 1510400 17398108448 17670303008 17160438048
|
|
22 22 42 15833497600 1510400 18230654624 18502849184 17994264224
|
|
23 22 42 16606822400 1510400 19071581728 19343609888 18834730528
|
|
24 22 42 17380147200 1510400 19906595872 20178790432 19669744672
|
|
25 22 42 18153472000 1510400 20745913248 21017941408 20509062048
|
|
26 22 42 18926796800 1510400 21580517664 21852712224 21343666464
|
|
27 16 42 19700121600 1305600 22420899488 22641138848 22184048288
|
|
28 22 42 20368588800 1510400 23146983072 23419011232 22910131872
|
|
29 16 42 21141913600 1305600 23983658528 24203424288 23746807328
|
|
30 16 42 21810380800 1305600 24713110944 24932876704 24476720544
|
|
31 22 42 22478848000 1510400 25449180448 25721375008 25212329248
|
|
32 22 42 23252172800 1510400 26279648032 26551842592 26042796832
|
|
33 22 42 24025497600 1510400 27114892448 27387087008 26878041248
|
|
34 22 42 24798822400 1510400 27955807264 28228001824 27718956064
|
|
35 22 42 25572147200 1510400 28793160608 29065355168 28556309408
|
|
36 22 42 26345472000 1510400 29623794592 29896462752 29386943392
|
|
37 29 42 27118796800 1177600 30459512608 30646510368 30222661408
|
|
38 22 42 27721728000 1510400 31125320864 31397515424 30888469664
|
|
39 22 42 28495052800 1510400 31966247968 32238442528 31729396768
|
|
40 22 42 29268377600 1510400 32794219552 33066414112 32557368352
|
|
41 22 42 30041702400 1510400 33628823968 33901018528 33391972768
|
|
42 22 42 30815027200 1510400 34464068384 34736736544 34227217184
|
|
43 22 42 31588352000 1510400 35305090208 35577118368 35068239008
|
|
44 22 42 32361676800 1510400 36135557792 36408225952 35898706592
|
|
45 22 42 33135001600 1510400 36976946208 37249140768 36740095008
|
|
46 22 42 33908326400 1510400 37813148064 38085342624 37576296864
|
|
47 22 42 34681651200 1510400 38654454048 38926648608 38417602848
|