ai newsDi., 1. Dez.

Benchmarks 2026: BaseRT gegen llama.cpp und MLX auf Apple Silicon

Ein Vergleich von BaseRT, llama.cpp und MLX fuer LLM-Inferenz auf Apple-Silicon-Hardware, unter anderem auf Basis von Produktionsworkloads mit ueber 100.000 Anfragen pro Tag auf M4 Pro-, M3 Ultra- und M2 Max-Clustern.

dev.toFreitag 15:10 · 27.11.DE18 Min. Lesezeit
Bild: dev.to

Veröffentlicht am 27. November, ursprünglich erschienen auf dailyaiworld.com

Von Deepak Bagada, CEO bei SaaSNext. Deepak hat produktive LLM-Inferenz-Pipelines auf Apple-Silicon-Hardware eingesetzt und BaseRT, llama.cpp und MLX für Enterprise-AI-Workloads evaluiert, die über 100.000 Inferenz-Anfragen pro Tag auf M4 Pro, M3 Ultra und M2 Max Clustern verarbeiten.

Das Ausführen großer Sprachmodelle auf Apple Silicon bedeutete stets, einen Kompromiss einzugehen. llama.cpp bietet breite Modellunterstützung und ein ausgereiftes Ökosystem, lässt jedoch erhebliche Metal-GPU-Leistung ungenutzt, da seine Kernel aus einer generischen GPU-Abstraktionsschicht automatisch generiert werden, statt handoptimiert für Apples tile-basierte Deferred-Rendering-Architektur zu sein. MLX, Apples eigenes ML-Framework, liefert eine bessere Metal-Integration und ist sorgfältig auf die Unified-Memory-Hierarchie der M-Serie abgestimmt, erfordert jedoch Python für die Inferenz, bietet keinen integrierten HTTP-API-Server und unterstützt nicht das GGUF-Format, das im Open-Source-Modell-Ökosystem vorherrscht. Keine der beiden Runtimes bietet erstklassige Unterstützung für Mixture-of-Experts-Architekturen, die zunehmend entscheidend sind, da MoE-Modelle wie Qwen3, DeepSeek V3 und Gemma 4 bessere Qualität-pro-Parameter-Verhältnisse erreichen als ihre dense Pendants.

Am 20. Juli 2026 veröffentlichte Base Compute BaseRT v0.1.6 unter Apache 2.0, eine von Grund auf neu geschriebene Metal-Inferenz-Runtime in Rust, die bis zu 1,56-fache Decode-Durchsatzsteigerung gegenüber llama.cpp und 1,35-fache gegenüber MLX über die Modellfamilien Qwen3, Llama 3.2 und Gemma 4 hinweg erreicht. Die Runtime wird mit Bindings für Python, Node.js, Rust und Swift ausgeliefert, einem OpenAI-kompatiblen API-Server und Unterstützung für Quantisierungen von Q2 bis FP16 auf allen Geräten der M-Serie. Sie wurde am Launch-Tag als Produkt Nummer 5 auf Product Hunt gefeaturet und von einem arXiv-Paper (2607.00501) begleitet, das die Kernel-Kompilierungsstrategie detailliert beschreibt.

Hier ist, wie es sich gegen die etablierten Lösungen schlägt, wo es deutlich gewinnt und wo es noch Schwächen aufweist.

BaseRT ist eine native Metal-Inferenz-Runtime für Apple Silicon, die LLM-Berechnungsgraphen in handgeschriebene Metal-Performance-Shader-Kernel kompiliert, statt sich auf Apples ANE- oder BNNS-Frameworks zu verlassen und statt automatisch generierter GPU-Shader wie llamas.cpp Metal-Backend zu verwenden. Die Runtime ist vollständig in Rust geschrieben, mit optionalen Sprach-Bindings für Python, Node.js, Rust und Swift. Sie führt ein eigenes Modell-Serialisierungsformat namens.base ein, das GGUF und safetensors für Apple-Silicon-Deployments ersetzt.

BaseRT unterstützt alle Chips der M-Serie von M1 bis M4 Ultra, einschließlich der M3 Max und M4 Pro, die in den veröffentlichten Benchmarks verwendet wurden. Die Runtime verarbeitet Prefill- und Decode-Phasen mit separaten Kernel-Schedules, verwendet einen eigenen KV-Cache-Manager, der mit einem vorab zugewiesenen Pool in den Unified Memory ausgelagert, und unterstützt Grouped-Query-Attention und Sliding-Window-Attention nativ.

BaseRT ist kein Fork von llama.cpp und auch kein Wrapper um MLX. Es ist eine von Grund auf neu entwickelte Metal-Runtime mit eigenem Kernel-Compiler, Speichermanager und Serialisierungsformat. Die.base-Modelldateien werden aus HuggingFace safetensors, GGUF oder MLX-Checkpoints mit dem CLI-Tool base-convert konvertiert.

Das Projekt wurde am 20. Juli 2026 unter Apache 2.0 auf GitHub veröffentlicht, und das begleitende arXiv-Paper 2607.00501 beschreibt die Kernel-Kompilierungsstrategie, einschließlich des Tile-Sizing-Algorithmus, der sich an die Anzahl der GPU-Cores und die Speicherbandbreite jedes M-Serie-Chips anpasst. Base Compute veröffentlichte außerdem eine reproduzierbare Benchmark-Suite mit Details zur Hardwarekonfiguration und Thermik-Profilings.

STAT: "Auf Qwen3-30B-A3B (MoE, 30B gesamt / 3B aktiv) erreicht BaseRT 112 Tokens pro Sekunde Decode-Durchsatz, verglichen mit 72 tok/s auf llama.cpp und 83 tok/s auf MLX auf einem M4 Pro mit 48 GB Unified Memory." — BaseRT Benchmark Suite, Base Compute, Juli 2026

In den letzten drei Jahren standen Apple-Silicon-Nutzer, die lokale LLMs betreiben, vor einem fragmentierten Ökosystem ohne klaren Performance-Leader. llama.cpp mit dem Metal-Backend bot die breiteste Modellkompatibilität und die größte Community, doch seine Metal-Kernel werden aus einer generischen GPU-Abstraktionsschicht automatisch generiert, wodurch während der Inferenz 30 bis 40 Prozent der GPU-Compute-Units ungenutzt bleiben. MLX, Apples eigenes ML-Framework, bot eine bessere Metal-Integration und war auf die Speicherhierarchie der M-Serie optimiert, erforderte jedoch Python für die Inferenz, verfügte über keinen integrierten HTTP-API-Server und unterstützte nicht das GGUF-Format, das im Open-Source-Modell-Ökosystem dominiert. Keine der beiden Runtimes bot native Unterstützung für Mixture-of-Experts-Modelle, die zunehmend wichtig sind, da MoE-Architekturen bessere Qualität-pro-Parameter-Verhältnisse liefern.

Die Konsequenz für Entwickler war eine Wahl zwischen Geschwindigkeit und Kompatibilität, ohne Option, die beides bot.

BEWEIS: In Base Computes veröffentlichten Benchmarks auf einem M4 Pro 48 GB System mit macOS 15.5 übertraf BaseRT beide Runtimes in jeder getesteten Modellfamilie und Metrik. Bei Llama 3.2 8B mit Q4_K_M-Quantisierung erreichte BaseRT 198 tok/s Decode-Durchsatz gegenüber 145 tok/s für llama.cpp und 162 tok/s für MLX, was einer Verbesserung um das 1,37-Fache bzw. 1,22-Fache entspricht. Bei Gemma 4 22B mit Q4_K_M erreichte BaseRT 89 tok/s gegenüber 61 tok/s für llama.cpp und 72 tok/s für MLX, also Verbesserungen um das 1,46-Fache bzw. 1,24-Fache.

Der größte Abstand zeigte sich beim Prefill für MoE-Modelle: BaseRT-Prefill auf Qwen3-30B-A3B erreichte 1.420 tok/s gegenüber 785 tok/s für llama.cpp und 1.050 tok/s für MLX, also Verbesserungen um das 1,81-Fache bzw. 1,35-Fache. Der Prefill-Vorteil stammt aus BaseRTs eigener Attention-Kernel-Scheduling-Strategie, die Speichertransfers mit der Berechnung der aktiven Expert-Pfade in MoE-Architekturen überlappt und so den Expert-Routing-Flaschenhals reduziert, der generische GPU-Backends beeinträchtigt.

Alle zitierten Benchmark-Zahlen stammen aus den veröffentlichten Ergebnissen von Base Compute auf einem M4 Pro 48 GB System unter Standard-Thermik-Bedingungen (25 °C Umgebungstemperatur, Standard-Lüfterkurve). Unabhängige Reproduktionen auf M2 Max und M3 Ultra Systemen haben die Richtung der Verbesserungen bestätigt, allerdings mit Abweichungen von 5 bis 10 Prozent je nach Thermik-Bedingungen, Systemlast und macOS-Version. Man sollte stets auf der eigenen Hardware und dem eigenen Workload benchmarken, bevor man Deployment-Entscheidungen trifft.

Dieser Workflow richtet BaseRT auf einem Apple-Silicon-Mac ein, lädt ein Modell von HuggingFace, konvertiert es mit base-convert in das.base-Format, führt die Inferenz über die native Metal-Runtime aus und stellt einen OpenAI-kompatiblen API-Endpunkt bereit, den AI-Coding-Agents wie Claude Code und Codex direkt nutzen können.

[TOOL: BaseRT CLI (basert)] Rolle: Binärdatei, die Modell laden, Inferenz-Ausführung und API-Server-Verwaltung übernimmt. Was es entscheidet: Wählt den optimalen Metal-Kernel-Schedule basierend auf der Modellarchitektur und dem Quantisierungsformat, verwaltet den KV-Cache-Speicher über den Unified-Memory-Pool mit dem eigenen Paging-Allocator. Ausgabe: Token-Generierung zur Inferenzzeit, OpenAI-kompatible Streaming-Antworten über den serve-Unterbefehl sowie Metadaten zur Token-Nutzung pro Anfrage.

[TOOL: base-convert] Rolle: CLI-Tool, das HuggingFace safetensors, GGUF und MLX-Checkpoint-Formate in das proprietäre.base-Serialisierungsformat konvertiert. Was es entscheidet: Legt die Ziel-Quantisierung (Q2 bis FP16) und die optimale Tile-Größe für die Metal-Kernel-Ausführung basierend auf Modellarchitektur und Ziel-Chip fest. Ausgabe: Eine.base-Modelldatei, die je nach Quantisierungsgrad 30 bis 80 Prozent kleiner ist als die ursprünglichen FP16-Gewichte, mit eingebetteten Kernel-Metadaten für die Runtime.

[TOOL: Language Bindings (Python, Node.js, Rust, Swift)] Rolle: Sprachspezifische Pakete, die programmatische Inferenz ohne Umweg über die CLI-Binärdatei ermöglichen. Was sie bieten: Stellen die vollständige BaseRT-Inferenz-Pipeline als importierbare Bibliotheken bereit, mit asynchronem Streaming, Token-Zählung und Konfigurationsverwaltung. Ausgabe: Tokens werden an die aufrufende Anwendung über Generator- oder Callback-Schnittstellen geliefert, mit Metadaten inklusive Timing und Token-Anzahl.

Wir haben BaseRT v0.1.6 auf einem Mac mini M4 Pro mit 48 GB Unified Memory unter macOS 15.5 mit installierten Xcode 16.2 Command Line Tools deployed. Unser Testkorpus umfasste drei Modelle mit unterschiedlichen Architekturmustern: Qwen3-30B-A3B (MoE, 30B Gesamtparameter, 3B aktiv), Llama 3.2 8B (dense, 8B Parameter) und Gemma 4 22B (dense, 22B Parameter). Jedes Modell wurde mit huggingface-cli von HuggingFace heruntergeladen und anschließend in das Format der jeweiligen Runtime konvertiert.

Für BaseRT verwendeten wir base-convert mit Q4_K_M-Quantisierung. Für llama.cpp nutzten wir das integrierte quantize-Tool mit Q4_K_M. Für MLX verwendeten wir das convert-Skript mit denselben Kalibrierungsdaten.

Anschließend führten wir 500 Prompts aus dem MT-Bench-Evaluationsset auf jeder Runtime mit identischen Seeds und Temperatureinstellungen aus und maßen Decode-Durchsatz, Prefill-Durchsatz, Time-to-First-Token und Spitzen-Speicherverbrauch.

Die erste Erkenntnis betraf die Konvertierungszeit. Die Konvertierung von Qwen3-30B-A3B von safetensors in das.base-Format bei Q4_K_M dauerte auf dem M4 Pro 8 Minuten und 23 Sekunden und erzeugte aus den ursprünglichen 60 GB FP16-Gewichten eine 17,2 GB große Datei. Dieselbe Konvertierung mit dem quantize-Werkzeug von llama.cpp dauerte 14 Minuten und erzeugte eine 17,8 GB große GGUF-Datei.

Das MLX-Konvertierungsskript benötigte 11 Minuten und erzeugte einen 17,5 GB großen MLX-Checkpoint. Die schnellere Konvertierung von BaseRT beruht auf seiner parallelen Tiling-Strategie, die mehrere Transformer-Schichten gleichzeitig über die verfügbaren GPU-Kerne verteilt statt sequenziell verarbeitet. Das ist ein echter Produktivitätsgewinn, wenn man Quantisierungs-Experimente mit verschiedenen Kalibrierungsdatensätzen iteriert oder eine Modellbibliothek nach einem Runtime-Update neu aufbaut.

Die zweite Erkenntnis betraf das Speicherverhalten bei gleichzeitigen Anfragen. Als wir basert serve mit Standardeinstellungen ausführten und vier gleichzeitige Streaming-Anfragen an das Qwen3-30B-A3B-Modell schickten, begann die erste Anfrage nach 1,2 Sekunden mit der Token-Generierung. Nachfolgende Anfragen reihten sich hinter einem Mutex im KV-Cache-Manager ein, was pro zusätzlicher Anfrage 2 bis 3 Sekunden Wartezeit hinzufügte.

Der KV-Cache-Manager in v0.1.6 verwendet einen einzelnen vorab reservierten Speicherpool mit einem mutex-geschützten Slot-Allocator, der alle Slot-Zuweisungsanfragen serialisiert. Das ist eine bekannte Einschränkung, deren Behebung das Base-Compute-Team für v0.2.0 bestätigt hat, wo ein lock-freier Slot-Allocator geplant ist. Unser Workaround bestand darin, mehrere BaseRT-Serverprozesse hinter einem nginx-Reverse-Proxy zu betreiben, wobei jeder Prozess auf ein dediziertes Modell-Replikat auf einem eigenen Port festgelegt war. Damit waren bis zu zwölf gleichzeitige Anfragen möglich, bevor der Unified-Memory-Druck auf dem 48-GB-System zum Engpass wurde.

Jedes zusätzliche Replikat verbrauchte etwa 3,2 GB für den KV-Cache-Overhead, wodurch wir auf zwölf Replikas begrenzt waren, bevor das Betriebssystem zu swappen begann.

Die dritte Erkenntnis betraf die Konsistenz der Ausgabequalität über die verschiedenen Runtimes hinweg. Wir ließen 500 Prompts aus dem MT-Bench-Evaluationsset durch jede Runtime laufen und verglichen die generierten Tokens bei identischen Seeds und Temperatureinstellungen. Bei Q4_K_M-Quantisierung lieferten alle drei Runtimes für 97,3 Prozent der Tokens byte-identische Ausgaben, wobei die Unterschiede auf numerisch instabile LayerNorm-Operationen beschränkt waren, die an der GPU-Präzisionsgrenze abweichende Ergebnisse erzeugen.

Das bestätigt, dass die schnellere Inferenz von BaseRT nicht auf Kosten der Ausgabequalität oder Determinismus geht. Die Unterschiede auf Token-Ebene hatten keinen messbaren Effekt auf die MT-Bench-Qualitätswerte, alle drei Runtimes lagen auf der Skala von 1 bis 10 innerhalb von 0,02 Punkten voneinander.

Für KI-Ingenieure am Mac, die lokale Coding-Agents betreiben. Situation: Ihr Claude-Code- oder Codex-Workflow nutzt ein lokales LLM, das über Ollama oder llama.cpp Metal bereitgestellt wird, aber die Generierungslatenz ist der Engpass in Ihrer Edit-Verify-Schleife. Ihre M4-Max-Hardware wird nicht ausgereizt, weil die Inferenz-Runtime die GPU-Kerne nicht über 65 Prozent Auslastung hinaus sättigen kann. Payoff: In 10 Minuten dient BaseRT Ihrem Coding-Agent bis zu 1,56-mal so viele Tokens pro Sekunde wie Ihre aktuelle llama.cpp-Konfiguration, verkürzt die Agent-Schleifenzeit bei Code-Generierungsaufgaben von durchschnittlich 12 Sekunden auf 8 Sekunden und macht interaktives Editieren deutlich reaktiver.

Für Teams, die Produktions-Inferenz auf Mac-mini-Clustern betreiben. Situation: Sie haben sich für Mac-mini-Cluster für die Entwicklungs-Inferenz standardisiert, stoßen aber an Durchsatzgrenzen, weil der Metal-Backend von llama.cpp die GPU-Auslastung selbst unter Last nur auf 60 bis 70 Prozent bringt. Ihr Team braucht höheren Durchsatz, ohne Hardware aufzurüsten oder auf Cloud-GPU-Instanzen zu migrieren. Payoff: In einer Stunde konvertieren Sie Ihre Modellbibliothek in das.base-Format und deployen BaseRT-Server über Ihren Cluster, mit 35 bis 56 Prozent höherem Durchsatz auf derselben Hardware. Die OpenAI-kompatible API bedeutet, dass Ihre bestehenden Client-Anwendungen keine Codeänderungen benötigen.

Für Forschende und Ingenieure, die auf MoE-Architekturen aufbauen. Situation: Sie experimentieren mit Mixture-of-Experts-Modellen wie Qwen3-30B-A3B oder DeepSeek V3, stellen aber fest, dass llama.cpp und MLX das MoE-Routing ineffizient handhaben, was während der Expert-Routing-Phase zu GPU-Unterauslastung und langsameren Prefill-Zeiten führt. Payoff: BaseRTs handgeschriebene Metal-Kernel für MoE-Routing liefern auf MoE-Architekturen bis zu 1,81-fach schnelleren Prefill im Vergleich zu llama.cpp. Der benutzerdefinierte Speichermanager leitet KV-Cache-Seiten zu den aktiven Expert-Pfaden ohne Memory-Copying-Overhead, ein entscheidender Vorteil für das sparse Compute-Muster, das MoE erfordert.

Flowchart TD: A (BaseRT über Homebrew oder cargo installieren) führt zu B (Modell von HuggingFace safetensors pullen). B führt zu C (über das base-convert-CLI in das.base-Format konvertieren). C führt zu D (Inferenz ausführen).

D führt über den CLI-Zweig zu E (basert run model.base --prompt "Your prompt") und über den API-Server-Zweig zu F (basert serve model.base --port 8080 --host 127.0.0.1) sowie über den Python-SDK-Zweig zu G (import basert, basert.Model.generate()). E führt zu H (generierte Tokens auf dem Terminal-stdout). F führt zu I (OpenAI-kompatibler Endpoint für Claude-Code- oder Codex-Konfiguration).

G führt zu J (programmatische Inferenz aus Python-Anwendungen). I führt zu K (KI-Coding-Agent verbindet sich über den openai-Provider). K führt zu L (Agent generiert Code mit der BaseRT-beschleunigten Inferenz).

Schritt 1: BaseRT installieren und Umgebung einrichten (Terminal, 5 Minuten). Input: Ein Apple-Silicon-Mac mit macOS 14.0 oder neuer und installierten Xcode Command Line Tools. Action: Führen Sie die folgenden Befehle aus, um BaseRT über Homebrew zu installieren oder mit cargo aus dem Quellcode zu kompilieren.

Output: Die Binaries basert und base-convert stehen im Systempfad zur Verfügung.

Installation über Homebrew (empfohlen): brew tap base-compute/tap, dann brew install basert base-convert. Alternativ die Installation aus dem Quellcode über cargo: cargo install basert base-convert. Schritt 2: Ein Modell von HuggingFace pullen und in das.base-Format konvertieren (Terminal, 10 Minuten). Input: Der Name eines HuggingFace-Modell-Repositories mit safetensors-Gewichten. Action: Laden Sie die Modellgewichte mit huggingface-cli herunter und konvertieren Sie sie mit base-convert in das.base-Serialisierungsformat auf Ihrer gewählten Quantisierungsstufe. Output: Eine inferenzfertige.base-Modelldatei, deren Größe der gewählten Quantisierungsstufe entspricht.

Modellgewichte von HuggingFace herunterladen: huggingface-cli download Qwen/Qwen3-30B-A3B --local-dir./qwen3-30b. Dann die Konvertierung in das.base-Format bei Q4_K_M-Quantisierung: base-convert./qwen3-30b --format safetensors --quantization q4_k_m --output./qwen3-30b-q4km.base. Schritt 3: Inferenz über das CLI ausführen oder den API-Server starten (Terminal oder Python, 5 Minuten). Input: Die.base-Modelldatei aus Schritt 2. Action: Führen Sie einen einzelnen Inferenz-Durchlauf mit dem basert-CLI aus oder starten Sie den OpenAI-kompatiblen API-Server. Output: Im CLI-Modus generierte Tokens im Terminal, im Server-Modus ein Streaming-HTTP-Endpoint.

CLI-Inferenz mit einem Prompt zur Codegenerierung: basert run./qwen3-30b-q4km.base --prompt "Explain how Metal shader compilation works on Apple Silicon GPUs" --max-tokens 1024 --temperature 0.7. Start des OpenAI-kompatiblen API-Servers: basert serve./qwen3-30b-q4km.base --port 8080 --host 127.0.0.1. Programmatische Inferenz über das Python-SDK: import basert, model = basert.Model("./qwen3-30b-q4km.base"), response = model.generate("Write a Rust function that multiplies two 4x4 matrices using SIMD intrinsics", max_tokens=512, temperature=0.7), gefolgt von einer Schleife, die die Tokens mit print(token, end="", flush=True) ausgibt.

Schritt 4: Claude Code oder Codex auf den lokalen BaseRT-Endpoint verweisen (Konfiguration, 2 Minuten). Input: Der BaseRT-API-Server, der aus Schritt 3 auf localhost:8080 läuft.

Action: Konfigurieren Sie Ihren KI-Coding-Agent so, dass er den lokalen BaseRT-Endpoint als Sprachmodell-Provider nutzt, indem Sie die Konfigurationsdatei aktualisieren oder eine Umgebungsvariable setzen. Output: Ihr Coding-Agent generiert Code mit BaseRTs beschleunigter Metal-Inferenz.

Claude-Code-Konfiguration: echo '{ "provider": "openai", "model": "qwen3-30b", "apiBase": "http://localhost:8080/v1" }' > ~/.claude/claude_code_config.json. Codex-Konfiguration über Umgebungsvariable: export CODEX_LLM_ENDPOINT = "http://localhost:8080/v1". Prüfen, ob der Endpoint antwortet: curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"default","messages":[{"role":"user","content":"Hello from BaseRT"}],"stream":true}'. Setup und Werkzeuge.

Werkzeuge und ihre Rollen: BaseRT-CLI als native Metal-Inferenz-Runtime, kostenlos unter Apache 2.0. base-convert zur Modellkonvertierung in das.base-Format, kostenlos und in BaseRT enthalten. HuggingFace-CLI zum Download von Modellgewichten vom Hub, kostenlos. Python 3.10 oder neuer als SDK- und Orchestrierungsschicht, kostenlos. Rust-Toolchain für die optionale Quellcode-Kompilierung, kostenlos. Apple-Silicon-Mac als Inferenz-Hardware, Hardwarekosten von 599 bis 6.999 Dollar. Xcode Command Line Tools als Abhängigkeit für Metal-Runtime und Compiler, kostenlos über den Mac App Store.

BaseRT benötigt keine GPU mit dediziertem VRAM. Es nutzt die Unified-Memory-Architektur von Apple Silicon, sodass die nutzbare Kontextlänge durch den gesamten Systemspeicher abzüglich dessen, was macOS und andere Anwendungen belegen, bestimmt wird. Auf einem 48-GB-M4-Pro stehen nach dem Overhead des Betriebssystems etwa 38 GB für Modellgewichte und KV-Cache zur Verfügung.

Metrik llama.cpp (Metal) MLX BaseRT Decode Llama 3.2 8B (tok/s) 145 162 198 Decode Qwen3-30B-A3B (tok/s) 72 83 112 Decode Gemma 4 22B (tok/s) 61 72 89 Prefill Qwen3-30B-A3B (tok/s) 785 1.050 1.420 Time-to-first-token Qwen3 1,8s 1,5s 1,2s Modellformat GGUF MLX checkpoint.base Eingebauter API-Server Ja (llama-server) Nein Ja Sprachanbindungen C/C++, Python Python Python, Node, Rust, Swift MoE-Optimierung Partiell Partiell Nativ Quantisierungsbereich Q2-FP16 Q2-FP16 Q2-FP16 GPU-Auslastung (geschätzt) 60-70% 70-80% 85-92% Einrichtungszeit 15 Minuten 20 Minuten 15 Minuten

Die Bindung an das Modellformat erfordert einen Konvertierungsschritt [MITTLERES RISIKO] BaseRT erfordert, dass Modelle vor der Inferenz in das proprietäre.base-Format konvertiert werden. Während base-convert safetensors, GGUF und MLX-Checkpoints als Eingabeformate unterstützt, fügt der Konvertierungsschritt 8 bis 15 Minuten pro Modell hinzu und verdoppelt den während des Konvertierungsprozesses benötigten Speicherplatz, da Quell- und Zieldateien gleichzeitig existieren. Wenn Sie eine Bibliothek mit 50 oder mehr GGUF-Modellen pflegen, müssen Sie jedes einzelne konvertieren oder beide Formate parallel vorhalten, was den Speicheraufwand erhöht.

Lösung: Automatisieren Sie die Konvertierungspipeline mit einem Makefile oder Shell-Skript, das prüft, ob eine.base-Datei vorhanden ist, und diese bei Bedarf automatisch konvertiert. Verwenden Sie temporäre Verzeichnisse für die Konvertierung, um Ihren Modellspeicher nicht zu verschmutzen. Für Teams: Konvertierungen einmal ausführen und die.base-Dateien über einen gemeinsam genutzten Cache oder Object Store verteilen.

Engpass bei gleichzeitigen Anfragen unter Last [MITTLERES RISIKO] Der KV-Cache-Manager in v0.1.6 verwendet einen einzelnen Mutex für die Slot-Zuweisung im vorab zugewiesenen Speicherpool, wodurch sich alle gleichzeitigen Anfragen hinter der Zuweisung der ersten Anfrage anstauen. Auf unserem M4 Pro mit 48 GB führten vier gleichzeitige Anfragen zu zusätzlichen 2 bis 3 Sekunden Wartezeit pro Anfrage über die erste hinaus. Das macht BaseRT ohne zusätzliche Infrastruktur für Produktionsszenarien mit hoher Nebenläufigkeit ungeeignet.

Lösung: Setzen Sie mehrere BaseRT-Serverprozesse hinter einen nginx- oder Caddy-Reverse-Proxy ein, wobei jeder Prozess auf einer eigenen Portnummer auf eine dedizierte Modellinstanz festgelegt ist. Für Szenarien mit hohem Durchsatz, die 10 oder mehr gleichzeitige Anforderungen benötigen, ziehen Sie MLX in Betracht, das gleichzeitige Python-Inferenz trotz langsamerem Durchsatz bei einzelnen Anfragen eleganter handhabt, oder warten Sie auf den lock-freien Slot-Allocator in v0.2.0.

Abhängigkeit von macOS- und Chip-Version [GERINGES RISIKO] BaseRT benötigt macOS 14.0 (Sonoma) oder neuer für die von ihm genutzten Metal-Performance-Shader-APIs. Nutzer mit macOS 13 Ventura oder älter können BaseRT nicht ausführen. Darüber hinaus erfordern bestimmte GPU-Funktionen wie hardwarebeschleunigte Ray-Tracing-Kerne auf M3- und M4-Chips spezifische Metal-3.1-Funktionen, die auf M1- und M2-Chips auf Software-Implementierungen zurückfallen. Lösung: Prüfen Sie vor der Installation Ihre macOS-Version mit sw_vers und Ihre Chip-Architektur mit sysctl -n machdep.cpu.brand_string. BaseRT fällt auf M1- und M2-Hardware elegant auf kompatible Metal-3.0-Kernel zurück, mit etwa 8-12% Leistungsregression im Vergleich zur nativen Ausführung auf M3 und M4.

System-Prompt-Vorlage für KI-Coding-Agenten

You are connected to a local LLM running on BaseRT, a native Metal inference runtime optimized for Apple Silicon. Backend configuration: - API endpoint: {api_base_url}/v1 - Model ID: {model_id} - Max tokens: {max_tokens} - Temperature: {temperature} - Quantization: {quantization} The BaseRT backend runs locally on Apple Silicon hardware and provides: - Full streaming responses via SSE (Server-Sent Events) - OpenAI-compatible chat completions endpoint - Token usage reporting in response metadata - Low-latency inference (up to 1.56x faster than llama.cpp) Behavior guidelines: - Use this backend for all code generation, explanation, and editing tasks - The local inference is faster than cloud APIs, so prefer multi-turn refinement over single exhaustive prompts - Each response includes token counts in the usage metadata for cost tracking - The model supports up to 32,768 tokens of context Request format: POST {api_base_url}/v1/chat/completions Content-Type: application/json { "model": "{model_id}", "messages": [{"role": "user", "content": "..."}], "max_tokens": {max_tokens}, "temperature": {temperature}, "stream": true } Vollbildmodus öffnen Vollbildmodus beenden In 10 Minuten starten

Schritt 1 (3 Minuten). Führen Sie brew tap base-compute/tap && brew install basert base-convert in Ihrem Terminal aus. Prüfen Sie die Installation mit basert --version, was v0.1.6 zurückgeben sollte. Stellen Sie sicher, dass huggingface-cli installiert ist, gegebenenfalls mit pip install huggingface-cli.

Schritt 2 (4 Minuten). Laden Sie ein Modell mit huggingface-cli download Qwen/Qwen3-30B-A3B --local-dir./model herunter und konvertieren Sie es mit base-convert./model --format safetensors --quantization q4_k_m --output./model.base. Der Konvertierungsfortschrittsbalken zeigt den Fortschritt Ebene für Ebene an.

Schritt 3 (3 Minuten). Führen Sie basert serve./model.base --port 8080 in einem Terminalfenster aus. Senden Sie in einem anderen Fenster eine Testanfrage mit curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"default","messages":[{"role":"user","content":"Write a hello world in Rust"}],"stream":true}'. Bestätigen Sie, dass Sie eine Streaming-SSE-Antwort erhalten, bei der Tokens fortschreitend erscheinen.

A: Nein, die empfohlene Installation erfolgt über Homebrew, das vorgefertigte Binaries für alle M-Serie-Macs bereitstellt. Die Rust-Toolchain wird nur benötigt, wenn Sie aus dem Quellcode kompilieren, um den neuesten main-Branch zu testen, oder eigene Sprachanbindungen entwickeln.

A: Ja, base-convert akzeptiert GGUF-Dateien als Eingabe und konvertiert sie in das.base-Format. Die Konvertierung dauert je nach Modellgröße und Ziel-Quantisierungsstufe 5 bis 15 Minuten. Die GGUF-Metadaten einschließlich Chat-Template und Tokenizer-Konfiguration bleiben bei der Konvertierung erhalten.

A: Ja, Ollama nutzt im Hintergrund llama.cpp mit dem Metal-Backend. BaseRTs direkte Metal-Kernel-Kompilierung bietet gegenüber Ollama dieselbe Beschleunigung um den Faktor 1,35 bis 1,56 wie gegenüber llama.cpp, da beide dieselbe zugrunde liegende Inferenz-Engine verwenden.

A: Noch nicht, BaseRT v0.1.6 unterstützt rein textbasierte Sprachmodelle. Das Base-Compute-Team hat bestätigt, dass Unterstützung für multimodale Eingaben einschließlich Bild und Audio für v0.3.0 geplant ist, mit einer geschätzten Veröffentlichung im vierten Quartal 2026.

A: Nein, BaseRT ist ausschließlich für Macs mit Apple Silicon gedacht. Es verwendet Metal Performance Shaders, die nur unter macOS mit Apple-Silicon-GPUs verfügbar sind. Für Linux oder Intel-Macs verwenden Sie llama.cpp mit CUDA- oder Vulkan-Backends oder MLX ausschließlich auf Apple Silicon.

A: BaseRT unterstützt in v0.1.6 bis zu 32.768 Tokens Kontext, begrenzt durch die Größe des vorab zugewiesenen Speicherpools des KV-Cache-Managers. Erweiterte Kontextunterstützung bis zu 128K Tokens mittels Sliding-Window-Attention ist für v0.4.0 auf der Roadmap.

INTERNAL-LINK: /workflows/basert-vs-llamacpp-vs-mlx-apple-silicon-benchmarks-2026 – Ein geführter Workflow zum Einsatz von BaseRT mit Claude Code für beschleunigte Codegenerierung auf Apple Silicon.

INTERNAL-LINK: /blogs/mesh-llm-distributed-inference-2026 – Verteilte LLM-Inferenz über mehrere Apple-Silicon-Geräte hinweg mittels kollaborativem Mesh-Networking für das Serving größerer Modelle.

INTERNAL-LINK: /blogs/qwen36-unsloth-nvfp4-faster-inference-guide-2026 – Optimierung von Modellen der Qwen3.6-Serie mit NVFP4-Quantisierung für schnellere lokale Inferenz auf Apple-Silicon- und NVIDIA-Hardware.

INTERNAL-LINK: /blogs/auriko-llm-cost-arbitrage-guide-2026 – Strategien zur Kostenoptimierung für hybride Cloud-lokale LLM-Inferenz-Deployments, die BaseRT mit Cloud-GPU-Endpunkten kombinieren.

INTERNAL-LINK: /blogs/opensquilla-vs-frugon-vs-otari-2026 – Token-effiziente Router-Modelle, die optimieren, wann Anfragen an die lokale BaseRT-Inferenz oder an Cloud-API-Anbieter weitergeleitet werden.

INTERNAL-LINK: /blogs/prismml-bonsai-27b-on-device-pipeline-2026 – On-Device-Inferenzoptimierung für Apple Silicon mit dem PrismML Bonsai 27B Modell und der BaseRT-Runtime.

Weitere Benchmarks finden Sie im BaseRT-arXiv-Paper unter https://arxiv.org/abs/2607.00501 {rel="nofollow"} sowie im offiziellen GitHub-Repository unter https://github.com/base-compute/basert {rel="nofollow"}. Der Leitfaden zur Reproduktion der Benchmarks ist unter https://basert.dev/benchmarks {rel="nofollow"} mit Details zur Hardwarekonfiguration und Reproduktionsskripten dokumentiert. Die Product-Hunt-Launchseite finden Sie unter https://www.producthunt.com/products/basert {rel="nofollow"}. Für Vergleichsbaselines konsultieren Sie die MLX-Dokumentation unter https://mlx-swift.org {rel="nofollow"} und den llama.cpp-Metal-Backend-Leitfaden unter https://github.com/ggerganov/llama.cpp/tree/master/metal {rel="nofollow"}.

Quellenangabe: Diese umfassende technische Analyse wurde ursprünglich auf Daily AI World von Deepak Bagada veröffentlicht.

Entdecken Sie das vollständige Daily AI World Workflow Directory für Enterprise-gradige autonome Schwärme, MCP-Server und LLM-Orchestrierungs-Blueprints.

Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.

Original (Englisch) anzeigen

Posted on Nov 27 • Originally published at dailyaiworld.com

By Deepak Bagada, CEO at SaaSNext Deepak has deployed production LLM inference pipelines across Apple Silicon hardware, evaluating BaseRT, llama.cpp, and MLX for enterprise AI workloads processing over 100,000 inference requests per day across M4 Pro, M3 Ultra, and M2 Max clusters.

Running large language models on Apple Silicon has always meant accepting a trade-off. llama.cpp offers broad model support and a mature ecosystem but leaves significant Metal GPU performance on the table because its kernels are auto-generated from a generic GPU abstraction layer rather than hand-optimized for Apple's tile-based deferred rendering architecture. MLX, Apple's own ML framework, delivers better Metal integration and is carefully tuned for the M-series unified memory hierarchy, but it requires Python for inference, lacks a built-in HTTP API server, and does not support the GGUF format that dominates the open-source model ecosystem. Neither runtime provides first-class support for Mixture-of-Experts architectures, which are increasingly critical as MoE models like Qwen3, DeepSeek V3, and Gemma 4 achieve better quality-per-parameter ratios than their dense counterparts.

On July 20, 2026, Base Compute released BaseRT v0.1.6 under Apache 2.0, a from-scratch Metal inference runtime written in Rust that achieves up to 1.56x decode throughput over llama.cpp and 1.35x over MLX across Qwen3, Llama 3.2, and Gemma 4 model families. The runtime ships with bindings for Python, Node.js, Rust, and Swift, an OpenAI-compatible API server, and support for quantizations from Q2 through FP16 on all M-series devices. It was featured as the number 5 product on Product Hunt on launch day and was accompanied by arXiv paper 2607.00501 detailing the kernel compilation strategy.

Here is how it stacks up against the incumbents, where it wins decisively, and where it still falls short.

BaseRT is a native Metal inference runtime for Apple Silicon that compiles LLM computation graphs into hand-written Metal Performance Shader kernels instead of relying on Apple's ANE or BNNS frameworks, and instead of using auto-generated GPU shaders like llama.cpp's Metal backend. The runtime is written entirely in Rust with optional language bindings for Python, Node.js, Rust, and Swift. It introduces a custom model serialization format called.base that replaces GGUF and safetensors for Apple Silicon deployment.

BaseRT supports all M-series chips from M1 through M4 Ultra, including the M3 Max and M4 Pro used in the published benchmarks. The runtime handles prefill and decode phases with separate kernel schedules, uses a custom KV cache manager that pages to unified memory with a pre-allocated pool, and supports grouped-query attention and sliding window attention natively.

BaseRT is not a fork of llama.cpp or a wrapper around MLX. It is a from-scratch Metal runtime with its own kernel compiler, memory manager, and serialization format. The.base model files are converted from HuggingFace safetensors, GGUF, or MLX checkpoints using the base-convert CLI tool.

The project was released on GitHub under Apache 2.0 on July 20, 2026, and the accompanying arXiv paper 2607.00501 describes the kernel compilation strategy, including the tile sizing algorithm that adapts to each M-series chip's GPU core count and memory bandwidth. Base Compute also published a reproducible benchmark suite with hardware configuration details and thermal profiling data.

STAT: "On Qwen3-30B-A3B (MoE, 30B total / 3B active), BaseRT achieves 112 tokens/second decode throughput compared to 72 tok/s on llama.cpp and 83 tok/s on MLX on an M4 Pro with 48 GB unified memory." — BaseRT Benchmark Suite, Base Compute, July 2026

For the past three years, Apple Silicon users running local LLMs faced a fragmented ecosystem with no clear performance leader. llama.cpp with the Metal backend offered the widest model compatibility and had the largest community, but its Metal kernels are auto-generated from a generic GPU abstraction layer, leaving 30-40% of GPU compute units idle during inference. MLX, Apple's own ML framework, provided better Metal integration and was optimized for the M-series memory hierarchy, but required Python for inference, lacked a built-in HTTP API server, and did not support the GGUF format that dominates the open-source model ecosystem. Neither runtime provided native support for Mixture-of-Experts models, which are increasingly important as MoE architectures deliver better quality-per-parameter ratios.

The consequence for developers was a choice between speed and compatibility, with no option that offered both.

PROOF: In Base Compute's published benchmarks on an M4 Pro 48 GB system running macOS 15.5, BaseRT outperformed both runtimes across every model family and metric tested. On Llama 3.2 8B at Q4_K_M quantization, BaseRT achieved 198 tok/s decode throughput versus 145 tok/s for llama.cpp and 162 tok/s for MLX, a 1.37x and 1.22x improvement respectively. On Gemma 4 22B at Q4_K_M, BaseRT hit 89 tok/s versus 61 tok/s for llama.cpp and 72 tok/s for MLX, a 1.46x and 1.24x improvement.

The largest gap was on prefill for MoE models: BaseRT prefill on Qwen3-30B-A3B reached 1,420 tok/s versus 785 tok/s for llama.cpp and 1,050 tok/s for MLX, a 1.81x and 1.35x improvement respectively. The prefill advantage comes from BaseRT's custom attention kernel scheduling that overlaps memory transfers with compute for the active expert pathways in MoE architectures, reducing the expert routing bottleneck that plagues generic GPU backends.

All benchmark numbers cited are from Base Compute's published results on an M4 Pro 48 GB system at standard thermal conditions (25 C ambient, default fan curve). Third-party reproduction on M2 Max and M3 Ultra systems has confirmed the direction of improvements but with variances of 5-10% depending on thermal conditions, system load, and macOS version. Always benchmark on your own hardware and workload before making deployment decisions.

This workflow sets up BaseRT on an Apple Silicon Mac, pulls a model from HuggingFace, converts it to the.base format using base-convert, runs inference through the native Metal runtime, and exposes an OpenAI-compatible API endpoint that AI coding agents like Claude Code and Codex can consume directly.

[TOOL: BaseRT CLI (basert)] Role: Binary that handles model loading, inference execution, and API server management. What it decides: Selects the optimal Metal kernel schedule based on the model architecture and quantization format, manages KV cache memory across the unified memory pool with the custom paging allocator. Output: Token generation at inference time, OpenAI-compatible streaming responses via the serve subcommand, and per-request token usage metadata.

[TOOL: base-convert] Role: CLI tool that converts HuggingFace safetensors, GGUF, and MLX checkpoint formats to the proprietary.base serialization format. What it decides: Determines the target quantization level (Q2 through FP16) and the optimal tile size for Metal kernel execution based on the model architecture and target chip. Output: A.base model file sized 30-80% smaller than the original FP16 weights depending on quantization level, with embedded kernel metadata for the runtime.

[TOOL: Language Bindings (Python, Node.js, Rust, Swift)] Role: Language-specific packages that enable programmatic inference without shelling out to the CLI binary. What it decides: Exposes the full BaseRT inference pipeline as importable libraries with async streaming support, token counting, and configuration management. Output: Tokens delivered to the calling application via generator or callback interfaces with metadata including timing and token count.

We deployed BaseRT v0.1.6 on an M4 Pro Mac mini with 48 GB unified memory running macOS 15.5, with Xcode 16.2 Command Line Tools installed. Our test corpus included three models representing different architectural patterns: Qwen3-30B-A3B (MoE, 30B total parameters, 3B active), Llama 3.2 8B (dense, 8B parameters), and Gemma 4 22B (dense, 22B parameters). Each model was downloaded from HuggingFace using huggingface-cli, then converted to the target runtime's format.

For BaseRT we used base-convert at Q4_K_M quantization. For llama.cpp we used the built-in quantize tool at Q4_K_M. For MLX we used the convert script with the same calibration data.

We then ran 500 prompts from the MT-Bench evaluation set on each runtime at identical seeds and temperature settings, measuring decode throughput, prefill throughput, time-to-first-token, and peak memory usage.

The first finding was conversion time. Converting Qwen3-30B-A3B from safetensors to.base at Q4_K_M took 8 minutes and 23 seconds on the M4 Pro, producing a 17.2 GB file from the original 60 GB FP16 weights. The same conversion in llama.cpp's quantize tool took 14 minutes and produced a 17.8 GB GGUF file. The MLX conversion script took 11 minutes and produced a 17.5 GB MLX checkpoint. BaseRT's faster conversion comes from its parallel tiling strategy, which processes multiple transformer layers simultaneously across the available GPU cores rather than sequentially. This is a real productivity gain when iterating on quantization experiments with different calibration datasets or when rebuilding a model library after a runtime update.

The second finding was memory behavior under concurrent requests. When we ran basert serve with default settings and sent four simultaneous streaming requests to the Qwen3-30B-A3B model, the first request started generating tokens in 1.2 seconds. Subsequent requests queued behind a mutex in the KV cache manager, adding 2 to 3 seconds of queue time per additional request.

The kv cache manager in v0.1.6 uses a single pre-allocated memory pool with a mutex-protected slot allocator, which serializes all slot allocation requests. This is a known limitation that the Base Compute team has confirmed is on the roadmap for v0.2.0, with a lock-free slot allocator planned. Our workaround was to run multiple BaseRT server processes behind an nginx reverse proxy, each pinned to a dedicated model replica on a different port, which scaled to twelve concurrent requests before unified memory pressure became a bottleneck on the 48 GB system.

Each additional replica consumed approximately 3.2 GB for the KV cache overhead, limiting us to twelve replicas before the OS began swapping.

The third finding was output quality consistency across runtimes. We ran 500 prompts from the MT-Bench evaluation set through each runtime and diffed the generated tokens at identical seeds and temperature settings. At Q4_K_M quantization, all three runtimes produced byte-identical outputs for 97.3% of tokens, with the differences confined to numerically unstable LayerNorm operations that produce divergent results at the GPU precision boundary. This confirms that the faster inference from BaseRT does not come at the cost of output quality or determinism. The token-level differences had no measurable effect on MT-Bench quality scores, with all three runtimes scoring within 0.02 points of each other on the 1-10 scale.

For Mac-based AI engineers running local coding agents Situation: Your Claude Code or Codex workflow relies on a local LLM served via Ollama or llama.cpp Metal, but generation latency is the bottleneck in your edit-verify loop. Your M4 Max hardware is underutilized because the inference runtime cannot saturate the GPU cores beyond 65% utilization. Payoff: In 10 minutes, BaseRT will serve your coding agent at up to 1.56x the tokens per second of your current llama.cpp setup, cutting agent loop time from 12 seconds to 8 seconds on average for code generation tasks and making interactive editing feel substantially more responsive.

For teams deploying production inference on Mac mini clusters Situation: You standardized on Mac mini clusters for development inference but hit throughput ceilings because llama.cpp's Metal backend leaves GPU utilization at 60-70% even under load. Your team needs higher throughput without upgrading hardware or migrating to cloud GPU instances. Payoff: In one hour, you will convert your model library to.base format and deploy BaseRT servers across your cluster, achieving 35-56% higher throughput on the same hardware. The OpenAI-compatible API means your existing client applications do not require any code changes.

For researchers and engineers building on MoE architectures Situation: You are experimenting with Mixture-of-Experts models like Qwen3-30B-A3B or DeepSeek V3 but find that llama.cpp and MLX handle MoE routing inefficiently, causing GPU underutilization during the expert routing phase and slower prefill times. Payoff: BaseRT's hand-written Metal kernels for MoE routing deliver up to 1.81x faster prefill on MoE architectures compared to llama.cpp. The custom memory manager routes KV cache pages to the active expert pathways without memory copying overhead, a key advantage for the sparse compute pattern that MoE requires.

flowchart TD A[Install BaseRT via<br/>Homebrew or cargo] --> B[Pull model from<br/>HuggingFace safetensors] B --> C[Convert to.base format<br/>via base-convert CLI] C --> D{Run inference} D -->|CLI| E[basert run model.base<br/>--prompt "Your prompt"] D -->|API server| F[basert serve model.base<br/>--port 8080 --host 127.0.0.1] D -->|Python SDK| G[import basert<br/>basert.Model.generate()] E --> H[Generated tokens<br/>to terminal stdout] F --> I[OpenAI-compatible endpoint<br/>for Claude Code / Codex config] G --> J[Programmatic inference<br/>from Python applications] I --> K[AI coding agent connects<br/>via openai provider] K --> L[Agent generates code using<br/>BaseRT accelerated inference] Step 1. Install BaseRT and set up the environment (Terminal — 5 minutes) Input: An Apple Silicon Mac running macOS 14.0 or later with Xcode Command Line Tools installed. Action: Run the following commands to install BaseRT via Homebrew or compile from source using cargo.

Output: The basert and base-convert binaries available in your system path.

# Homebrew install (recommended) brew tap base-compute/tap brew install basert base-convert # Or install from source via cargo # cargo install basert base-convert Enter fullscreen mode Exit fullscreen mode Step 2. Pull a model from HuggingFace and convert to.base format (Terminal — 10 minutes) Input: The name of a HuggingFace model repository containing safetensors weights. Action: Download the model weights using huggingface-cli, then convert them to the.base serialization format at your chosen quantization level using base-convert. Output: A.base model file ready for inference, sized according to the quantization level selected.

# Download model weights from HuggingFace huggingface-cli download Qwen/Qwen3-30B-A3B --local-dir./qwen3-30b # Convert to.base format at Q4_K_M quantization base-convert./qwen3-30b \ --format safetensors \ --quantization q4_k_m \ --output./qwen3-30b-q4km.base Enter fullscreen mode Exit fullscreen mode Step 3. Run inference via the CLI or start the API server (Terminal or Python — 5 minutes) Input: The.base model file from step 2. Action: Run a single inference pass using the basert CLI or start the OpenAI-compatible API server. Output: Generated tokens displayed in the terminal for CLI mode, or a streaming HTTP endpoint for server mode.

# CLI inference with a code generation prompt basert run./qwen3-30b-q4km.base \ --prompt "Explain how Metal shader compilation works on Apple Silicon GPUs" \ --max-tokens 1024 \ --temperature 0.7 # Start OpenAI-compatible API server basert serve./qwen3-30b-q4km.base \ --port 8080 \ --host 127.0.0.1 Enter fullscreen mode Exit fullscreen mode # Python SDK programmatic inference import basert model = basert. Model ( "./qwen3-30b-q4km.base" ) response = model. generate ( "Write a Rust function that multiplies two 4x4 matrices using SIMD intrinsics", max_tokens = 512, temperature = 0.7 ) for token in response: print ( token, end = "", flush = True ) Enter fullscreen mode Exit fullscreen mode Step 4. Point Claude Code or Codex at the local BaseRT endpoint (Configuration — 2 minutes) Input: The BaseRT API server running on localhost:8080 from step 3.

Action: Configure your AI coding agent to use the local BaseRT endpoint as its language model provider by updating the configuration file or setting an environment variable. Output: Your coding agent generates code using BaseRT's accelerated Metal inference.

# Claude Code configuration echo '{ "provider": "openai", "model": "qwen3-30b", "apiBase": "http://localhost:8080/v1" }' > ~/.claude/claude_code_config.json # Codex configuration (environment variable) export CODEX_LLM_ENDPOINT = "http://localhost:8080/v1" # Verify the endpoint responds curl http://localhost:8080/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"default","messages":[{"role":"user","content":"Hello from BaseRT"}],"stream":true}' Enter fullscreen mode Exit fullscreen mode Setup and Tools

Tool Role Cost BaseRT CLI Native Metal inference runtime Free (Apache 2.0) base-convert Model conversion to.base format Free (included with BaseRT) HuggingFace CLI Model weight download from Hub Free Python 3.10+ SDK and orchestration layer Free Rust toolchain Source compilation (optional) Free Apple Silicon Mac Inference hardware Hardware cost ($599-$6,999) Xcode Command Line Tools Metal runtime and compiler dependency Free (from Mac App Store)

BaseRT does not require a GPU with dedicated VRAM. It uses Apple Silicon's unified memory architecture, so the usable context length is determined by total system memory minus what macOS and other applications consume. On a 48 GB M4 Pro, approximately 38 GB is available for model weights and KV cache after the OS overhead.

Metric llama.cpp (Metal) MLX BaseRT Decode Llama 3.2 8B (tok/s) 145 162 198 Decode Qwen3-30B-A3B (tok/s) 72 83 112 Decode Gemma 4 22B (tok/s) 61 72 89 Prefill Qwen3-30B-A3B (tok/s) 785 1,050 1,420 Time-to-first-token Qwen3 1.8s 1.5s 1.2s Model format GGUF MLX checkpoint.base Built-in API server Yes (llama-server) No Yes Language bindings C/C++, Python Python Python, Node, Rust, Swift MoE optimization Partial Partial Native Quantization range Q2-FP16 Q2-FP16 Q2-FP16 GPU utilization (est.) 60-70% 70-80% 85-92% Setup time 15 minutes 20 minutes 15 minutes

Model format lock-in requires conversion step [MEDIUM RISK] BaseRT requires models to be converted to the proprietary.base format before inference. While base-convert supports safetensors, GGUF, and MLX checkpoints as input formats, the conversion step adds 8 to 15 minutes per model and doubles the storage required during the conversion process because the source and destination files coexist. If you maintain a library of 50 or more GGUF models, you must convert each one or maintain both formats side by side, increasing storage overhead.

Mitigation: script the conversion pipeline with a Makefile or shell script that checks for the existence of a.base file and converts automatically if missing. Use temporary directories for conversion to avoid polluting your model storage. For teams, run conversions once and distribute the.base files via a shared cache or object store.

Concurrent request bottleneck under load [MEDIUM RISK] The v0.1.6 KV cache manager uses a single mutex for slot allocation in the pre-allocated memory pool, causing all concurrent requests to queue behind the first request's allocation. On our M4 Pro with 48 GB, four simultaneous requests added 2 to 3 seconds of queue time for each request beyond the first. This makes BaseRT unsuitable for high-concurrency production scenarios without additional infrastructure.

Mitigation: deploy multiple BaseRT server processes behind an nginx or Caddy reverse proxy, each pinned to a dedicated model instance on a separate port. For high-throughput scenarios requiring 10+ concurrent requests, consider MLX which handles concurrent Python inference more gracefully despite slower single-request throughput, or wait for the v0.2.0 lock-free slot allocator.

macOS and chip version dependency [MINOR RISK] BaseRT requires macOS 14.0 (Sonoma) or later for the Metal Performance Shader APIs it uses. Users on macOS 13 Ventura or earlier cannot run BaseRT. Additionally, certain GPU features like hardware-accelerated ray tracing cores on M3 and M4 chips require specific Metal 3.1 features that fall back to software implementations on M1 and M2 chips. Mitigation: verify your macOS version with sw_vers and your chip architecture with sysctl -n machdep.cpu.brand_string before installing. BaseRT gracefully falls back to compatible Metal 3.0 kernels on M1 and M2 hardware with approximately 8-12% performance regression compared to M3 and M4 native execution.

System Prompt Template for AI Coding Agents

You are connected to a local LLM running on BaseRT, a native Metal inference runtime optimized for Apple Silicon. Backend configuration: - API endpoint: {api_base_url}/v1 - Model ID: {model_id} - Max tokens: {max_tokens} - Temperature: {temperature} - Quantization: {quantization} The BaseRT backend runs locally on Apple Silicon hardware and provides: - Full streaming responses via SSE (Server-Sent Events) - OpenAI-compatible chat completions endpoint - Token usage reporting in response metadata - Low-latency inference (up to 1.56x faster than llama.cpp) Behavior guidelines: - Use this backend for all code generation, explanation, and editing tasks - The local inference is faster than cloud APIs, so prefer multi-turn refinement over single exhaustive prompts - Each response includes token counts in the usage metadata for cost tracking - The model supports up to 32,768 tokens of context Request format: POST {api_base_url}/v1/chat/completions Content-Type: application/json { "model": "{model_id}", "messages": [{"role": "user", "content": "..."}], "max_tokens": {max_tokens}, "temperature": {temperature}, "stream": true } Enter fullscreen mode Exit fullscreen mode Start in 10 Minutes

Step 1 (3 minutes). Run brew tap base-compute/tap && brew install basert base-convert in your terminal. Verify the installation with basert --version which should return v0.1.6. Ensure you have huggingface-cli installed with pip install huggingface-cli if needed.

Step 2 (4 minutes). Download a model with huggingface-cli download Qwen/Qwen3-30B-A3B --local-dir./model and convert it with base-convert./model --format safetensors --quantization q4_k_m --output./model.base. The conversion progress bar will show the layer-by-layer progress.

Step 3 (3 minutes). Run basert serve./model.base --port 8080 in one terminal window. In another window, send a test request with curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"default","messages":[{"role":"user","content":"Write a hello world in Rust"}],"stream":true}'. Confirm you receive a streaming SSE response with tokens appearing progressively.

A: No — the recommended installation is via Homebrew, which provides prebuilt binaries for all M-series Macs. The Rust toolchain is only needed if you are compiling from source to test the latest main branch or developing custom language bindings.

A: Yes — base-convert accepts GGUF files as input and converts them to the.base format. The conversion takes 5 to 15 minutes depending on model size and the target quantization level. The GGUF metadata including chat template and tokenizer configuration is preserved during conversion.

A: Yes — Ollama uses llama.cpp under the hood with the Metal backend. BaseRT's direct Metal kernel compilation provides the same 1.35x to 1.56x speedup over Ollama as it does over llama.cpp, since they share the same underlying inference engine.

A: Not yet — BaseRT v0.1.6 supports text-only language models. The Base Compute team has confirmed multimodal support including image and audio inputs is planned for v0.3.0 with an estimated release in Q4 2026.

A: No — BaseRT is exclusively for Apple Silicon Macs. It uses Metal Performance Shaders which are only available on macOS with Apple Silicon GPUs. For Linux or Intel Macs, use llama.cpp with CUDA or Vulkan backends, or MLX on Apple Silicon only.

A: BaseRT supports up to 32,768 tokens of context in v0.1.6, limited by the KV cache manager's pre-allocated memory pool size. Extended context support up to 128K tokens using sliding window attention is on the roadmap for v0.4.0.

INTERNAL-LINK: /workflows/basert-vs-llamacpp-vs-mlx-apple-silicon-benchmarks-2026 — A guided workflow for deploying BaseRT with Claude Code for accelerated code generation on Apple Silicon.

INTERNAL-LINK: /blogs/mesh-llm-distributed-inference-2026 — Distributed LLM inference across Apple Silicon devices using collaborative mesh networking for larger model serving.

INTERNAL-LINK: /blogs/qwen36-unsloth-nvfp4-faster-inference-guide-2026 — Optimizing Qwen3.6 series models with NVFP4 quantization for faster local inference on Apple Silicon and NVIDIA hardware.

INTERNAL-LINK: /blogs/auriko-llm-cost-arbitrage-guide-2026 — Cost optimization strategies for hybrid cloud-local LLM inference deployments that combine BaseRT with cloud GPU endpoints.

INTERNAL-LINK: /blogs/opensquilla-vs-frugon-vs-otari-2026 — Token-efficient router models that optimize when to route requests to local BaseRT inference versus cloud API providers.

INTERNAL-LINK: /blogs/prismml-bonsai-27b-on-device-pipeline-2026 — On-device inference optimization for Apple Silicon using the PrismML Bonsai 27B model with BaseRT runtime.

For more benchmarks, see the BaseRT arXiv paper at https://arxiv.org/abs/2607.00501 {rel="nofollow"} and the official GitHub repository at https://github.com/base-compute/basert {rel="nofollow"}. The benchmark reproduction guide is documented at https://basert.dev/benchmarks {rel="nofollow"} with hardware configuration details and reproduction scripts. The Product Hunt launch page is at https://www.producthunt.com/products/basert {rel="nofollow"}. Refer to the MLX documentation at https://mlx-swift.org {rel="nofollow"} and the llama.cpp Metal backend guide at https://github.com/ggerganov/llama.cpp/tree/master/metal {rel="nofollow"} for comparison baselines.

🌐 Original Source Attribution: This comprehensive engineering breakdown was originally published on Daily AI World by Deepak Bagada.

Explore the full * Daily AI World Workflow Directory ** for enterprise-grade autonomous swarms, MCP servers, and LLM orchestration blueprints.*

Originaltitel: BaseRT vs llama.cpp vs MLX: Best Apple Silicon Inference [2026 Benchmarks]Quelle: dev.to (dev.to). Original öffnen