Skip to content

feat(embeddings): add native MLX executor - #12

Merged
GQAdonis merged 1 commit into
mainfrom
codex/native-mlx-embeddings-20260826
Aug 26, 2026
Merged

GQAdonis merged 1 commit into
mainfrom
codex/native-mlx-embeddings-20260826

Conversation

@GQAdonis

Copy link
Copy Markdown
Contributor

Summary

  • add a native macOS MLX embedding executor while retaining explicit Candle/CPU degraded mode
  • pin MLX Swift LM 3.31.4 and BAAI/bge-small-en-v1.5 revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a
  • enforce backend, model, revision, protocol, and 384-dimension handshake metadata
  • add durable generation adoption and a dedicated heartbeat so warm MLX children survive readiness and remain supervised
  • build, bundle, install, and ad-hoc sign identical executor copies for managed Apple Silicon services

Local validation

  • Swift unit, protocol, batch, malformed-input, restart, cached-model, and MLX integration coverage passed
  • Rust format, clippy, tests, and release builds passed with embedded, metal, and local-embeddings features
  • Candle/CPU and MLX parity gates passed for dimensions, norms, cosine similarity, and retrieval overlap
  • warm MLX readiness, HTTP/UDS health, queue recovery, and zero unsettled operations verified locally

Commit 53662ff is SSH-signed.

@GQAdonis
GQAdonis merged commit e5f4891 into main Aug 26, 2026
@GQAdonis
GQAdonis deleted the codex/native-mlx-embeddings-20260826 branch August 26, 2026 16:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 53662ff804

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +56 to +57
model_revision: std::env::var("LOCAL_EMBEDDING_MODEL_REVISION")
.unwrap_or_else(|_| "main".to_string()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use the configured revision when downloading Candle models

When LOCAL_EMBEDDING_MODEL_REVISION is unset, Config::from_env and the readiness handshake claim the pinned default revision, but this separate fallback causes Candle to download mutable main. The parity script supplies the revision explicitly, so it does not cover this default path; if upstream main advances, a deployment can generate incompatible embeddings while reporting that it uses the pinned model. Pass the configured revision into CandleEmbeddings or use the same default here.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant