[GH-ISSUE #150] metadata-only shard 1 in unsloth splits cannot satisfy --native, and tensor-bearing shards fail check_architecture #54

Closed
opened 2026-10-29 21:19:48 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Angular-Angel on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/150

Had GLM 5.3 Flash try and get this running, and it had some difficulties:

Evidence (all verified 2026-10-12):

- unsloth `Qwen3.8-Flash-Next-UD-IQ3_XXS` splits: shard 1 = **0 tensors, 70 KVs** (all metadata incl.
  `general.architecture`, tokenizer); shards 2/3 = 468/756 tensors, **only 3 `split.*` KVs each**.
- `NativeEmbed::load` (src/core/native_head.cpp:102-118) reads `token_embd.weight` from the `--native`
  file and requires `iq_supported(type)`; `is_iq` (src/kernels/cuda/iq_kernels.cu:654) is
  `{11,16,17,18,19,20,21,22,23,29,42}` — **Q6_K (14) is not accepted**.
- With `--native` = shard 1 (as ORCA.md instructs): `native embedding: token_embd.weight is absent, ...`
  (shard 1 has no tensors at all).
- With `--native` = shard 2: boot proceeds through weight loading (45.29 GiB arena, native projections,
  PLE, MTP) and then fails with `missing general.architecture` — `check_architecture` and the MoE-shape
  read (src/program/generate.cpp:2552-2561) open the `--native` file, which only carries 3 `split.*` KVs.
- `model_shards()` (src/program/generate.cpp:455) expands splits only from a literal `-00001-of-` path,
  so pointing `--native` at a tensor-bearing shard also silently drops the other shards from
  `native_dense_gguf` (`blk.18.ffn_down_shexp.weight: this pack holds the tensor only in its GGUF form
  (run with --native SHARD1)`).

Workaround we shipped (all verified working): requantize `token_embd.weight` Q6_K→IQ4_NL in shard 2
(`bench/exp4/requant_embed.py`), splice shard 1's non-split KVs into shard 2
(`bench/exp4/copy_shard1_kvs.py`), pass shard 2 as `--native` **plus** an explicit repeatable
`--native-dense-gguf` for each of the three shards.

Suggested directions (any one): let `NativeEmbed`/KV reads fall back to the split's metadata shard;
accept a shard list for `--native`; or make `model_shards()` tolerate non-first shards.

This was with v1.1.4 (a30160c0), on the following system:

OS: MX x86_64 
Host: Z790 AORUS ELITE AX 
Kernel: 7.2.9-2-liquorix-amd64 
Uptime: 2 hours, 59 mins 
Packages: 3731 (dpkg), 26 (flatpak) 
Shell: bash 5.2.15 
Resolution: 1920x1080 
DE: Xfce 4.20 
WM: Xfwm4 
WM Theme: mx-comfort 
Theme: mx-comfort [GTK2/3] 
Icons: Papirus-mxblue-darkpanes [GTK2/3] 
Terminal: xfce4-terminal 
Terminal Font: Liberation Mono 11 
CPU: Intel i9-14900KF (16) @ 3.201GHz 
GPU: AMD ATI Radeon RX 7900 XT/7900 XTX/7900 GRE/7900M 
Memory: 62591MiB / 64121MiB
Originally created by @Angular-Angel on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/150 Had GLM 5.3 Flash try and get this running, and it had some difficulties: ``` Evidence (all verified 2026-10-12): - unsloth `Qwen3.8-Flash-Next-UD-IQ3_XXS` splits: shard 1 = **0 tensors, 70 KVs** (all metadata incl. `general.architecture`, tokenizer); shards 2/3 = 468/756 tensors, **only 3 `split.*` KVs each**. - `NativeEmbed::load` (src/core/native_head.cpp:102-118) reads `token_embd.weight` from the `--native` file and requires `iq_supported(type)`; `is_iq` (src/kernels/cuda/iq_kernels.cu:654) is `{11,16,17,18,19,20,21,22,23,29,42}` — **Q6_K (14) is not accepted**. - With `--native` = shard 1 (as ORCA.md instructs): `native embedding: token_embd.weight is absent, ...` (shard 1 has no tensors at all). - With `--native` = shard 2: boot proceeds through weight loading (45.29 GiB arena, native projections, PLE, MTP) and then fails with `missing general.architecture` — `check_architecture` and the MoE-shape read (src/program/generate.cpp:2552-2561) open the `--native` file, which only carries 3 `split.*` KVs. - `model_shards()` (src/program/generate.cpp:455) expands splits only from a literal `-00001-of-` path, so pointing `--native` at a tensor-bearing shard also silently drops the other shards from `native_dense_gguf` (`blk.18.ffn_down_shexp.weight: this pack holds the tensor only in its GGUF form (run with --native SHARD1)`). Workaround we shipped (all verified working): requantize `token_embd.weight` Q6_K→IQ4_NL in shard 2 (`bench/exp4/requant_embed.py`), splice shard 1's non-split KVs into shard 2 (`bench/exp4/copy_shard1_kvs.py`), pass shard 2 as `--native` **plus** an explicit repeatable `--native-dense-gguf` for each of the three shards. Suggested directions (any one): let `NativeEmbed`/KV reads fall back to the split's metadata shard; accept a shard list for `--native`; or make `model_shards()` tolerate non-first shards. ``` This was with v1.1.4 (a30160c0), on the following system: ``` OS: MX x86_64 Host: Z790 AORUS ELITE AX Kernel: 7.2.9-2-liquorix-amd64 Uptime: 2 hours, 59 mins Packages: 3731 (dpkg), 26 (flatpak) Shell: bash 5.2.15 Resolution: 1920x1080 DE: Xfce 4.20 WM: Xfwm4 WM Theme: mx-comfort Theme: mx-comfort [GTK2/3] Icons: Papirus-mxblue-darkpanes [GTK2/3] Terminal: xfce4-terminal Terminal Font: Liberation Mono 11 CPU: Intel i9-14900KF (16) @ 3.201GHz GPU: AMD ATI Radeon RX 7900 XT/7900 XTX/7900 GRE/7900M Memory: 62591MiB / 64121MiB ```
Author
Owner

@mw00 commented on GitHub (Oct 13, 2026):

Thanks for the detailed write-up, and sorry for the time it cost you. Maya runs GLM-5.3-Flash only: the Maya models and the GLM GGUFs its setup offers. The Qwen3.8-Flash-Next path you used (--native, docs/ORCA.md, the Qwen sections of docs/AMD_HIP.md) is a leftover from the code Maya grew out of. It isn't maintained or tested here, which is why its shard handling breaks on unsloth's splits. We'll clean those docs out so they stop pointing people there.

For Maya on your 7900-series card, the route we test is the setup in docs/AMD_MAYA.md, with Maya-S24 for a 20-24 GB card.

<!-- gh-comment-id:6147952155 --> @mw00 commented on GitHub (Oct 13, 2026): Thanks for the detailed write-up, and sorry for the time it cost you. Maya runs GLM-5.3-Flash only: the Maya models and the GLM GGUFs its setup offers. The Qwen3.8-Flash-Next path you used (`--native`, `docs/ORCA.md`, the Qwen sections of `docs/AMD_HIP.md`) is a leftover from the code Maya grew out of. It isn't maintained or tested here, which is why its shard handling breaks on unsloth's splits. We'll clean those docs out so they stop pointing people there. For Maya on your 7900-series card, the route we test is the setup in [docs/AMD_MAYA.md](https://github.com/mw00/project-maya/blob/main/docs/AMD_MAYA.md), with Maya-S24 for a 20-24 GB card.
Author
Owner

@mw00 commented on GitHub (Oct 13, 2026):

The old Qwen/Orca docs are now out of the repo (a709524). Closing, since Maya runs GLM-5.3-Flash only - thanks again for the detailed reports.

<!-- gh-comment-id:6149455869 --> @mw00 commented on GitHub (Oct 13, 2026): The old Qwen/Orca docs are now out of the repo (a709524). Closing, since Maya runs GLM-5.3-Flash only - thanks again for the detailed reports.
Author
Owner

@Angular-Angel commented on GitHub (Oct 13, 2026):

Ah, thank you for the response! I'm working on trying out the AMD_MAYA instructions now, will get back to you with a report when I'm done, I assume you want it in the AMD thread?

<!-- gh-comment-id:6150657430 --> @Angular-Angel commented on GitHub (Oct 13, 2026): Ah, thank you for the response! I'm working on trying out the AMD_MAYA instructions now, will get back to you with a report when I'm done, I assume you want it in the AMD thread?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#54
No description provided.