Skip to content

fix(llm): edge extra CVE + 200-task local-vs-cloud benchmark (#736) - #863

Merged
AmitoVrito merged 2 commits into
mainfrom
Abhay-Mmmm/v2.0-edge-synapsekit-on-device-inference-with-cl
Jul 29, 2026
Merged

AmitoVrito merged 2 commits into
mainfrom
Abhay-Mmmm/v2.0-edge-synapsekit-on-device-inference-with-cl

Conversation

@Abhay-Mmmm

@Abhay-Mmmm Abhay-Mmmm commented Jul 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes the two remaining gaps on Closes #736 (Edge SynapseKit), whose core
feature set was already shipped via an earlier batch merge:

  • CVE fix: the edge extra pulled llama-cpp-python>=0.2 back in even
    though the llamacpp extra was deliberately emptied because
    llama-cpp-python's diskcache dependency has no patched release for
    CVE-2025-69872. pip install synapsekit[edge] silently reintroduced the
    exact dependency the other extra avoids. Removed it from edge, updated
    the LlamaCppLLM import-error message and docs/edge.md accordingly.
  • Benchmark acceptance criterion: added the 200-task local-vs-cloud
    suite the issue asked for (benchmarks/edge_local_vs_cloud_bench.py +
    examples/edge_task_suite.py), with a CI-enforced harness-correctness
    gate (benchmarks/test_edge_local_vs_cloud_bench.py) run against stub
    LLMs.

Not tested

The actual benchmark numbers in docs/edge.md are left _pending_ — running
them for real needs a Llama-3.2-3B GGUF file and ANTHROPIC_API_KEY, neither
of which exist in CI or this environment. Everything else (all 4 graders, the
runner, latency/cost recording, failure handling) is covered by 17 harness
tests against stub models.

Test plan

  • pytest tests/llm/test_llamacpp.py tests/llm/test_local_providers.py — CVE fix, no regressions
  • pytest benchmarks/test_edge_local_vs_cloud_bench.py — 17 harness tests pass
  • pytest tests/llm/test_edge_runtime.py tests/cli/test_edge.py tests/embeddings/test_onnx.py tests/llm/test_mlx.py — no regressions in shipped edge surface
  • Run benchmarks/edge_local_vs_cloud_bench.py with a real GGUF model + API key and fill in docs/edge.md's tradeoffs table before closing v2.0: Edge SynapseKit — on-device inference with cloud fallback #736

Abhay-Mmmm and others added 2 commits July 24, 2026 17:55
The llamacpp extra was deliberately emptied because llama-cpp-python
pulls an unpatched diskcache, but the edge extra re-added the same
dependency, silently reintroducing it via `pip install synapsekit[edge]`.
Point users at a direct `pip install llama-cpp-python` instead.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Adds the one unmet acceptance criterion from issue #736: a seeded
200-task suite (extraction/classification/JSON/date-format, each
programmatically graded) run through a local GGUF model and Claude
directly, reporting per-category accuracy/latency/cost so
CostQualityRouter has real data on where local is good enough.

CI only runs the harness-correctness checks against stub LLMs, since
it has neither a GGUF file nor an API key -- real numbers require a
manual run and are left as a documented follow-up in docs/edge.md.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@Abhay-Mmmm Abhay-Mmmm changed the title Abhay-Mmmm/v2.0-edge-synapsekit-on-device-inference-with-cl fix(llm): edge extra CVE + 200-task local-vs-cloud benchmark (#736) Jul 24, 2026
@Abhay-Mmmm Abhay-Mmmm linked an issue Jul 24, 2026 that may be closed by this pull request
15 tasks
@AmitoVrito
AmitoVrito merged commit 4e2b78b into main Jul 29, 2026
17 checks passed
@AmitoVrito

Copy link
Copy Markdown
Collaborator

Merged, thanks Abhay. Good catch on the edge extra quietly pulling llama-cpp-python back in — that transitive CVE reintroduction is exactly the kind of thing that slips past. Appreciate the benchmark harness too.

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.

v2.0: Edge SynapseKit — on-device inference with cloud fallback

2 participants