Skip to content

[Native] Serve Muse Glimmer on the native ggml engine - #24956

Draft
metascroy wants to merge 1 commit into
offgraph-kv-native-executorfrom
offgraph-kv-mg-native-executor
Draft

metascroy wants to merge 1 commit into
offgraph-kv-native-executorfrom
offgraph-kv-mg-native-executor

Conversation

@metascroy

@metascroy metascroy commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Stack

Off-graph KV cache for the native ggml engine, through serving Muse Glimmer on it. Review bottom-up; each PR builds and passes its tests on its own.

Summary

Muse Glimmer's backend factory takes --backend native. It creates the native backend's NativeExecutor (previous PR) over the ggml engine and its batched cache, then adds what's specific to Muse Glimmer, as it does around CUDA's CudaExecutor:

  • a check that the vocabulary holds its special tokens;
  • the preparation spec for text-only prompts.

The package comes from export_hf_llm.py --offgraph_cache --logits_to_keep selected. Sessions batch together and clone for prefix reuse; there's no DFlash or vision. The worker takes --native_device (cpu or gpu) and --native_kv_dtype (fp32 or fp16), rejects any other value, and rejects --data_path and --pos_embed_path, which the native backend doesn't use.

Build: the Muse Glimmer CMake project builds its batching targets from an installation with only EXECUTORCH_BUILD_NATIVE_GGML, skipping the CUDA/MLX-only runners; make muse-glimmer-batching-native builds it, with ggml's OpenMP off so the installed package doesn't depend on the build machine's OpenMP. Image hashing picks its SHA-256 by platform (CommonCrypto on Apple, portable elsewhere) rather than by CUDA or MLX.

Most of the CMakeLists.txt diff is re-indentation from wrapping the legacy runners in their backend condition.

Test plan

  • Built from a fresh configure with the muse-glimmer-batching-native recipe's settings on macOS, linking the installed native_batching. The full Muse-Glimmer-30B-KQuant-17GB-Q4_K_M export, with selected logits, serves through the next PR's launcher with four sessions and a prefix cache (results there).
  • Not built locally: MLX or CUDA.

Authored with Claude Code.

@pytorch-bot

pytorch-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24956

Note: Links to docs will display an error until the docs builds have been completed.

❌ 172 New Failures, 1 Cancelled Job, 6 Unrelated Failures, 27 Unclassified Failures

As of commit b3f6fc5 with merge base c7f7931 (image):

NEW FAILURES - The following jobs have failed:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

CANCELLED JOB - The following job was cancelled. Please retry:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 12, 2026
@metascroy
metascroy force-pushed the offgraph-kv-publish-context branch from 1119461 to 649456f Compare November 13, 2026 00:57
@metascroy
metascroy force-pushed the offgraph-kv-mg-native-executor branch from b1a668c to 4cfa8c9 Compare November 13, 2026 00:57
@metascroy
metascroy changed the base branch from offgraph-kv-publish-context to offgraph-kv-selected-logits November 13, 2026 00:57
@metascroy
metascroy force-pushed the offgraph-kv-mg-native-executor branch from 4cfa8c9 to 5bf37b8 Compare November 13, 2026 21:57
@metascroy
metascroy changed the base branch from offgraph-kv-selected-logits to offgraph-kv-native-executor November 13, 2026 21:58
@metascroy
metascroy force-pushed the offgraph-kv-native-executor branch from 834004e to a52159c Compare November 14, 2026 00:18
@metascroy
metascroy force-pushed the offgraph-kv-mg-native-executor branch from 5bf37b8 to 49d63b7 Compare November 14, 2026 00:18
Muse Glimmer's backend factory takes --backend native: it creates the
native backend's NativeExecutor over the ggml engine and its batched cache,
then adds what is Muse Glimmer's, a vocabulary that holds its special tokens
and the preparation spec for text-only prompts, as it does for CUDA's
CudaExecutor. The package comes from export_hf_llm.py --offgraph_cache
--logits_to_keep selected. Sessions batch together and clone for prefix
reuse; there is no DFlash or vision.

The worker takes --native_device (cpu or gpu) and --native_kv_dtype. The Muse
Glimmer CMake project builds the batching targets from an installation with
EXECUTORCH_BUILD_NATIVE_GGML alone, skipping the CUDA/MLX-only runners, and
`make muse-glimmer-batching-native` builds it, with ggml's OpenMP off so the
installed package does not depend on the build machine's. Image hashing now
picks its SHA-256 by platform, CommonCrypto on Apple and the portable one
elsewhere, rather than by CUDA or MLX.

This branch had an error being deployed

1 failed deployment
cadence — b3f6fc5f Deployed Nov 14, 2026 by metascroy via hifi-build / hifi4 #38343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant