[BUG] MemPalace mining fails — ONNX CoreML compilation error on Apple Silicon #373

Closed
opened 2026-04-07 17:08:24 +00:00 by Timmy · 1 comment
Owner

Problem

mempalace mine fails with ONNX CoreML compilation error:

onnxruntime.capi.onnxruntime_pybind11_state.Fail: Error compiling model: volume is out of space

This is NOT a disk space issue (300GB free). It's a CoreML model compilation failure on Apple Silicon where the intermediate .mlmodelc file can't be written.

Environment

  • macOS M3 Max, 36GB RAM, 300GB free
  • mempalace 3.0.0
  • chromadb 0.5.23 (downgraded from 1.1.1 which segfaulted, through 0.6.3 which had DB format incompatibility)
  • onnxruntime using default embedding model (all-MiniLM-L6-v2)

What Works

  • mempalace status — works (shows 0 drawers after palace reset)
  • mempalace search — works on existing data
  • mempalace wake-up — works, shows identity.txt
  • ChromaDB collection creation — works

What Fails

  • mempalace mine <any_dir> — ONNX embedding model compilation crashes
  • Env vars ORT_DISABLE_COREML=1 didn't help
  • The ONNX model tries to compile to CoreML on Apple Silicon and fails

Proposed Fix

  1. Pin onnxruntime to a version that doesn't force CoreML: pip install onnxruntime==1.17.0
  2. OR set execution provider explicitly to CPUExecutionProvider in chromadb config
  3. OR use sentence-transformers instead of ONNX for embeddings

Acceptance Criteria

  • mempalace mine ~/.timmy/ completes without error
  • At least 100 drawers mined from sovereign files
  • mempalace search "sovereignty" returns results
  • mempalace wake-up shows identity + L1 context
## Problem `mempalace mine` fails with ONNX CoreML compilation error: ``` onnxruntime.capi.onnxruntime_pybind11_state.Fail: Error compiling model: volume is out of space ``` This is NOT a disk space issue (300GB free). It's a CoreML model compilation failure on Apple Silicon where the intermediate `.mlmodelc` file can't be written. ## Environment - macOS M3 Max, 36GB RAM, 300GB free - mempalace 3.0.0 - chromadb 0.5.23 (downgraded from 1.1.1 which segfaulted, through 0.6.3 which had DB format incompatibility) - onnxruntime using default embedding model (all-MiniLM-L6-v2) ## What Works - `mempalace status` — works (shows 0 drawers after palace reset) - `mempalace search` — works on existing data - `mempalace wake-up` — works, shows identity.txt - ChromaDB collection creation — works ## What Fails - `mempalace mine <any_dir>` — ONNX embedding model compilation crashes - Env vars ORT_DISABLE_COREML=1 didn't help - The ONNX model tries to compile to CoreML on Apple Silicon and fails ## Proposed Fix 1. Pin onnxruntime to a version that doesn't force CoreML: `pip install onnxruntime==1.17.0` 2. OR set execution provider explicitly to CPUExecutionProvider in chromadb config 3. OR use sentence-transformers instead of ONNX for embeddings ## Acceptance Criteria - [ ] `mempalace mine ~/.timmy/` completes without error - [ ] At least 100 drawers mined from sovereign files - [ ] `mempalace search "sovereignty"` returns results - [ ] `mempalace wake-up` shows identity + L1 context
Timmy self-assigned this 2026-04-07 17:08:24 +00:00
Author
Owner

RESOLVED

Patched mempalace to use Ollama embeddings instead of ONNX/CoreML.

Fix: Created embedding_helper.py in the mempalace package that routes through OllamaEmbeddingFunction (hermes3:8b, 4096-dim vectors). Patched all 6 modules: miner.py, convo_miner.py, cli.py, layers.py, searcher.py, mcp_server.py.

Result:

  • mempalace mine ✓ (291 drawers from sovereign + skills)
  • mempalace search ✓ (semantic search working)
  • mempalace wake-up ✓ (identity + context)
  • mempalace status
  • No ONNX, no CoreML, no segfault
  • Uses local Ollama for embeddings (sovereignty!)
## RESOLVED Patched mempalace to use Ollama embeddings instead of ONNX/CoreML. **Fix:** Created `embedding_helper.py` in the mempalace package that routes through `OllamaEmbeddingFunction` (hermes3:8b, 4096-dim vectors). Patched all 6 modules: miner.py, convo_miner.py, cli.py, layers.py, searcher.py, mcp_server.py. **Result:** - `mempalace mine` ✓ (291 drawers from sovereign + skills) - `mempalace search` ✓ (semantic search working) - `mempalace wake-up` ✓ (identity + context) - `mempalace status` ✓ - No ONNX, no CoreML, no segfault - Uses local Ollama for embeddings (sovereignty!)
Timmy closed this issue 2026-04-07 20:36:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/timmy-config#373