Skip to content

feat(search): add MLX tactic proposer for Apple Silicon#17

Merged
markm39 merged 1 commit into
masterfrom
feat/mlx-tactic-search
Apr 1, 2026
Merged

feat(search): add MLX tactic proposer for Apple Silicon#17
markm39 merged 1 commit into
masterfrom
feat/mlx-tactic-search

Conversation

@markm39
Copy link
Copy Markdown
Collaborator

@markm39 markm39 commented Apr 1, 2026

Summary

Integrates the fine-tuned OpenProof Tactic 2B model (markm39/openproof-tactic-2b, MLX 4-bit) into the BFS tactic search. Auto-detects and uses MLX on macOS when the model is installed.

Architecture

BFS Search (Rust) -> MlxProposer -> HTTP -> mlx_lm.server -> MLX on Apple Silicon GPU
  • MlxProposer in openproof-search/src/mlx.rs -- mirrors OllamaProposer pattern
  • Server auto-spawned at port 8321 if not running, with 30s health polling
  • Auto-detection: macOS + ~/.openproof/models/openproof-tactic-2b/ exists -> default to MLX
  • Override: OPENPROOF_TACTIC_PROPOSER=mlx|ollama|standard
  • Same tactic filtering (banned tactics, dedup) and fallback to standard tactics

Test plan

  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • MLX server manual test: completions API returns valid tactics
  • Verified model generates correct Lean tactics (induction, simp, nlinarith, etc.)
  • End-to-end: run openproof with MLX model on a proof
  • MiniF2F benchmark comparison

Integrates the fine-tuned OpenProof Tactic 2B model (MLX 4-bit) into
the BFS tactic search engine. On macOS with an MLX model installed at
~/.openproof/models/openproof-tactic-2b/, the system auto-detects and
uses MLX as the default tactic proposer.

Architecture:
- MlxProposer talks to mlx_lm.server via OpenAI completions API
- Server auto-spawned if not already running (port 8321)
- Health polling with 30s timeout for model loading
- Same filtering pipeline as Ollama (banned tactics, dedup)
- Fallback to standard tactics if MLX unavailable

New files:
- crates/openproof-search/src/mlx.rs -- MlxProposer struct
- Mlx variant added to TacticProposerBackend enum
- Auto-detection: macOS + model dir exists -> use MLX by default
- Override: OPENPROOF_TACTIC_PROPOSER=mlx|ollama|standard
@markm39 markm39 merged commit 28e3b41 into master Apr 1, 2026
@markm39 markm39 deleted the feat/mlx-tactic-search branch April 1, 2026 00:11
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