mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3299] [CLOSED] [Engine] Metal: run Gyro (trellis TQ2_T/TQK6/TQK7) models on Apple Silicon #4554
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4554
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3299
Author: @mnott
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:metal-gyro📝 Commits (7)
3de5998fix(metal): conversation checkpoints validate and park on Metal286e2e0fix(macos): memory guard reads available RAM on macOS750764cfix(metal): validate checkpoints against the Metal window sizes361d1f7fix(metal): describe the window's K/V in the session's QsaStates for conversation snapshots9735e7dfix(metal): session fingerprint reads the MTP file the Metal engine loads8efbd23fix(metal): session restore accepts the files this engine savesdd0c130fix(metal): wrap a Gyro file without its PLE table: the head and tail ranges only, no read-ahead of the table📊 Changes
12 files changed (+318 additions, -61 deletions)
View changed files
📝
include/strata/core/conversation_file.hpp(+15 -0)📝
metal/CMakeLists.txt(+7 -1)📝
metal/src/engine/window.cpp(+102 -42)📝
metal/src/mtl_rt.h(+5 -0)📝
metal/src/mtl_rt.mm(+30 -0)➕
metal/tests/session_limits_test.cpp(+58 -0)📝
src/core/conversation_file.cpp(+15 -0)📝
src/core/conversation_file_test.cpp(+21 -0)📝
src/core/conversation_memory.cpp(+18 -0)📝
src/core/conversation_state.cpp(+37 -13)📝
src/core/mtp.cpp(+3 -0)📝
src/program/generate.cpp(+7 -5)📄 Description
Gyro-M now runs on the Metal engine. Until now Metal refused Gyro files at load ("no trellis kernels").
This PR builds on #3231 (Mac conversation cache). Its first 4 commits are that PR; the 5 Gyro commits follow.
What's in it
src/kernels/cpu/tq_cpu.cpp.native_expert_supportedaccepts types 144-146.per_layer_token_embd, ~54 GB, contiguous) sits inside the model file. It is now excluded from the wrapped GPU buffers: only the head and tail ranges are wrapped (37.6 of 92 GB), with no read-ahead on the table. The table is still read with direct I/O. Files with a separate PLE shard (IQ3_S) keep the old path;STRATA_METAL_WRAP_PLE=1forces it.metal/tests/tq_parity: 81/81 PASS (rel L2 ~1e-7 against the exact dot; the Hadamard rotation is bit-identical tohadamard_rotate).moe_mm_parityPASS.docs/GYRO.mdupdated.Measured (M5 Max, 128 GB)
Not covered
STRATA_METAL_STREAM=1is encoded for trellis but untested.STRATA_METAL_KERNELSoverrides it.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.