[GH-ISSUE #4711] Why did this version become unreadable after being converted to Metal? #2155

Closed
opened 2026-11-04 01:57:06 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @kekekekekeshi on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4711

./setup.sh --setup
Strata on a Mac (Apple Silicon, Metal)

=== Step 1: checking your Mac ===
[ok] Apple M5 Max, 128 GB unified memory, macOS 27.0.1
[ok] free disk: 885 GB at /Users/dd/Strata-data

=== Step 2: your choices ===
[!] UD-Q4_K_XL (recommended too) also fits this Mac: higher quality than IQ3_S (92.8% top-1 against Q8_0 where IQ3_S has 87.9%), about 20% slower on a story; choose it with --model UD-Q4_K_XL

  1. Q2_0 2-bit, the fastest (maps 38 GB)
  2. IQ3_XXS 3-bit i-quant, better quality (maps 47 GB)
  3. IQ3_S 3.5-bit i-quant, the best quality (matches the full model), the slowest (maps 55 GB) (recommended) <- default
  4. UD-Q4_K_XL Unsloth ~4.5-bit (111 GB download) (maps 83 GB) (recommended)
  5. UD-Q5_K_XL Unsloth ~5.5-bit (158 GB download) (maps 104 GB)
  6. UD-Q6_K_XL Unsloth ~6.5-bit (169 GB download) (maps 115 GB)
  7. Gyro-S agentionai's trellis experts, the smallest (58 GB download, the n-gram table is inside it) (maps 30 GB)
  8. Gyro-M agentionai's trellis experts, about IQ3_XXS quality in less memory (92 GB download) (maps 63 GB, not measured on a Mac)
    Which size? [3]: 4
    Should the model also read images? (the image encoder, ~1 GB more) [y]: y
    context 65536: measured on the Mac up to 32768 (needles found at 8K-32K); longer is kept
    [ok] UD-Q4_K_XL, context 65536

=== Step 3: Python packages ===
[ok] numpy, jinja2, ... already installed

=== Step 4: the Strata engine (Metal) ===
[ok] llama.cpp 3cf0325 (ggml, gguf-py)
[ok] Metal engine: /Users/dd/Strata/build-metal/strata (built for this source)

=== Step 5: downloading Qwen3.8-Flash-Next (Unsloth) UD-Q4_K_XL ===
[ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf already downloaded
[ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00002-of-00004.gguf already downloaded
[ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00003-of-00004.gguf already downloaded
[ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00004-of-00004.gguf already downloaded
[ok] model files present
[ok] image encoder: /Users/dd/Strata/build-vision/bin/strata-vision

=== Step 6: preparing the model for Strata ===
Writing the model's experts and weights into one file for the GPU (one time, 83 GB) ...

/Users/dd/Strata/.venv/bin/python /Users/eashion/Strata/metal/tools/metal_repack.py --shard1 /Users/dd/Strata-data/models/unsloth-UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf --out /Users/dd/Strata-data/metal/unsloth-ud-q4_k_xl-metal.gguf --verify
76.9 / 76.9 GiB
verify 1201 / 1223
verify: 1223 tensors, SHA-256 identical to the source shards
/Users/dd/Strata-data/metal/unsloth-ud-q4_k_xl-metal.gguf: 1223 tensors (1079 dense, 144 expert), 76.87 GiB
n-gram table: /Users/dd/Strata-data/models/unsloth-UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00002-of-00004.gguf
[ok] model prepared: /Users/dd/Strata-data/packs/unsloth-ud-q4_k_xl
[ok] MTP draft layer: /Users/dd/Strata-data/mtp/mtp-q2_0.gguf

=== Step 7: writing the start script ===
[ok] start script: run-unsloth-ud-q4_k_xl.sh

All set.
API (OpenAI): http://127.0.0.1:8080/v1
API (Anthropic): http://127.0.0.1:8080/v1/messages
Next time: just run ./setup.sh (or run-unsloth-ud-q4_k_xl.sh) - it starts right away

Starting qwen3.8-flash-next-unsloth-ud-q4_k_xl on Metal: the engine maps the model file and is ready in about half a minute (longer the first time after a restart, while macOS reads the file).
Closing this window stops the model.
loading the vision encoder ...
loading the model (the first start takes a minute or two) ...
[strata] starting the engine: reading the model's weights ...
[strata] mapping the experts from the model files (about 83 GB, --mmap-experts): they are not loaded into RAM - the OS file cache reads them as the GPU's expert cache fills and as requests need them.
YOUR PC CAN BE SLOW OR STOP RESPONDING FOR 1-3 MINUTES NOW - this is normal.
Please wait and don't close this window; the browser opens when it is ready.
[strata] filling the GPU's expert cache (80 experts, 0.24 GiB of VRAM) ...
[strata] almost ready ...
ready: http://127.0.0.1:8080/v1 (OpenAI: /v1/chat/completions, Anthropic: /v1/messages, context 65536 tokens, images on)
open http://127.0.0.1:8080/ in a browser to chat; close this window to stop the model

However, unreadable characters appeared

Image
Originally created by @kekekekekeshi on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4711 ./setup.sh --setup Strata on a Mac (Apple Silicon, Metal) === Step 1: checking your Mac === [ok] Apple M5 Max, 128 GB unified memory, macOS 27.0.1 [ok] free disk: 885 GB at /Users/dd/Strata-data === Step 2: your choices === [!] UD-Q4_K_XL (recommended too) also fits this Mac: higher quality than IQ3_S (92.8% top-1 against Q8_0 where IQ3_S has 87.9%), about 20% slower on a story; choose it with --model UD-Q4_K_XL 1) Q2_0 2-bit, the fastest (maps 38 GB) 2) IQ3_XXS 3-bit i-quant, better quality (maps 47 GB) 3) IQ3_S 3.5-bit i-quant, the best quality (matches the full model), the slowest (maps 55 GB) (recommended) <- default 4) UD-Q4_K_XL Unsloth ~4.5-bit (111 GB download) (maps 83 GB) (recommended) 5) UD-Q5_K_XL Unsloth ~5.5-bit (158 GB download) (maps 104 GB) 6) UD-Q6_K_XL Unsloth ~6.5-bit (169 GB download) (maps 115 GB) 7) Gyro-S agentionai's trellis experts, the smallest (58 GB download, the n-gram table is inside it) (maps 30 GB) 8) Gyro-M agentionai's trellis experts, about IQ3_XXS quality in less memory (92 GB download) (maps 63 GB, not measured on a Mac) Which size? [3]: 4 Should the model also read images? (the image encoder, ~1 GB more) [y]: y context 65536: measured on the Mac up to 32768 (needles found at 8K-32K); longer is kept [ok] UD-Q4_K_XL, context 65536 === Step 3: Python packages === [ok] numpy, jinja2, ... already installed === Step 4: the Strata engine (Metal) === [ok] llama.cpp 3cf0325 (ggml, gguf-py) [ok] Metal engine: /Users/dd/Strata/build-metal/strata (built for this source) === Step 5: downloading Qwen3.8-Flash-Next (Unsloth) UD-Q4_K_XL === [ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf already downloaded [ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00002-of-00004.gguf already downloaded [ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00003-of-00004.gguf already downloaded [ok] Qwen3.8-Flash-Next-UD-Q4_K_XL-00004-of-00004.gguf already downloaded [ok] model files present [ok] image encoder: /Users/dd/Strata/build-vision/bin/strata-vision === Step 6: preparing the model for Strata === Writing the model's experts and weights into one file for the GPU (one time, 83 GB) ... > /Users/dd/Strata/.venv/bin/python /Users/eashion/Strata/metal/tools/metal_repack.py --shard1 /Users/dd/Strata-data/models/unsloth-UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf --out /Users/dd/Strata-data/metal/unsloth-ud-q4_k_xl-metal.gguf --verify 76.9 / 76.9 GiB verify 1201 / 1223 verify: 1223 tensors, SHA-256 identical to the source shards /Users/dd/Strata-data/metal/unsloth-ud-q4_k_xl-metal.gguf: 1223 tensors (1079 dense, 144 expert), 76.87 GiB n-gram table: /Users/dd/Strata-data/models/unsloth-UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00002-of-00004.gguf [ok] model prepared: /Users/dd/Strata-data/packs/unsloth-ud-q4_k_xl [ok] MTP draft layer: /Users/dd/Strata-data/mtp/mtp-q2_0.gguf === Step 7: writing the start script === [ok] start script: run-unsloth-ud-q4_k_xl.sh All set. API (OpenAI): http://127.0.0.1:8080/v1 API (Anthropic): http://127.0.0.1:8080/v1/messages Next time: just run ./setup.sh (or run-unsloth-ud-q4_k_xl.sh) - it starts right away Starting qwen3.8-flash-next-unsloth-ud-q4_k_xl on Metal: the engine maps the model file and is ready in about half a minute (longer the first time after a restart, while macOS reads the file). Closing this window stops the model. loading the vision encoder ... loading the model (the first start takes a minute or two) ... [strata] starting the engine: reading the model's weights ... [strata] mapping the experts from the model files (about 83 GB, --mmap-experts): they are not loaded into RAM - the OS file cache reads them as the GPU's expert cache fills and as requests need them. YOUR PC CAN BE SLOW OR STOP RESPONDING FOR 1-3 MINUTES NOW - this is normal. Please wait and don't close this window; the browser opens when it is ready. [strata] filling the GPU's expert cache (80 experts, 0.24 GiB of VRAM) ... [strata] almost ready ... ready: http://127.0.0.1:8080/v1 (OpenAI: /v1/chat/completions, Anthropic: /v1/messages, context 65536 tokens, images on) open http://127.0.0.1:8080/ in a browser to chat; close this window to stop the model **However, unreadable characters appeared** <img width="1150" height="586" alt="Image" src="https://github.com/user-attachments/assets/27f4dcbe-b1a1-46c3-8e66-ee5616821fe5" />
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6524626851 --> @github-actions[bot] commented on GitHub (Oct 30, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@Niko1221 commented on GitHub (Oct 31, 2026):

The screenshot is not a character-set problem: the model answers "hi" with 999999999999, wire, wire, wire ... repeated, so the numbers are wrong from the first token. We measured UD-Q4_K_XL on an M5 Max (macOS 27.2) at 92.8% top-1 against Q8_0 with normal text, so this install differs. Things that differ in the log: macOS 27.0.1 (we test 27.2; the Metal kernels are compiled by the OS at run time), and the repack was started from /Users/eashion/Strata/... while the engine is /Users/dd/Strata/... (two checkouts?). Could you send: the output of strata --version, whether Q2_0 or IQ3_S gives normal text on the same Mac, the same question with STRATA_HC_Q8=0 and with STRATA_METAL_PROMPT=window in the run config's env, and the answer from curl to /v1/chat/completions with "temperature":0? We have not reproduced it.

<!-- gh-comment-id:6547921864 --> @Niko1221 commented on GitHub (Oct 31, 2026): The screenshot is not a character-set problem: the model answers "hi" with `999999999999, wire, wire, wire ...` repeated, so the numbers are wrong from the first token. We measured UD-Q4_K_XL on an M5 Max (macOS 27.2) at 92.8% top-1 against Q8_0 with normal text, so this install differs. Things that differ in the log: macOS 27.0.1 (we test 27.2; the Metal kernels are compiled by the OS at run time), and the repack was started from `/Users/eashion/Strata/...` while the engine is `/Users/dd/Strata/...` (two checkouts?). Could you send: the output of `strata --version`, whether Q2_0 or IQ3_S gives normal text on the same Mac, the same question with `STRATA_HC_Q8=0` and with `STRATA_METAL_PROMPT=window` in the run config's env, and the answer from `curl` to /v1/chat/completions with `"temperature":0`? We have not reproduced it.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2026):

Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.

To bring it back: fix the title (area prefix) and the missing parts, then comment /reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.

<!-- gh-comment-id:6649633483 --> @github-actions[bot] commented on GitHub (Nov 5, 2026): Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection. To bring it back: fix the title (area prefix) and the missing parts, then comment `/reopen`. A check runs and reopens it, or tells you what is still missing. See [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
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
Niko1221/Strata#2155
No description provided.