Add local Gemma-4-E4B (oMLX) evaluation harness for memory systems#1
Open
johnz1019 wants to merge 1 commit into
Open
Add local Gemma-4-E4B (oMLX) evaluation harness for memory systems#1johnz1019 wants to merge 1 commit into
johnz1019 wants to merge 1 commit into
Conversation
Run the HaluMem memory-system benchmark fully locally against a Gemma-4-E4B model served via oMLX, decoupling the answer model, the judge model, and the embeddings so that no external memory-system API keys are required. Highlights: - llms.py: separate "answer" vs "judge" model config; judge can read GPT-5.5 from Codex config (JUDGE_USE_CODEX_CONFIG) or JUDGE_OPENAI_* overrides; support both Responses (streaming) and Chat wire APIs. - local_mem0_components.py / local_embedding_server.py: deterministic blake2b hash embeddings + an OpenAI-compatible local embedding server, replacing OpenAI text-embedding-3-small. - eval_memzero_graph.py: run Mem0-Graph locally (local Neo4j + Qdrant + hash embeddings + local LLM). - New local adapters: eval_gemma4_e4b_local (no-memory baseline), eval_memzero_local, eval_supermemory_local. - Adapt eval_memos / eval_memobase / eval_memzero / eval_supermemory / eval_zep for local endpoints. - evaluation.py: route scoring through the new judge; add memory-extraction F1. - Orchestration: run_gemma4_e4b_omlx_eval (start oMLX -> adapter -> stop -> judge scoring -> report), run_gemma4_e4b_memory_matrix (matrix runner), write_gemma4_e4b_comparison_report (local vs README-baseline report). Implementation authored by codex on the lay2-studio host; packaged and submitted here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Adds an evaluation harness to run the HaluMem memory-system benchmark fully locally against a Gemma-4-E4B model served via oMLX, with no external memory-system API keys required. The answer model, judge model, and embeddings are decoupled so each can be pointed at a local or self-hosted endpoint.
What changed
New local infrastructure
local_mem0_components.py/local_embedding_server.py— deterministic blake2b hash embeddings + an OpenAI-compatible local embedding server, replacing OpenAItext-embedding-3-small.llms.py— separate answer vs judge model config; judge can read GPT-5.5 from Codex config (JUDGE_USE_CODEX_CONFIG) orJUDGE_OPENAI_*overrides; supports both Responses (streaming) and Chat wire APIs.Local adapters for the memory systems
eval_memzero_graph.py— run Mem0-Graph locally (local Neo4j + Qdrant + hash embeddings + local LLM).eval_gemma4_e4b_local.py(no-memory / full-session baseline),eval_memzero_local.py,eval_supermemory_local.py.eval_memos.py,eval_memobase.py,eval_memzero.py,eval_supermemory.py,eval_zep.pyfor local endpoints.Scoring & orchestration
evaluation.py— route scoring through the new judge; add memory-extraction F1.run_gemma4_e4b_omlx_eval.py— single-system pipeline: start oMLX → run adapter → stop oMLX → judge scoring → write report.run_gemma4_e4b_memory_matrix.py— matrix runner across frames.write_gemma4_e4b_comparison_report.py— local vs README-baseline comparison report.Notes
eval/runs/,eval/reports/,.supermemory/) are intentionally not included..envis gitignored; verified the diff contains no keys).