mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1990] [CLOSED] Add opt-in external llama.cpp token engine #3794
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3794
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1990
Author: @rajpaulsingh6-stack
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:codex/macuda-llama-http📝 Commits (1)
489b91eAdd opt-in llama HTTP token engine📊 Changes
1 file changed (+163 additions, -4 deletions)
View changed files
📝
serve/server.py(+163 -4)📄 Description
Summary
Adds an opt-in
--engine llama-httpseam that lets Strata retain ownership of chat templating, tokenization, tool/API loops, request accounting, and OpenAI compatibility while an already-running llama.cpp-compatible server owns platform-specific device setup. The adapter validates/health, sends token IDs rather than rendered text, streams raw token IDs back, forwards a bounded set of sampling fields, and records prompt/decode/speculative-draft metrics. It deliberately does not start, stop, or unload the external runtime.This is intended as an experimental provider seam, not a claim of general native macOS or Metal support. Relates to #1968.
Verified vertical slice
Hardware: Mac Studio M2 Max (32 GB) with RTX 5060 Ti 16 GB in a Razer Core X V2 over USB-C/PCIe.
Runtime: Strata
llama-http-> Macuda/llama.cpp b11433 -> TinyGPU -> RTX target, with M2 Max Metal running Qwen3.8 Flash-Next MTP Q8_0 drafts (draft-mtp, max 3). Target model was Swift-Qwen3.8-Flash-Next-GSQ-RCO-abliterated Q2_0 (66.5 GB).MADARA STRATA MACUDA MTP MAX3 LIVE; 5.1 decode tok/s; 9/9 offered draft tokens accepted.python -m py_compile serve/server.pyandgit diff --checkpassed.Performance boundary
In a controlled 128-token prompt, direct RTX target decode was 6.40 tok/s. Metal MTP drafting reached 5.61 tok/s with 84/126 draft tokens accepted (66.7%); CPU/RAM MTP drafting reached 4.85 tok/s with 83/129 accepted (64.3%). The host draft lanes are correct but slower on this USB4 topology, so this PR exposes the seam without making speculative decoding the default.
Limits
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.