Each post in this domain is written in case-study format: situation, issue, solution, usage context, and delivery impact.

12 min read

Qwen3.8-27B FP8 on Two Intel Arc Pro B70s: TP2, Graphs, and Context

A structured n=3 record of the official Qwen3.8-27B FP8 route on dual Arc Pro B70s, including TP2 speed, PP2 validation, XPU Graph results, context scaling, RAM findings, and failed concurrency tests.

Intel Arc B70 Local AI Infrastructure
Issue The dual-GPU process exposed a Level Zero host-memory tax, MTP4 full graph capture deadlocked, and concurrent prefill plus speculative decode still crashes the GDN causal-convolution path.
Solution Use TP2 with one Level Zero mask per worker, Docker SYS_PTRACE for oneCCL IPC, MTP4 with XPU Graph disabled, and keep PP2 as a separate load and coherence validation route.
intel-arcarc-pro-b70qwen3.8fp8
3 min read

Qwen3.8-27B on Windows 11 + Arc Pro B70: the 19 August upgrade

If you already have Ian Hudson’s Windows kit running Qwen3.8-27B on the B70, you do not reinstall. Rebuild image 2026.08.19, recreate the container, leave prefix cache on for real chat. Linux on the same overlay is 112.65 vs 81.20 tok/s C1.

Intel Arc B70 Local AI Infrastructure
Issue Restarting the old container does not pick up new patches. Prefix cache was off because that matches a cold decode card, which is the wrong default for real multi-turn sessions.
Solution Image tag 2026.08.19 applies mixed-split v5 plus draft-INT4 S+M1, turns prefix cache on, and ships Upgrade-Qwen38-Docker.ps1 so the container is recreated. Same model files, same 4.25 GiB display-safe KV pin.
local-aiintel-arcarc-pro-b70windows
6 min read

Nemotron 3.5 Lightning + DFlash on the Arc Pro B70: 186.6 t/s C1

Isolated n=5 on one Intel Arc Pro B70: NVIDIA Nemotron-3.5-Lightning with DFlash (BF16 draft from official NVFP4) hits 186.6 t/s C1 median at p2048/g128 (cache off, 150 W). Native MTP is still 0% on this stack. The old 10k 'prefill' was a different n=3 TTFT cell.

Intel Arc B70 Local AI Infrastructure
Issue Eager vLLM spent 32 ms/token in CPU enqueue (~950 launches). Compiled grouped_topk crashed. Official DFlash is NVFP4. The first DFlash screen (214/185 t/s) was n=3 and production respawned mid-load.
Solution XPU graphs (at::zeros grouped-GEMM + native grouped-topk) for the 93 t/s no-spec floor; NVFP4→BF16 DFlash draft; isolated n=5 with production pinned off. Publish the artifacts on Hugging Face under SergiioB.
local-aivllmintel-arcarc-pro-b70
4 min read

Muse Glimmer-30B on the Intel Arc Pro B70: 128K context, DFlash, and a 3.4× build-flag fix

First B70 run of Meta's Muse Glimmer-30B on llama.cpp SYCL: DFlash n_max=2 wins the sweep (p512 26.8, p8192 22.9, p32768 21.1 t/s at 128K ctx / 230 W), the 3.4× 'slow prefill' was a missing GGML_SYCL_F16=ON flag (pp4096 293 → 1,301 t/s), and vLLM stays blocked (FP8 won't fit 32 GB).

Intel Arc B70 Local AI Infrastructure
Issue Prefill looked 3-4× slower than the dense-27B baseline, decode was called 'very slow', and the obvious vLLM quant (FP8-block) looked like the fix.
Solution Rebuild with GGML_SYCL_F16=ON (the missing flag was the whole prefill gap), screen DFlash draft depth 1-8 at 128K ctx / 230 W, confirm the winner with n=5, and push the long-context curve to 32K.
local-aillama.cppsyclintel-arc
6 min read

MTP Spec-Token Curve on Intel Arc Pro B70 — 204.6 t/s Decode at N=4 (and Why 97% Acceptance Isn't the Goal)

The MTP draft head is recurrent, so a single-layer MTP checkpoint emits N speculative tokens per step. The spec-N curve (N=1/2/4) is the real story: N=4 wins throughput at 204.6 t/s single-stream decode (+41% vs the community 145 claim) even though per-token acceptance falls with N (92.6% → 84.2% → 72.7% → 68.9% by draft position). N=1 reaches 97.1% acceptance — but costs 30% throughput. The right objective for a single-layer draft head is throughput, not acceptance %. A paired, alternating power A/B also killed the 'boost prefill to 230W' hypothesis: 150W vs 230W prefill is flat at ±0.2%.

Intel Arc B70 Local AI Infrastructure
Issue Two assumptions blocked progress: (1) 'num_speculative_tokens=2 clamps to 1' — false, the MTP module is recurrent (spec_step_idx % num_mtp_layers), so a single layer emits N draft tokens per step. (2) 'prefill scales with power' — a claim from unpaired runs that turned out to be prefix-cache contamination, not a real power effect.
Solution Ran a clean spec-token sweep (MTP1/2/4) with an honest cold-prefill harness (unique random prefix per call so prefix caching never fires), read acceptance directly from the vllm:spec_decode_* counters, then ran a paired alternating 150W-vs-230W power A/B to settle the power question rigorously.
local-aivllmxpuintel-arc
23 min read

Intel Arc Pro B70: vLLM vs llama.cpp — Corrected MoE + Dense Showdown

A phase-separated vLLM XPU study on Intel Arc Pro B70: cold input, p512 and p8192 decode, the p9445 control, and exact-128K decode across no-spec, MTP1, MTP2, and MTP4.

Intel Arc B70 Local AI Infrastructure
Issue Older public surfaces mixed short-generation peaks, cold input rate, exact-128K completion, resident-session latency, and historical engine grids. Those metrics answer different questions.
Solution The current recipe pins a public vLLM XPU image by digest, applies two patches in order, calibrates exact prompt shapes, and measures no-spec, MTP1, MTP2, and MTP4 in separate C1 input and output phases.
local-aivllmllama.cppsycl
12 min read

Phase 1: The vLLM Question on Intel Arc Pro B70 (MXFP4 Native Test)

Community threads claim vLLM XPU gives 10x the speed of llama.cpp on the B70 (11,000 t/s prefill, 150 t/s decode). I tested the full path — image, FP8, MXFP4, self-built native checkpoints, seven engine patches. The measured truth before MTP speculative decoding: llama.cpp wins single-stream by 6x, and the '150 t/s' claim turns out to be vLLM at 16 concurrent users. (See Phase 2 for the speculative decoding breakthrough).

Intel Arc B70 Local AI Infrastructure
Issue The vLLM path has three gates, and each one turned out to be real: (1) the FP8 checkpoint for this model is 37.5 GB — it does not fit 32 GB of VRAM, so FP8 is off the table for 35B; (2) the MXFP4 (Intel 4-bit) checkpoints that exist publicly are in the compressed-tensors layout, which vLLM's XPU build rejects; (3) the prebuilt Intel images have an MXFP4 MoE path written for gpt-oss — the Qwen loader is broken in seven separate places, from tensor shapes to activation gating to hybrid-model page sizes.
Solution I built the native-format MXFP4 checkpoint myself (fused 256 experts per layer into the w13/w2 layout, verified to 8.8e-5 MSE against BF16 ground truth), moved to the newer intel/vllm:0.17.0-xpu image, and patched the seven engine bugs in-container — 2D per-expert loader support, missing scale-key mapping, the silu-vs-swiglu_oai activation gate (the XPU kernel supports silu; the Python gate doesn't), CUDA-only device contexts in the linear-attention path, a contiguity check, and the hybrid block-size alignment that produced a page size the XPU flash-attention kernel rejects. The model then served and generated correct output.
local-aivllmllama.cppsycl
6 min read

Intel Arc Pro B70: +140% Long-Context Prefill from a llama.cpp Master Build

A single llama.cpp upgrade — oneDNN SDPA extended to quantized KV (#25874) — takes the B70's long-context prefill from ~780 to 1871 t/s at 32K, +26-29% at 4-8K, and fixes a multi-turn corruption bug (#25880). Measured A/B on Qwen3.6-35B MoE and dense 27B, then promoted to production.

Intel Arc B70 Local AI Infrastructure
Issue Long-context prefill was 2.4× slower than it should have been, and b10222 carried a multi-turn corruption bug (SDPA scale use-after-return, #25880). Two upstream PRs that fix exactly this — #25874 (quantized-KV XMX FA) and #25880 — shipped after our pinned release, so the fixes were not in the production build.
Solution Rebuilt llama.cpp SYCL from upstream master (commit 071327508, b10255+) into build-sycl-0804 with the same config (-O3 -DNDEBUG, DNN=ON, F16=ON, GRAPH=ON, oneAPI 2026.0). Ran a same-day A/B against b10222 on both MoE 35B and dense 27B, then promoted the strictly-better build to production via a single config value (profiles.json runtime.binary), backed up and health-verified.
local-aillama.cppsyclintel-arc
12 min read

Intel Arc Pro B70: The Complete Local LLM Recipe

Everything you need to run production LLM inference on Intel Arc Pro B70 with llama.cpp SYCL — the build, runtime flags, all 5 model configs with measured VRAM boundaries, power tiers, KV cache KL-divergence analysis, and the b9853→b10222→master 0804 improvement data. 72.6 t/s MoE decode, 2128 t/s prefill, 512K context allocation (VRAM fit). Plus the dense 27B vLLM XPU track: 69.3 t/s MTP4 decode via GPTQ-INT4.

Local AI Infrastructure Intel Arc B70
Issue Running LLMs on Intel Arc requires SYCL-specific knowledge that doesn't exist in one place: which cmake flags, which env vars, which KV cache config, which power cap, which context length per model. Getting any of these wrong means either crashes, bad quality, or leaving performance on the table.
Solution Fact-checked every claim against llama.cpp PRs and external benchmarks, ran a full boundary sweep measuring VRAM at every quant/context combo, A/B tested two SYCL builds, and consolidated everything into one recipe with the exact commands and measured numbers.
local-aillama.cppsyclintel-arc
10 min read

Running Qwen3.6 27B on Intel Arc Pro B70: The Full Recipe

Every config that works for running Qwen3.6 27B dense on Intel Arc Pro B70 with llama.cpp SYCL — Q4/Q5/Q6 quant comparison, MTP-4 speculative decoding (+35-50%), q8_0 K + q4_1 V KV cache with measured KL-divergence, and the exact VRAM context ceiling for each quant. Validated on build b10222 with llama-bench.

Local AI Infrastructure Intel Arc B70
Issue The 27B dense model is VRAM-hungry (16-21 GB weights + 7-14 GB KV at high context), making the quant/context/KV trade-off non-obvious. The previous fleet used q5_0-q4_1 KV cache, but KL-divergence analysis showed q8_0 K + q4_1 V is near-lossless. The context ceiling per quant was unknown.
Solution Tested all three quants (Q4_K_M, Q5_K_M, Q6_K) at every context length (128K-512K) with q8_0 K + q4_1 V KV cache. Measured VRAM boundaries, decode speed, and prefill with llama-bench. MTP-4 speculative decoding adds +35-50% decode. The KV insight: dense models use 3.8x more KV cache than MoE — so a 16 GB dense model can't pass 256K while a 25 GB MoE fits a 512K context allocation.
local-aillama.cppsyclintel-arc
5 min read

118B MoE on a single 32GB GPU: Laguna S 2.1 partial expert offload

Running Poolside's 118B Laguna S 2.1 (256 experts, 8B active) on one Intel Arc Pro B70 32GB. 3.2x speedup from partial expert offload instead of dumping all experts to CPU. DFlash spec decode tested and dismissed.

Local AI Infrastructure Intel Arc B70
Issue Putting all experts on CPU gave 4.8 t/s and left 24 GB of VRAM idle. DFlash speculative decoding tested at 5.0 t/s, within noise of baseline.
Solution Keep experts for layers 0-39 on GPU, only send layers 40-47 to CPU via -ot regex. 15.3 t/s. One flag change, no dependencies.
intel-arcb70llama.cppsycl
6 min read

Arc Pro B70 clean suite: Gemma 4 31B MTP, MoE prefill, and Grok tools

Real single-stream timings from a 2026-07-16 B70 suite: long-prompt prefill near 1.7k t/s on MoE, dense Gemma 31B +51% decode with MTP-4, and Grok Build CLI with tools enabled.

Local AI Infrastructure Intel Arc B70
Issue Short-prompt prefill looked terrible, dense Gemma needed a path that was not stuck at ~16 t/s, and agent CLI numbers were being confused with engine throughput.
Solution Re-measure with engine timings at long prompt sizes, replace Gemma 26B with Gemma 4 31B + Unsloth MTP draft + vision mmproj, keep MoE profiles for speed, and run Grok Build with tools on.
intel-arcb70llama.cppsycl
6 min read

Grok Build CLI with local models on llama-server (Arc Pro B70)

Practical setup for xAI Grok Build against a local OpenAI-compatible llama.cpp server: install, config.toml models, XAI_API_KEY, tools-on usage, profile switching, and real single-stream timings.

Local AI Automation Intel Arc B70
Issue Grok Build defaults to cloud models; local routing needs correct base_url, model IDs, auth env, and an honest split between engine tok/s and agent wall time.
Solution Install Grok Build, point custom models at http://127.0.0.1:8765/v1 with model id active (or matching served id), set XAI_API_KEY to the server API key, keep tools enabled for real agent work, and switch llama-server profiles underneath.
grok-buildllama.cppintel-arcb70
3 min read

The Math Behind KV Cache Quantization: Why I Stopped Using Q5_0 for Keys

An analysis of KL divergence when quantizing the Key/Value cache in llama.cpp, and why the K-cache requires significantly higher precision than the V-cache.

Local AI Intel Arc B70
Issue I was using an aggressive `Q5_0` quantization for the Key (K) cache and `Q4_1` for the Value (V) cache. Over long contexts, the model's reasoning capabilities began to degrade, showing signs of hallucination and logic loops.
Solution Researched the Kullback-Leibler (KL) divergence of various KV cache quantization formats in llama.cpp. Discovered that the Key cache is highly sensitive to precision loss due to dot-product attention mechanics. Shifted to a hybrid `K=Q8_0 / V=Q4_1` profile.
llama-cpphardware-tuningmachine-learningai
3 min read

The Reality of Edge AI Research: Why TurboQuant on Intel Arc SYCL Failed (For Now)

A post-mortem on attempting to compile and run experimental TurboQuant (WHT rotation) KV Cache compression on Intel Arc B70 GPUs using a custom SYCL fork.

Local AI Intel Arc B70
Issue We attempted to compile and run TurboQuant (TQ) — a promising new WHT-based quantization method — on Intel Arc hardware using an experimental SYCL fork, but hit hard driver and kernel limitations.
Solution Documented the failure modes (specifically `SET_ROWS` view tensor crashes) and fell back to stable asymmetric block quantization (`K=Q8_0 / V=Q4_1`) for production use until upstream support matures.
syclllama-cppintel-archardware-tuning
8 min read

Breaking the 67 tok/s Barrier: Optimizing Intel Arc Pro B70 for High-Concurrency MoE Inference

How to tune llama.cpp on Intel Arc Pro B70 SYCL to double aggregate throughput under massive parallel loads with Mixture of Experts (MoE) models — and the 2026-08 head-to-head that settles the vLLM debate: continuous batching makes vLLM win at 16+ concurrent users (153 t/s) while llama.cpp wins every single-stream test (6.3x).

Local AI Intel Arc B70
Issue Baseline sequential generation hard-capped at ~67 tokens/second due to memory bandwidth starvation. Furthermore, naive scaling with large contexts (131K) and unoptimized batching caused immediate VRAM exhaustion (OOM) and server timeouts under load. Later (2026-08): the community insisted vLLM was strictly better — a claim that needed a head-to-head on the same card.
Solution Diagnosed hardware bottlenecks and optimized the llama.cpp SYCL stack. Disabled heavy DNN operations (`GGML_SYCL_DISABLE_DNN=1`), quantized the KV Cache (`Q5_0`/`Q4_1`), and saturated the GPU using deep micro-batching (`-b 8192 -ub 4096`) under a 32-parallel request load. In 2026-08, stood up the full vLLM XPU path (self-built native MXFP4 checkpoint + 7 engine patches) and benchmarked both engines at 1/4/8/16 concurrent users on the same hardware.
syclllama-cppintel-archardware-tuning
9 min read

KV Cache Quantization and Context Ceilings on Intel Arc Pro B70 32GB

Switching from symmetric q8_0 to asymmetric q5_0-q4_1 KV cache quantization freed 6.2 GB of VRAM per 128K context, pushed context ceilings to 256K on a 35B model, and was 3.3% faster in engine decode rate. Hardware-verified on Intel Arc Pro B70 32GB.

Local AI Infrastructure Intel Arc B70
Issue Standard q8_0 KV cache quantization used a 0.531 VRAM multiplier, capping a 35B Q5 model at 128K context on 32GB. The question was whether asymmetric K/V quantization (q5_0 for K, q4_1 for V) could unlock higher context lengths without hitting the quality cliff or degrading throughput.
Solution Ran a 5-test hardware-verified benchmark suite on llama.cpp b9851 comparing q8_0-q8_0 against q5_0-q4_1 across control baseline, target comparison, flagship configs, and dense model validation. Calculated per-model VRAM budgets using measured multipliers from the Anbeeld 2026 KV cache benchmark methodology.
local-aillama.cppkv-cachequantization
7 min read

MTP-4 Speculative Decoding Power Scaling and Benchmark Methodology Fix on Intel Arc B70

Corrected power scaling data for Qwen 27B MTP-4 speculative decoding after discovering single-prompt caching was inflating baselines by 4-5%. True MTP-4 gain at 180W is +35%, not +41%. Includes vision benchmark results after ffmpeg dependency fix.

Local AI Infrastructure Intel Arc B70
Issue The initial power sweep data was inflated. Single-prompt prefix caching was active during testing, which inflated the baseline measurements by approximately 4-5%. This made the speculative decoding gains appear larger than they actually were.
Solution Rewrote the benchmark script to enforce warmup discards, isolate engine decode rate from wall-clock time, and maintain strict thermal cooldowns between test rounds. Re-ran the entire power sweep with the corrected methodology.
local-aillama.cppmtpspeculative-decoding
10 min read

Intel Arc Pro B70 32GB: Running Qwen3.6-35B on llama.cpp SYCL

A reproducible case study for running Qwen3.6-35B-A3B on Intel Arc Pro B70 with llama.cpp SYCL on Ubuntu 26.04, including the exact build, runtime flags, benchmark data, and the persistent SYCL cache issue that caused model-load crashes.

Local AI Infrastructure Intel Arc B70
Issue The obvious checks all passed: the GPU was visible through Level Zero, ReBAR exposed the full 32GB BAR, the model fit in VRAM, and Vulkan could load it. SYCL still failed during model load, first with xe bcs engine resets and then with SIGSEGV crashes even when GPU offload was disabled.
Solution I rebuilt llama.cpp from current master with Level Zero development headers installed, disabled Intel SYCL persistent kernel cache, pinned the Level Zero device explicitly, and reduced the environment to the smallest set of variables required for stable SYCL inference.
local-aillama.cppsyclintel-arc
5 min read

Optimizing DeepSeek KV Cache for Serverless AI Pipelines

How splitting a monolithic system prompt into static and per-session layers improved estimated KV cache hit rates from ~42% to ~76% and reduced input costs by an estimated 57% on a Firebase Functions app running DeepSeek V4 Flash.

AI Kotlin
LLMDeepSeekFirebaseOptimization
11 min read

RX 7800 XT 16GB: Running 35B MoE at 128K Context with llama.cpp + ROCm

Full benchmark data on running MoE and dense LLMs on AMD consumer hardware — quantization comparison, power cap analysis, KV cache tuning, and context limits on 16GB VRAM.

Local AI Infrastructure
Issue Consumer GPUs have hard VRAM ceilings. Running 23-35B parameter models on 16GB requires aggressive quantization, KV cache compression, and precise build flags. The noise-to-signal ratio in online benchmarking is high — most people test on NVIDIA, not AMD RDNA3, and few test MoE architectures with context windows above 32K.
Solution Systematically benchmarked 8+ models across 5 quantization levels, swept GPU power caps from 30W to 190W, tested 3 KV cache configurations, and pushed context limits to 256K. Documented the exact llama.cpp build flags and runtime parameters that make 128K inference on 16GB VRAM stable and fast.
local-aillama.cpprocmamd
10 min read

14 Models Benchmarked on RK3588: The Definitive CPU vs NPU Ranking

Benchmarked every viable local LLM (350M to 26B, CPU and NPU) through a live Discord agent pipeline on RK3588. Found NPU beats CPU at same quality, code is solved at any size, and 4B+ models are slower AND worse than 2B on this board.

Local AI
Issue Previous benchmarks measured raw llama.cpp throughput but not real quality through the agent pipeline. Models that looked fast synthetically failed at reasoning, refused tool calls, or got intercepted by workspace routing before reaching the model.
Solution Built a 14-test, 6-dimension benchmark harness that tests every model through the live Discord pipeline with quality validation: reasoning, factual accuracy, code generation, instruction following, tool calling, and math. Tested 14 models (9 CPU GGUF + 3 NPU RKLLM + 2 large MoE) with BENCHMARK_MODE to isolate pure model performance.
rk3588radxarock-5b-plusllama.cpp
6 min read

llamacpp-workbench: Remote llama.cpp Control and REAP Model Serving on RK3588

Publishing a practical local-AI control plane for llama.cpp: remote model loading, runtime tuning, streaming chat, and real REAP model serving on a Radxa ROCK 5B+.

Local AI
Issue Most local model UIs either abstract away the runtime details that actually matter on constrained hardware or assume desktop-class GPUs. On RK3588, that makes it harder to tune context, KV cache quantization, reasoning behavior, and model selection credibly.
Solution Built and published `llamacpp-workbench`, a remote llama.cpp workbench with explicit runtime controls, model presets, markdown chat rendering, streaming responses, and benchmark-backed defaults for REAP and dense GGUF models.
llama.cpprk3588radxarock-5b-plus
15 min read

Qwen3.5 on RK3588 with llama.cpp: Real Benchmarks from a Radxa ROCK 5B+

An advanced benchmark report for running Qwen3.5 locally on RK3588 with source-built llama.cpp: prefill speed, decode speed, stable context, tool-calling behavior, and the practical model choices that actually work on a Radxa ROCK 5B+.

Local AI
Issue The usual local-AI advice overemphasizes parameter count and underexplains bandwidth, context budget, KV cache policy, and interactive latency. On RK3588, that leads to bad defaults: models that technically load but feel broken in real chat and tool-calling workloads.
Solution I ran a corrected Qwen3.5 sweep on RK3588 using source-built llama.cpp, quantized KV cache, and task-pass validation. Then I compared prefill, decode, stable context, average latency, and tool-calling behavior to determine the right model for each workload.
rk3588radxarock-5b-plusllama.cpp
15 min read

GPU VRAM, CPU Offload, and llama.cpp: The Real Performance Cliff

An advanced guide to local GPU inference with llama.cpp: why bandwidth matters more than model fit, how hybrid GPU+CPU offload behaves on cards like the RTX 3060 and 5070, what quantization really means mathematically, and how to run it on Linux, Windows, and WSL.

Local AI
Issue Operators lacked a practical framework for choosing quantization, sizing VRAM budgets, deciding when CPU offload is acceptable, and understanding the difference between weight quantization and KV cache quantization. Windows-specific setup questions also created confusion around native builds versus WSL.
Solution Documented the bandwidth-first model, explained hybrid offload behavior for 12 GB and mid-range modern GPUs, compared quantization choices such as Q4_K_M and q4_0 KV cache, and provided concrete llama.cpp launch patterns for Linux, Windows, and WSL.
local-aillama.cppcudavram
3 min read

Implementing Google's TurboQuant: Hybrid KV Cache for Edge LLM Deployment

How I implemented hybrid per-layer KV cache quantization on RK3588 using insights from Google's TurboQuant research, achieving 17% better compression with zero quality loss.

Local AI
Issue Every time you message an AI chatbot, the model stores your conversation in temporary memory called the KV cache. On large models, this cache alone can consume 40GB—more than the model itself. On a constrained edge device, this is the difference between working and broken.
Solution Implemented hybrid per-layer KV cache quantization inspired by Google's TurboQuant (ICLR 2026). By using 8-bit quantization for early transformer layers (where attention quality matters most) and 4-bit quantization for later layers, we achieved 17% better compression without quality loss.
local-aiedge-aiturboquantkv-cache
9 min read

RK3588 NPU Router Architecture: What Actually Runs, What Wins, and Why

A benchmark-backed deep dive into the real RK3588 inference stack: llama.cpp CPU winners, NPU roles, KV cache choices, quantization tradeoffs, and how to think about 27B with GPU+CPU offload.

Local AI
Issue Several paths technically loaded but were not practically usable. Large models timed out or delivered poor latency, CPU tuning mattered more than expected, and the product narrative needed to shift from 'many runtimes' to a benchmark-backed llama.cpp-first architecture.
Solution Benchmarked llama.cpp and RKLLM on RK3588, identified the winning CPU configs for Qwen 3.5 4B and 9B, clarified where the NPU helps, documented KV cache and quantization choices, and reframed the architecture as llama.cpp-first with NPU used selectively.
rk3588npullama.cpprkllm
8 min read

Azure Provisioned Throughput: When Fixed Costs Beat Pay-Per-Token

Why we moved from Pay-As-You-Go to Provisioned Throughput Units (PTU) for our Azure OpenAI workloads—and how to know if it makes sense for you.

AI
Issue As your application scales, Microsoft's default rate limits can throttle your service, leading to slow responses and inconsistent user experiences. You're essentially stuck in traffic during peak hours.
Solution Think of it like a toll road. Standard use is like paying per mile, but you're stuck in traffic. Azure's Provisioned Throughput (PTU) is like renting your own dedicated express lane. We built a framework to calculate the exact financial break-even point between the two models.
azurellmcost-optimizationinfrastructure
14 min read

Training Custom AI Models for Insurance Document Processing

How to build, train, and deploy custom document intelligence models for extracting structured data from multilingual insurance policies using Azure AI Foundry.

AI
Issue Off-the-shelf OCR solutions couldn't handle the complexity of insurance documents. Different insurers used different layouts, multilingual support was limited, and extracted data needed to conform to a strict canonical schema for downstream systems.
Solution Implemented a custom document intelligence solution using Azure AI Document Intelligence, training models on labeled examples to extract and normalize fields across multiple insurers and languages.
azure-aidocument-intelligencemachine-learningautomation
6 min read

Edge LLM Optimization: Memory Bandwidth and Context Management

Lessons learned running LLMs on constrained hardware—why bandwidth matters more than capacity, how KV cache quantization helps, and context folding for long conversations.

Local AI
Issue Edge devices have hard constraints: limited RAM, no GPU VRAM, and strict latency requirements for interactive applications. The naive approach of 'make the model fit' failed repeatedly—either latency was too high or context windows would overflow during long conversations.
Solution Developed a three-pronged approach: (1) enforce bandwidth-first model selection, (2) use KV cache quantization to reduce memory footprint, and (3) implement hierarchical context folding for long conversations.
local-aiedge-aillama.cppkv-cache
9 min read

IntelliAuto: AI-Powered Automotive Assistant with Secure Monetization

Building an intelligent car maintenance companion with LLM-powered diagnostics, dynamic affiliate commerce, and defense-in-depth AI security.

Kotlin AI
Issue Existing automotive apps are passive logs. Adding AI creates risks: prompt injection through user input, data privacy concerns, API cost runaway, and potential for incorrect safety-critical advice.
Solution Designed IntelliAuto with AutoMind AI assistant featuring backend proxy architecture, multi-layer prompt injection prevention, dynamic affiliate link generation, and strict safety disclaimers for automotive advice.
androidaikotlinmobile
3 min read

RK3588 LLM Performance: NPU vs CPU in a Discord Agent

Benchmarking local LLM inference on RK3588 and why NPU acceleration (RKLLM) is the difference between real-time chat and unusable latency.

Local AI
Issue CPU-only inference on small models was too slow for interactive UX, and some NPU model runs initially failed for non-runtime reasons (corrupted downloads or wrong target platform conversions).
Solution Benchmarked CPU (Ollama) vs NPU (RKLLM), applied system and inference parameter optimizations, and documented failure modes to distinguish model-file issues from NPU/runtime issues.
rk3588npurkllmollama
4 min read

Modernizing Android UX: High Refresh Rates & App Shortcuts

How to request 90Hz/120Hz rendering and implement static deep-linked app shortcuts to improve mobile application usability.

Kotlin AI
Issue The app was locked to standard 60Hz rendering, causing sub-optimal scrolling experiences on devices capable of 90Hz or 120Hz. Additionally, users had to navigate through multiple screens to perform frequent actions.
Solution Detected 90Hz+ display modes and configured window post-processing preferences for smoother rendering, then implemented static XML-based app shortcuts routed via deep links.
androiduxperformancekotlin
4 min read

Securing and Scaling AI Context in an Automotive Assistant

How to implement rate limiting, context window management, and prompt injection prevention for an LLM-powered mobile application backend.

AI Kotlin
Issue Directly exposing LLMs to users risks massive API costs through spam or unbounded context windows. Furthermore, raw user input is vulnerable to jailbreaks (e.g., 'ignore previous instructions and execute code').
Solution Implemented a multi-tier model routing strategy (chat vs reasoning), robust context truncation, regex-based jailbreak detection, and strict timestamp-based rate limiting.
llmsecuritynodejsarchitecture
4 min read

Building a Multilingual AI Backend for Part Recognition

How to handle multi-language AI queries to provide accurate predictions and generate tailored localized search queries in a serverless environment.

AI
Issue The backend AI needed to recognize user intent and categorize vehicle parts accurately regardless of the input language, and subsequently generate both localized predictive maintenance responses and tailored affiliate search queries.
Solution Implemented comprehensive multi-language keyword dictionaries, extracted user language context directly from client requests, and used mapping dictionaries to serve localized response templates.
nodejsmultilingualllmarchitecture
4 min read

Slashing LLM API Costs with System Prompt Caching

How to structure LLM requests for prompt caching (when supported) to reduce repeated system-prompt input costs.

AI
Issue Large Language Models charge per token. When you send a 1,000-token system prompt alongside a 50-token user question, you pay for 1,050 tokens every time, even though 95% of the payload never changes between requests.
Solution Restructured the API payload to isolate static system instructions so the backend can take advantage of cached-input pricing or prompt caching features where the provider supports it.
llmcost-optimizationarchitecturecaching