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 v3: layer gu_type d_type offset blob_bytes gate_off up_off down_off [shard] (n_expert 512, total 50292326400; absolute offsets in Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf, or in the named shard beside it)
|
|
0 18 20 0 2176000 1386491904 1711166464 913711104
|
|
1 22 42 1114112000 1510400 2340958080 2613152640 2104106880
|
|
2 22 20 1887436800 1971200 3491172096 3763417856 3018391296
|
|
3 22 20 2896691200 1971200 4573970560 4846165120 4101189760
|
|
4 22 20 3905945600 1971200 5652709504 5925377664 5179928704
|
|
5 22 20 4915200000 1971200 6738352640 7010547200 6265571840
|
|
6 22 20 5924454400 1971200 7819193216 8091861376 7346412416
|
|
7 18 20 6933708800 2176000 8905667840 9230291200 8432887040
|
|
8 22 42 8047820800 1510400 9848737024 10120931584 9611885824
|
|
9 22 20 8821145600 1971200 10929646720 11201892480 10456865920
|
|
10 22 42 9830400000 1510400 11779255296 12051501056 11542404096
|
|
11 22 20 10603724800 1971200 12866495360 13138741120 12393714560
|
|
12 18 42 11612979200 1715200 13701750144 14026847104 13464898944
|
|
13 22 42 12491161600 1510400 14649780480 14922026240 14412929280
|
|
14 18 20 13264486400 2176000 15736711296 16061334656 15263930496
|
|
15 22 20 14378598400 1971200 16923842560 17196510720 16451061760
|
|
16 18 20 15387852800 2176000 17998457344 18323131904 17525676544
|
|
17 21 20 16501964800 2329600 19192385920 19556330880 18719605120
|
|
18 18 20 17694720000 2176000 20460359936 20785239296 19987579136
|
|
19 22 20 18808832000 1971200 21654710400 21927378560 21181929600
|
|
20 18 42 19818086400 1715200 22498415744 22823039104 22261564544
|
|
21 21 42 20696268800 1868800 23456363520 23820359680 23219512320
|
|
22 18 20 21653094400 2176000 24722740096 25047837056 24249959296
|
|
23 22 20 22767206400 1971200 25919315200 26191765760 25446534400
|
|
24 22 20 23776460800 1971200 26998514944 27270709504 26525734144
|
|
25 21 20 24785715200 2329600 28087739520 28451684480 27614958720
|
|
26 22 20 25978470400 1971200 29357200896 29629869056 28884420096
|
|
27 21 20 26987724800 2329600 30447303040 30811248000 29974522240
|
|
28 21 20 28180480000 2329600 31709491584 32073910144 31236710784
|
|
29 21 20 29373235200 2329600 32979426560 33343627520 32506645760
|
|
30 18 42 30565990400 1715200 34012167296 34336790656 33775316096
|
|
31 18 20 31444172800 2176000 35212497920 35537121280 34739717120
|
|
32 22 20 32558284800 1971200 36394210304 36666878464 35921429504
|
|
33 18 20 33567539200 2176000 37476126080 37800749440 37003345280
|
|
34 22 20 34681651200 1971200 38661975296 38934221056 38189194496
|
|
35 21 20 35690905600 2329600 39757704320 40121649280 39284923520
|
|
36 22 42 36883660800 1510400 40780381824 41053049984 40543530624
|
|
37 18 20 37656985600 2176000 41866242560 42191339520 41393461760
|
|
38 18 20 38771097600 2176000 43055227776 43379902336 42582446976
|
|
39 22 20 39885209600 1971200 44255558400 44527804160 43782777600
|
|
40 21 20 40894464000 2329600 45334348544 45698549504 44861567744
|
|
41 18 20 42087219200 2176000 46596260480 46920935040 46123479680
|
|
42 18 20 43201331200 2176000 47782160896 48107257856 47309380096
|
|
43 18 20 44315443200 2176000 48982913920 49308010880 48510133120
|
|
44 21 20 45429555200 2329600 50159869824 50523865984 49687089024
|
|
45 21 20 46622310400 2329600 51424864000 51788860160 50952083200
|
|
46 18 20 47815065600 2176000 52692287616 53016962176 52219506816
|
|
47 23 20 48929177600 2662400 53891822080 54341015040 53418222080
|