[PR #3137] [CLOSED] mac: setup offers Swift 1.5 #4472

Closed
opened 2026-11-07 15:36:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3137
Author: @WillkTech
Created: 10/19/2026
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (10+)

  • 2205e5e Add Metal stubs for new CUDA kernels and compat shims
  • e905e47 Add Mac setup notes and Jules optimization plan
  • 1ee7e5d Optimize Strata for Mac: wire RoPE YaRN on Metal & memory guard
  • f073385 Merge pull request #1 from WillkTech/optimize-strata-m5-max-metal-rope-scaling-3378619349143257926
  • 08b4955 Optimize Strata for Mac: wire RoPE YaRN on Metal & memory guard
  • adaf83c Merge pull request #2 from WillkTech/optimize-strata-m5-max-metal-rope-scaling-3378619349143257926
  • b5a44fe Refactor Metal RoPE table and add interleaved layout
  • 99fcba6 Add Swift 1.5 support to Mac setup
  • 2fed380 Fix Vision shutdown race and pipe cleanup
  • 7fb4a7b Add interactive model switcher for Apple Silicon

📊 Changes

19 files changed (+1355 additions, -86 deletions)

View changed files

📝 README.md (+1 -1)
📝 docs/MAC.md (+5 -2)
📝 docs/MODELS.md (+3 -0)
➕ mac_readme.md (+173 -0)
📝 metal/CMakeLists.txt (+1 -0)
📝 metal/include/metal_compat/cuda_runtime.h (+28 -1)
📝 metal/setup_mac.py (+82 -35)
➕ metal/src/engine/rope_table.h (+85 -0)
📝 metal/src/engine/setup_host.cpp (+5 -31)
📝 metal/src/engine/stubs.cpp (+23 -5)
📝 metal/src/engine/window.cpp (+11 -7)
➕ metal/tests/rope_parity.cpp (+128 -0)
➕ monitor.py (+443 -0)
📝 serve/server.py (+24 -4)
📝 src/core/conversation_memory.cpp (+20 -0)
📝 src/core/conversation_memory_test.cpp (+8 -0)
📝 src/program/generate.cpp (+9 -0)
➕ switch.sh (+223 -0)
📝 tools/test_setup_mac.py (+83 -0)

📄 Description

mac: setup offers Swift 1.5 (--family swift) at IQ2_XS, IQ3_XXS and IQ3_S

The Mac's size table is keyed by size with the family as an attribute, and
Swift's three sizes share names with the original's, so the family is resolved
before the size. model_shard_names takes the family instead of hardcoding qwen,
and model_shard1_gb prices a Swift pack for the resident-versus-streaming
decision.

Swift's shards cut through layers, so it is repacked into one file for the GPU
like Unsloth's, and its file names carry the abliterated segment the Hub uses.
Q2_0 stays refused for Swift: the pack tool cannot prepare it yet (#171).

--rope-scaling and --rope-scale accepted and derived through resolve_rope;
CONTEXTS extended to 262,144 and 524,288; Swift's projector pinned by SHA-256.

Left alone: setup.py, the engine, the kernels, the CUDA, HIP and SYCL builds.
The default qwen and unsloth menus, the recommended sizes and the engine
arguments are unchanged; Swift is reachable only by asking for it.

Checked on an M5 Max, 128 GB: setup --family swift --model IQ3_S --no-start
writes the config this Mac already runs; tools.test_setup_mac 25/25,
test_setup_menu 24/24, test_setup_rope 19/19. Decode and prompt speed for
Swift on a Mac are not measured yet, and the docs say so.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3137 **Author:** [@WillkTech](https://github.com/WillkTech) **Created:** 10/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`2205e5e`](https://github.com/Niko1221/Strata/commit/2205e5e9b9a5bacbcc9bcb5a624daadf08d8ee12) Add Metal stubs for new CUDA kernels and compat shims - [`e905e47`](https://github.com/Niko1221/Strata/commit/e905e47f7f7be2485600197ce006fdce5eb0d6c5) Add Mac setup notes and Jules optimization plan - [`1ee7e5d`](https://github.com/Niko1221/Strata/commit/1ee7e5d3e694aebf341ba736290db2ee1fc22f99) Optimize Strata for Mac: wire RoPE YaRN on Metal & memory guard - [`f073385`](https://github.com/Niko1221/Strata/commit/f073385f0ab2a24b7499cb804a72d6efe34af541) Merge pull request #1 from WillkTech/optimize-strata-m5-max-metal-rope-scaling-3378619349143257926 - [`08b4955`](https://github.com/Niko1221/Strata/commit/08b495504c12d4ed5c89bc2cf264a50841d49770) Optimize Strata for Mac: wire RoPE YaRN on Metal & memory guard - [`adaf83c`](https://github.com/Niko1221/Strata/commit/adaf83cacafab4880abb92770328caa16a415ead) Merge pull request #2 from WillkTech/optimize-strata-m5-max-metal-rope-scaling-3378619349143257926 - [`b5a44fe`](https://github.com/Niko1221/Strata/commit/b5a44fe3e71b7dc902d05d1feab7fd5745d2151b) Refactor Metal RoPE table and add interleaved layout - [`99fcba6`](https://github.com/Niko1221/Strata/commit/99fcba6c1c361c2c1df1be12e38284df70728a3e) Add Swift 1.5 support to Mac setup - [`2fed380`](https://github.com/Niko1221/Strata/commit/2fed380b2ca091a2c012a5431ca0fcb3cc05d7bb) Fix Vision shutdown race and pipe cleanup - [`7fb4a7b`](https://github.com/Niko1221/Strata/commit/7fb4a7ba881f6e0e19c0cff15abd43aa0ff6bbea) Add interactive model switcher for Apple Silicon ### 📊 Changes **19 files changed** (+1355 additions, -86 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `docs/MAC.md` (+5 -2) 📝 `docs/MODELS.md` (+3 -0) ➕ `mac_readme.md` (+173 -0) 📝 `metal/CMakeLists.txt` (+1 -0) 📝 `metal/include/metal_compat/cuda_runtime.h` (+28 -1) 📝 `metal/setup_mac.py` (+82 -35) ➕ `metal/src/engine/rope_table.h` (+85 -0) 📝 `metal/src/engine/setup_host.cpp` (+5 -31) 📝 `metal/src/engine/stubs.cpp` (+23 -5) 📝 `metal/src/engine/window.cpp` (+11 -7) ➕ `metal/tests/rope_parity.cpp` (+128 -0) ➕ `monitor.py` (+443 -0) 📝 `serve/server.py` (+24 -4) 📝 `src/core/conversation_memory.cpp` (+20 -0) 📝 `src/core/conversation_memory_test.cpp` (+8 -0) 📝 `src/program/generate.cpp` (+9 -0) ➕ `switch.sh` (+223 -0) 📝 `tools/test_setup_mac.py` (+83 -0) </details> ### 📄 Description mac: setup offers Swift 1.5 (--family swift) at IQ2_XS, IQ3_XXS and IQ3_S The Mac's size table is keyed by size with the family as an attribute, and Swift's three sizes share names with the original's, so the family is resolved before the size. model_shard_names takes the family instead of hardcoding qwen, and model_shard1_gb prices a Swift pack for the resident-versus-streaming decision. Swift's shards cut through layers, so it is repacked into one file for the GPU like Unsloth's, and its file names carry the abliterated segment the Hub uses. Q2_0 stays refused for Swift: the pack tool cannot prepare it yet (#171). --rope-scaling and --rope-scale accepted and derived through resolve_rope; CONTEXTS extended to 262,144 and 524,288; Swift's projector pinned by SHA-256. Left alone: setup.py, the engine, the kernels, the CUDA, HIP and SYCL builds. The default qwen and unsloth menus, the recommended sizes and the engine arguments are unchanged; Swift is reachable only by asking for it. Checked on an M5 Max, 128 GB: setup --family swift --model IQ3_S --no-start writes the config this Mac already runs; tools.test_setup_mac 25/25, test_setup_menu 24/24, test_setup_rope 19/19. Decode and prompt speed for Swift on a Mac are not measured yet, and the docs say so. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:36:17 +07:00
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#4472
No description provided.