Repository navigation
knowledge: measure CPU vs MPS (fp32/fp16) p95 before choosing an Apple Silicon inference device - #335
Open
choiyounggi wants to merge 1 commit into
Open
choiyounggi wants to merge 1 commit into
choiyounggi wants to merge 1 commit into
Conversation
Contributor
Wiki agent gate: error — the agent run produced no verdict (failed closed). See the workflow log. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Knowledge flush — 1 insight(s)
Headless autoflush run, 2026-11-06 (claims by run
20261106-134854-81372). Claimed 3 candidates: 1 ingested as a new page, 2 released back topendingas pending duplicates of open PRs.2c78c188c0a60329— Apple Silicon: measure CPU fp32 / MPS fp32 / MPS fp16 p95 for batch-1 embedding inference; re-check accuracy after fp16backend-common-ml-inference-device-choice-on-apple-silicon(verified)b5863e2d758c98fb— Claude Code behind a gateway still sends bootstrap/penguin_mode requests while a claude.ai login remainsfc76dc4dfa08ecde— Docker-gated schema validator: skip vs fail, known-bad documentVerified best-practice
2c78c188c0a60329— confidence: verified. Official docs and PyTorch issue measurements back the method. The speed numbers are one machine's field measurement, and the page labels them that way.is_available()/is_built(), and the macOS/device requirement.mul24.5 µs on MPS (24.2 µs dispatch) vs 0.9 µs on CPU. This is why the rule holds for tiny ops.deviceis unset. This supports the "pin the device" step.arctic-embed-l-v2.0-kop95 was 46.0 / 20.6 / 13.5 ms (CPU fp32 / MPS fp32 / MPS fp16). Qwen3-Embedding-0.6B was 62.6 / 30.7 / 18.7 ms. The fp16 model kept F1 at 0.931.deviceanddtypeexplicitly", because the library auto-selects MPS and Transformers v5 loads the checkpoint dtype.b5863e2d758c98fb,fc76dc4dfa08ecde: released before verification (see Open-PR check).Existing-layer check
Pages read: backend-common-llm-self-hosted-model-load-latency, debugging-performance-profile-before-optimizing, backend-common-ml-mape-aligned-point-prediction
Indexes read:
INDEX.md,wiki/backend/index.md(full),wiki/platforms/index.md(full).wiki_searchhits considered (3 queries: the device-choice/p95 phrasing, "Apple Silicon MPS GPU embedding model inference", and the fp16 accuracy phrasing). Top hits:backend-common-reliability-timeouts-and-retriesdebugging-concurrency-intermittent-failuresdatabases-selection-vector-search-engine-selectionbackend-common-ml-mape-aligned-point-predictiondebugging-performance-profile-before-optimizingNo hit covers choosing an inference device or dtype.
debugging-performance-profile-before-optimizingowns the general method: measure distributions (median and p95), and separate cold runs from warm runs. The new page applies it to one decision (device and dtype) and links to it instead of restating it. Not a merge target: its trigger is "something is slow", not "choosing a device".backend-common-llm-self-hosted-model-load-latencycovers warm-up for a model server (Ollama), not in-process device choice. Linked, not merged.platformshas no ML or accelerator category, and its scope is OS differences that break code. Device choice is a model-serving decision, so it does not fit there.Created: new page
wiki/backend/common/ml/inference-device-choice-on-apple-silicon.md.Related links: the new page links to both pages above. Back-links were added to both pages'
related:.Conflicts: none.
wiki/backend/index.md: one row added at the top of themltable.log.md: one ingest entry appended.Not edited: the root
INDEX.mdbackend line and thecommonsummary row inwiki/backend/index.md. Open PR knowledge: gateway alias resolution, Spring env-var names, CDN traffic path, stderr in captures #298 editsINDEX.md, and knowledge: re-runnable multi-artifact release, server decision in status responses, REA env -i run token #329/knowledge: Jackson 3 asString() throws on container nodes; node:test files misread by a Jest-only test floor #315/knowledge: gateway alias resolution, Spring env-var names, CDN traffic path, stderr in captures #298/knowledge: group near-duplicate templated examples before cross-validating a text classifier #334 editwiki/backend/index.md. Themltable row is enough to route there.Open-PR check
23 open
knowledge/*PRs: #334, #332, #331, #330, #329, #328, #324, #319, #318, #317, #315, #310, #309, #308, #307, #306, #305, #304, #301, #300, #299, #298, #293. This headless run cannot fetch or diff branch content. Overlap was judged from each PR's title and changed-file list (gh pr list --repo choiyounggi/dev-loop --state open --search "head:knowledge/" --json number,title,files), plus #334's report body.2c78c188c0a60329inference device choice on Apple Siliconbackend/common/ml/grouped-cross-validation-for-templated-examples.md, which is about model-evaluation splits, a different trigger. It also adds one row to the samemlindex table; its position could not be diffed from here. This PR inserts its row at the top of that table. If the two rows land next to each other, the merge conflict is two independent rows, and keeping both resolves it. No open PR touchesdebugging/performance/orbackend/common/llm/self-hosted-model-load-latency.md. The platforms PRs (#328, #324, #319, #309, #299, #298) cover agent CLIs, shells, tmux and tools, not ML inferenceb5863e2d758c98fbgateway + leftover claude.ai loginplatforms/processes/spawning-an-agent-cli-from-a-server.mdwithANTHROPIC_BASE_URL/ANTHROPIC_AUTH_TOKENgateway rows. #298 addsbackend/common/llm/gateway-model-alias-resolution.md. Same trigger family, and both PRs are still openfc76dc4dfa08ecdeDocker-gated schema validator: skip vs failtesting/quality/checks-that-cannot-pass.md(and #300 alsotests-that-cannot-fail.md). Same theme (a validator that skips or always passes), and both PRs are still open. This run could not locate the row's queue file. Its summary is taken from #334's report, which read itRouting decision
2c78c188c0a60329→backend/common/ml→ new pagewiki/backend/common/ml/inference-device-choice-on-apple-silicon.md.platforms. That domain covers OS-level differences that break code across macOS/Linux/Windows, and this lesson is about which device a model runs on, whichbackend/common/mlowns.Local-layer candidates
none
Queue bookkeeping
status: retired,retiredBy,retiredAt,outcome), the same way earlier headless runs retired rows:2c78c188c0a60329.queue-claim.js release:b5863e2d758c98fb,fc76dc4dfa08ecde.b5863e2d758c98fbandfc76dc4dfa08ecdehave now been released by seven or more consecutive runs while knowledge: gateway alias resolution, Spring env-var names, CDN traffic path, stderr in captures #298/knowledge: Gradle include filters, HMAC key length, Slack webhook probe, approved-command secrets, .env targets, worktree pre-push #300/knowledge: grep -q SIGPIPE in verify pipes, self-matching gate CHECKs, id-only failure allowlists, done-gates counting their own appends #317/knowledge: child claude hooks/env (Stop per turn, --settings env, gateway proxy), Explore ignores CLAUDE_CODE_SUBAGENT_MODEL #328 stay open. Merging or closing those PRs, or one manual/dev-loop:knowledge-flush(which can diff them), would clear them.