r/LLMDevs • • 7m ago

Tools [Open Source] Streamlit probe to measure cross-session prefix-cache TTFT separation and KV eviction thresholds (tested on vLLM / Colab T4, works with any OpenAI-compatible API)

1 Upvotes

While researching how prefix caching behaves across separate requests, I built a small open-source Streamlit instrument to measure whether prior processing of a prompt prefix leaves a reliable TTFT (Time-To-First-Token) signal—and at what point third-party context traffic evicts it.

GitHub (MIT License): https://github.com/yurureru/prefix-cache-observability
Open Dataset (420 trials, CSV + manifests): https://doi.org/10.5281/zenodo.24867406
Preprint (engineering & philosophical analysis): https://doi.org/10.5281/zenodo.24876450

How the tool works

  • **Sham-preheated paired trials (**Lab tab): Both warm and cold trials run an identical preheating step (the target prefix vs. an unrelated sham prefix of equal length), followed by a randomized measurement pass so temporal drift doesn't skew the comparison.
  • Metrics & ground truth: Works out of the box with any OpenAI-compatible endpoint (vLLM, SGLang, llama.cpp, Ollama, LM Studio), and optionally scrapes vLLM's Prometheus /metrics endpoint to verify prefix_cache_hits / queries deltas.
  • Latency-only Blind Test tab: Randomly chooses whether to preheat the prefix, shows only the measured TTFT in ms, and computes an exact one-sided binomial p-value for your guesses.

Summary of results (vLLM on Google Colab T4, Qwen/Qwen3-0.6B)

  • Prefix caching enabled (default): 72.08 ms warm median vs. 435.81 ms cold median (6.05x ratio, AUC = 1.000, 311 ms empty separation corridor).
  • Prefix caching disabled (control): 439.19 ms vs. 428.36 ms (AUC = 0.372—complete overlap).
  • Eviction under filler load: Under restricted KV memory (13,824 tokens, 64-token blocks), a 1,344-token prefix stayed 100% intact up to 0.90x capacity, partially survived at 1.00x (4 of 21 blocks), and was completely evicted (0/30 runs) once filler traffic crossed 1.10x.

Note: Strictly a measurement/observability tool for local setups and authorized testing. Feedback on SGLang, llama.cpp, or Ollama behavior is very welcome!


r/LLMDevs • • 1h ago

Discussion Vaccine shot for AI psychosis

0 Upvotes

Opus 5.5, with a 5x anthropic subsidy, is incapable of generating even $300 per month in profit on a $200 subscription autonomously. It can't even make enough to cover its unsubsidised API token cost. We know this because if it did, 1bn+ people would be buying Claude max subscriptions for them and every family member and retiring. Yet millions of mid humans do this every day.


r/LLMDevs • • 5h ago

Discussion What catches a small local model's valid but wrong tool call?

3 Upvotes

I'm asking for personal learning, with no personal data collection or monetization of replies; an AI assistant helped word this. What catches the wrong file or recipient before execution when the tool name and JSON are valid, and when do you route to a bigger model?


r/LLMDevs • • 5h ago

Tools I built a local LLM training lab to help people learn how to train models on their own hardware

Thumbnail
gallery
6 Upvotes

Hi everyone,

Like many others, I got into model training after going through Karpathy's nanochat and Sebastian Raschka's LLMs from Scratch book. Both were great, and after training a few tiny models on my own computer I ended up putting together the kind of lab I wish I had when I started.

Each lesson has interactive visuals in the browser paired with actual PyTorch scripts and a local dashboard, so you can run the code on your own GPU (or laptop) and watch what happens to the loss and outputs right away. I believe we learn way better by breaking things and tweaking configs than just reading.

Repo is here if anyone wants to check it out: https://github.com/petrenk0n/stepzero

Right now there are 4 lessons covering the training loop, model sizing, stability, and attention, plus a small local runner so you don't even have to leave the UI to kick off an ablation. Still adding more lessons as I go. Also threw in a guide for your agent, if you prefer to learn with ai.

Just sharing in case it's useful to anyone else digging into this stuff.


r/LLMDevs • • 5h ago

Tools Showing Claude Code and Codex in one live list: hooks for the events, session files for the rest

Thumbnail
gallery
1 Upvotes

I'm building Openbar, a free open source app that keeps coding agent sessions in the Mac notch (an island on Windows and Linux). Getting Claude Code and Codex into one list taught me that hooks alone aren't enough.

Hooks tell you the moment something happens: a prompt, a tool call, a permission request. Claude Code's PermissionRequest hook waits for an answer, so you can Allow or Deny from the notch while the terminal dialog stays open, and whichever answers first wins. But tasks, token counts and what happened before the app started only live in the session files, so Openbar reads those too and merges both into one state per session.

I'd like feedback on what to add next.

https://github.com/wrr-studio/OpenBar


r/LLMDevs • • 8h ago

Discussion Google budget alerts run on spend data that can lag up to 24h. An overnight Gemini job hit C$75,951 before anything fired. How to guard unattended LLM jobs

3 Upvotes

Google's budget alerts run on actual spend, and the Cloud Billing docs say calculating actual spend "typically takes up to 24 hours." That lag is what sank a developer this week. He posted in r/googlecloud that an overnight Gemini 2.5 Flash job on Vertex AI spent C$75,951 before anything stopped it, and what finally stopped it was his card declining an auto charge.

What he says arrived, and when:

  1. Early signal anomaly alert, which Google's docs promise "with an expected latency of 20 to 40 minutes": came 9h42m after spend started, and couldn't name the product.
  2. 50, 80 and 100 percent budget emails on a C$286 budget: never came.
  3. 120 percent and forecasted emails: over two hours after he'd already killed the job.

That's one person's account, and I couldn't find a public reply from Google. A Pub/Sub kill switch wired to a normal budget would have fired on the same late numbers.

How i'd guard an unattended LLM job now:

  1. If it's your own loop of API calls, meter it yourself. Gemini responses include usage metadata, so multiply tokens by list price, keep a running total, and stop at a hard number. Nothing is faster than that.
  2. Set a provider spend cap as the backstop. Google's caps went GA on Oct 30, run on estimated cost and trigger within minutes for AI services. Read the limits first: not instant, overage still billed, one project and one service per cap, credits ignored, Provisioned Throughput never halted. Eligible: Gemini API, Vertex AI, Cloud Run, Cloud Run functions.
  3. Treat budget alerts as receipts.

If you submit a batch job and walk away, layer 1 doesn't exist and the cap is the only thing that can stop it.

Thread: https://www.reddit.com/r/googlecloud/comments/1yazk1p/ Spend cap docs: https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps Budget API docs: https://docs.cloud.google.com/billing/docs/how-to/budget-api-overview


r/LLMDevs • • 9h ago

Discussion Can you apply caveman in an LLM's internal reasoning?

0 Upvotes

Hey, someone propably thought of this already or something like that?

When i use deepseek v4.1 free on opencode and check the internal reasoning, it is very verbose and repeating itself

So im thinking what if we apply simple caveman type of talking reasoning inside

Or even even better use another langauae like chinese for the internal reasoning cuz it is a more efficient language, but translate back to english when done?


r/LLMDevs • • 9h ago

Help Wanted Is there a LeetCode for agent engineering? Where do you prove you can build production AI systems?

5 Upvotes

I'm a backend engineer in payments (Go, Kafka, AWS). I already build agentic tooling at work and want to move into agent/AI engineering roles.

LeetCode and HackerRank prove algorithm skills. I'm looking for the equivalent for agents: somewhere that shows I can build systems that hold up in production (evals, reliability, cost control, tool/MCP design, security), not just a demo that works once. I'm a backend engineer in payments (Go, Kafka, AWS). I already build agentic tooling at work and want to move into agent/AI engineering roles.

LeetCode and HackerRank prove algorithm skills. I'm looking for the equivalent for agents: somewhere that shows I can build systems that hold up in production (evals, reliability, cost control, tool/MCP design, security), not just a demo that works once.


r/LLMDevs • • 9h ago

Help Wanted I launched a structured output generation API, but nobody seems to care. What am I missing?

Thumbnail
gallery
0 Upvotes

I recently launched an API platform for structured output generation across different LLMs.

The idea came from a problem I faced while building my own AI harness. I thought other developers might find it useful too, so I turned it into a standalone API.

Currently, it supports:

  • Single-schema structured output generation.
  • Selecting one relevant schema from multiple schemas.
  • Selecting multiple relevant schemas and generating an array of structured outputs.
  • Text and image inputs.
  • Multiple LLM providers through a common API.
  • Automatic schema validation and retries.

I've attached a few examples showing how it works.

It's been over a week since launch. I've reached out to developers, received some feedback, but nobody has actually tried it yet.

I'm currently exploring a few additional capabilities:

  • Direct document-to-JSON generation.
  • LLM-based semantic validation to check whether the output is actually correct, not just schema-valid.
  • Custom validation endpoints that allow developers to validate generated outputs against their own business logic, with automatic retries on failure.

But before spending more time building, I want to understand what developers actually need.

For those working with LLMs, what is this platform missing that would make it worth using? Are there any pain points with structured output generation that existing solutions don't address well?

Or is this simply a problem that's already sufficiently solved?

I'd genuinely appreciate some critical feedback, even if it's negative.


r/LLMDevs • • 10h ago

Resource Qwen4-35B-A3B-Uncensored GGUF (Apache 2.0)

1 Upvotes

Disclosure: I'm from Morse (trymorse.ai).

Weights & License

  • Repo: https://huggingface.co/Morse-AI/Qwen4-35B-A3B-Uncensored-GGUF
  • Model: Qwen4-35B-A3B-Uncensored (from the Dec 3 Qwen4-35B-A3B drop)
  • License: Apache 2.0

Safety & over-refusal (Stock → Uncensored)

  • Harness: Q8_0, llama.cpp b12973, greedy, 1,764 prompts (raw JSON in repo)
  • Harmful refusals (HarmBench, HarmBench-Think, StrongREJECT): 95.3% → 8.2%
  • Thinking mode (HarmBench-Think): 98.0% → 8.7%
  • Over-refusal (XSTest): 16.4% → 0.4%

Capability retention (Stock → Uncensored)

  • 5-suite mean: 82.42% → 80.45%
  • MMLU: 75.80 → 74.40
  • MMLU-Pro (CoT): 76.67 → 71.33
  • GSM8K (CoT): 97.33 → 96.67
  • HumanEval: 93.29 → 90.85
  • MATH-500: 69.00 → 69.00

Method

  • Single refusal direction across thinking and non-thinking modes; no fine-tuning
  • Zero prompt overlap with any eval benchmark
  • Screened for low KL on neutral prose, code, math, and multilingual text
  • Reasoning length intact: 1.003× stock on HumanEval
  • Tokenizer and chat template unchanged

Quant & Memory

  • Single protected Q8_0 file (59.4 GB on disk)
  • Sensitive tensors kept in BF16: hc_*, ssm_beta, ssm_alpha, ple_conv1d
  • --lazy-mode auto loads n-gram embedding tables on demand → ~37.6 GB resident (fits 48 GB GPU or 64 GB Mac)
  • Needs recent llama.cpp with Qwen4 support

Run

llama-server -m Qwen4-35B-A3B-Uncensored-Q8_0.gguf -ngl 99 --lazy-mode auto --flash-attn on --jinja --cache-type-k q8_0 --cache-type-v q8_0 -c 32768

r/LLMDevs • • 10h ago

Discussion I built a docs bot that refuses to guess. My hidden test set exposed a failure I couldn't fully fix.

5 Upvotes

RAG over 8 FastAPI tutorial pages (ChromaDB, MiniLM, Gemini flash-lite, Streamlit). It answers with a cited source or replies `NOT_IN_DOCS`.

Eval: 25 cases, 15 dev / 10 hidden. Dev went 10/14 → 14/14 after tuning; hidden (run once) scored 9/10.

Distance alone couldn't separate answerable from out-of-docs questions (1.36 vs 1.12), and the one hidden failure was a false refusal from wrong top-ranked chunks. Untried: hybrid search, re-ranking.

Caveat: questions were AI-drafted and I verified only 9 of 25 answers.

Repo: https://github.com/ztsprofessionalaiid7-alt/rag-bot

Would you try hybrid search or re-ranking first?


r/LLMDevs • • 11h ago

News Qwen4-35B-A3B on 48GB M4 Pro in 8.42 GB RSS — 119.99 tok/s

Thumbnail
reddit.com
1 Upvotes

r/LLMDevs • • 11h ago

Discussion What if we replaced some serial Transformer layers with parallel computation along the depth axis?

Post image
2 Upvotes

I've been experimenting with small language model architectures and had an idea: why not replace some serial Transformer layers with parallel computation along the depth axis?

I call it ParDepth (Parallel Depth).

Instead of using only the final hidden state, ParDepth collects intermediate layer states, performs bidirectional attention along the depth axis, and then applies linear fusion followed by a single SwiGLU FFN.

Some interesting engineering properties:

  • Reduced persistent KV cache when replacing token-attention layers.
  • Exact skipping of ParDepth computation at unnecessary positions during prefill.
  • Parallel depth projections using batched GEMM.
  • No need to sacrifice full multi-head attention for KV cache reduction.

I've implemented it and am currently using it in my own model's pretraining.

I have limited compute and honestly don't know how well it scales. If you have the GPUs and find this interesting, give it a try. Whether it works or not, let me know!

GitHub: https://github.com/EliteytGe/ParDepth


r/LLMDevs • • 11h ago

Discussion My Understanding of Harness and Context

0 Upvotes

This talks about harness, context, evals and RL Environments

Agent Harness: This involves engineering systems around model intelligence. There are 3 sides of same problem: what wraps model, what goes in the window, how we know it works:

  • Harness: what wraps the model
  • Context: what does in the window
  • Evals: training data for the harness

If you are not the model you are the harness (Agent = Model + Harness). Let’s talk about some Harness primitives, each one patches a specific model deficiency:

  1. File System: Non Durable State
  2. Bash + Code: No general purpose action
  3. Sandbox: unsafe execution at scale
  4. Sub agents: context contamination
  5. Middleware: no deterministic interventions

Why is a Harness so Important ?

Same Model with different harness, why don’t they get the same score. We pay companies for compute (in the forms of tokens to rent & run their proprietary LLMs) .

Now the coding harnesses like Codex & Claude Code that they provide abstracts a lot of what it does under the hood and how it routes calls to the LLM models which limits our control over the models.

Like a harness used in rock climbing to anchor to a stable point so that we don’t drift off, similarly an agent harness is everything around model which grounds it to a stable environment.

It Includes: Tool Registry, Model, Context Management, Guardrails, Agent loop

Ex: BrowserUse Harness for Hacker News: Go to Hacker news using the playwright browser and give the agent harness tools to interact with browser session and system prompt to carry out task

Model Harness Fit:

Harness is part of the model’s effective parameters. Same operations, different vocabs, backed in by post training

3 Consequences:

  1. No model agnostic agent: honest version, per model harness you pick a product not a model
  2. Mid chat model swaps break: transcript OOD, cache miss, tool surface mismatch, all at once
  3. Matched pair shifts: yesterday’s load bearing scaffold is today’s dead weight

Primitives are derived, not invented. Match the pair: harness = model and scaffolding goes stale, delete code. Now we can add primitives and watch failures fix:

  • tool result clearing: fix output bloat
  • loop detection: break out of doom loops
  • sub agent dispatch: protect parent context

Context Rot: Accuracy declines with input length (frontier models break on a trivial copy task as input grows).

Context is finite, in performance not just tokens (n tokens = n2 pairwise relationships, every token costs attention budget). So in principle use the smallest set of high signal tokens since Context has diminishing marginal returns.

Right altitude: system prompts not too rigid, not too vague

  • brittle: hardcoded if/else
  • goldilocks: specific behaviour, flexible judgements
  • vague: be helpful, be safe

Long horizon strategies:

  1. compaction: used in conversational flow. Ex: summary-then-continue
  2. note taking: used when iterative milestones. Ex: Notes[dot]md and scratchpad
  3. sub agent: parallel exploration. Ex: clean context per branch

Evals: Training data for harness improvements since harness + evals + harness engineering lead to a better agent (same loop as supervised learning, gradient flows into the harness)

Mirage of Generic Metrics: MMLU, HELM, BERTScore, these don’t tell you if your product works, you need custom evals catered towards your product.

Critique shadowing: Hamel husain’s process of building product evals

  1. Find THE principal domain expert
  2. Build diverse dataset (features × scenarios × personas)
  3. Pass / fail + detailed critique
  4. Fix obvious agent errors
  5. Build LLM judge, iterate to alignment
  6. Error analysis at scale

LLM Judgment alignment: diff splits than ML, small train, big test

The harness flywheel:

Build an aligned LLM judge:

  1. Synthesize 20 diverse queries for company-research agent
  2. Hand-label pass / fail with critiques
  3. Train / dev / test split — write judge v1 (no few-shot)
  4. Iterate to v2 with few-shot, lock and test
  5. Cluster failure modes → harness backlog

Three Takeaways:

  1. Agent = Model + Harness: harness is part of the model’s effective parameters
  2. Context is finite — in performance. smallest set of high-signal tokens, JIT > pre-load
  3. Evals are training data: binary > Likert, aligned LLM judge, the flywheel never ends

RL Environments for LLMs:

Environments are synthetic data engines, RL trainers and eval harness the same artifact, three jobs. Thus same environment (same artifact) can be used for all of these 4 use-cases:

  1. Evaluation (run rollout, average rubric)
  2. RL training (rubric scores, become rewards)
  3. Synthetic data generation (keep high rubric rollouts)
  4. Agent harness experimentation (swap models, swap scaffolds)

Dataset: Task Inputs usually with ground truth or rubric

  • GSM8K — grade-school math
  • HumanEval — coding problems with tests
  • τ-bench — customer service dialogues
  • SWE-bench — real GitHub issues
  • BrowseComp — web research tasks

Build it once. Use it four ways. Now lets revise how RL works where the goal is to learn a policy that maximises cumulative reward. Everything in modern LLM RL training is a special case of this loop.

But how does classical RL translate to RL in LLMs

Why verifiability equals unhackability ?

The reward function has nothing to manipulate expect the actual capability you want

But why study about environments now, since closed labs are racing to build proprietary envs.

Ex: for INTELLECT-3

  • Released: 26 November 2025
  • Architecture: 106B Mixture-of-Experts
  • Base model: GLM-4.5-Air
  • Compute: 512 NVIDIA H200 GPUs · ~2 months
  • Stack: Verifiers + Environments Hub + prime-rl

Verifiers:

Built by Prime Intellect (github[dot]com/PrimeIntellect-ai/verifiers), it is an open source Python framework for training and evaluating AI models using environments, tools and reward functions.

Think of it as infrastructure that teaches an AI agent how to perform tasks and measures whether it performed them correctly.

Imagine you want to train an AI agent that can solve Python programming problems. You need to:

  1. Give the model a programming question
  2. Let it generate code
  3. Execute that code
  4. Check whether the code passes the test cases
  5. Give the model a score based on its performance
  6. Use that score to improve the model through reinforcement learning (RL)

Core Abstractions of Abstraction:

  • SingleTurnEnv: One prompt, one response
  • MultiTurnEnv: Iterative Dialogue
  • ToolEnv: Native tool calling
  • CodeEnv: Code Execution
  • Rubric: Composable scoring
  • Parser: Structured Extraction

OpenEnv:

OpenEnv is an open-source framework for creating and running isolated environments in which AI agents can interact with the real world through standardized APIs.

It is developed through collaboration between Meta and Hugging Face, and was presented at the PyTorch Conference on 23 October 2025.

The easiest way to understand it:

Imagine you build an AI agent that needs to interact with a computer, execute code, use a browser, or operate a simulated environment.

You need a controlled place where the agent can:

  • Take an action
  • Observe what happened
  • Take another action
  • Reset the environment
  • Eventually finish the task

OpenEnv provides infrastructure for building these environments. The Environments Hub is a public registry (like a pip for environments) so every published env can be evaluated, used as a data engine, or trained on.

So to summarise the main points:

  • same model, different harness leads to different results so model harness fit is important
  • Environment = dataset + rollout + rubric (3 pieces)
  • Same artifact: eval, training, data , harness (Build once, use 4 ways)
  • Rubric brittleness is the #1 footgun (parse first, score second)
  • Verifiable rewards are unhackable (everything else, you fight)
  • Multi turn is where the real RL lives (single turn is for benchmarks)

r/LLMDevs • • 12h ago

Discussion I put a free no-signup website host online for AI agents 11 days ago and watched the logs (66k requests, 91 HTTP writes vs 1 MCP)

Thumbnail
gallery
8 Upvotes

I put a free no-signup static site host online for AI agents (https://iko.run) 11 days ago to see if agents would find it and what they would actually publish.

66,402 requests and 65 published pages later, here is what showed up in the logs:

  • Someone is running a real warehouse orders app on it (27 deploys, no account, just a private key)
  • A local beauty salon put up its front page
  • A probe bot left a polite note in X-Agent-Summary: "Short-TTL test page to inspect robots and link attributes, then expire"
  • An SEO bot voluntarily signed its header X-Agent-Name: backlink-man (subdomains are noindex)
  • 91 writes came over plain HTTP API calls, 4 via the browser form, and only 1 used MCP
  • Exa crawled it as many times as Googlebot (21 visits each), followed by OpenAI (18) and Claude (11). 29% of bot reads hit /llms.txt, markdown endpoints, or /openapi.json directly.

A few takeaways if you are building tools for agents right now:

  1. Expose a plain HTTP API first. MCP barely got touched even though it is advertised right next to the REST API.
  2. Ship /llms.txt, /SKILL.md, and markdown variants, unblock indexers, and pick an uncrowded name. Agents and AI search crawlers actually read them.
  3. The agent web is already weirdly alive.

Happy to answer questions about the logs or setup.


r/LLMDevs • • 13h ago

Discussion The cloud model plans, local Qwen writes: 91% fewer cloud tokens and better-tested code

Post image
0 Upvotes

I gave two OMP sessions the same application development task. In one, GPT-6 Luna did everything itself. In the other, a more capable cloud Luna planned the work and coordinated it, while local Qwen on the GPU wrote the backend and frontend. I wanted to see whether I could entrust a local model with more than just tests, whether it could handle a substantial part of the implementation. In this setup, Qwen became the workhorse for tasks broken down by the cloud model. The hybrid approach cut cloud token usage by 91% and produced more structured, better-tested code. But I had to wait 39 minutes for the final response instead of 18, about 2.1 times longer. These were two separate runs, not a statistical benchmark. The result shows a practical trade-off: the local model handles a large share of the coding, while the cloud model helps bring it to a high-quality finish.

I sent both sessions exactly the same task:

I need a task manager built. The web application should use Angular and Material, with a Rust backend and an SQLite database. It must include a login form and a task list, with functionality to add, delete, and edit tasks, as well as mark them as completed.

The prompt did not specify a data schema, security requirements, field constraints, or a testing plan. The agents had to choose the implementation details themselves.

Hybrid sessionCloud-only
OrchestratorGPT-6 Luna, reasoning maxGPT-6 Luna, reasoning max
ImplementersQwen4-35B-A3B-130K in Strata, reasoning highGPT-6 Luna in the same main session
Task breakdownA separate agent for the Rust backend, then one for the Angular frontendOne agent handles the entire project
Local modelUsedNot used

In the hybrid setup, the local agents worked sequentially: RustBackend first, then AngularFrontend. The cloud orchestrator broke the work into parts, gave the implementers their tasks and an API contract, then checked the integrated result. The cloud model kept track of the overall plan and integration; the local model handled specific, substantial subtasks.

I compare GPT-6 Luna usage separately from Qwen. Otherwise, one column would include paid cloud tokens, while the other would also include local compute.

MetricHybridCloud-only
Time to final response39:2318:27
GPT-6 Luna tokens, including cached tokens300,7633,524,338
GPT-6 Luna input + output, excluding cache77,147185,842
Cloud output5,85845,514
Estimated GPT-6 Luna cost at standard API rates$0.0123$0.0702

In the hybrid run, GPT-6 Luna used 3.22 million fewer tokens than in cloud-only when cached tokens are included, a reduction of 91.47%. Counting only uncached input and output, the difference is 108,695 tokens, or 58.49%. Cloud output fell by 87.13%. At GPT-6 Luna’s standard API rates, that amounts to estimated savings of about $0.058 for this task, or 82.48%. This estimates API call costs, not usage of the ChatGPT Plus allowance. I did not measure electricity use or GPU depreciation. The dollar difference is small for a single task. If you repeat tasks like this hundreds of times, the savings become more noticeable. And if the work is urgent, the nearly 21 extra minutes per task may matter more than a few cents.

Both versions implemented the required baseline: login, a task list, and the ability to create, edit, and delete tasks, and mark them as complete. Cloud-only also added priorities, due dates, search, and filters. Its sessions also persisted across server restarts.

Local Qwen did more than write tests: it wrote application code for the Rust backend and Angular frontend. But it did not have to design the architecture for the whole application, maintain boundaries between modules, or integrate the results on its own. GPT-6 Luna, the more capable cloud model, handled that role: it broke down the work, assigned subtasks, aligned the API contract, and checked the integration. In this experiment, the local model was the workhorse, while the cloud model acted as planner and coordinator.

The hybrid version had better structure and test coverage. The backend was split into modules; the frontend was organized into services, a guard, an interceptor, pages, and components. It included 25 backend unit tests and 12 API integration tests, plus 32 Angular tests across six files. It also had recorded checks for formatting, Clippy, a production build, and integration smoke tests.

In the cloud-only version, most of the backend was in one file, and the UI was in one large component. The logs show one backend lifecycle test and a production build; frontend unit tests were either not run or not recorded. This does not mean the application does not work. It means the hybrid version has more evidence that individual scenarios will keep working after the next change.

In a static assessment of the final files against six criteria, ranging from requirement coverage and structure to testability and UI, the hybrid setup scored 4.4 out of 5, while cloud-only scored 3.8. This is my expert assessment of the overall setup, not an automated quality metric. From a single run, it is impossible to separate Luna’s contribution through planning from the contributions of local Qwen and the integration process. So “better code” here means specific things: responsibilities were more clearly separated, input constraints received more thorough checks, and test coverage was broader. Cloud-only has an advantage in extra features and persistent sessions. I did not rerun the tests; I compared the final files and the checks recorded by the sessions themselves.

Token generation speed is only one part of a coding agent’s runtime. Reasoning, context handling, the number of file operations, and running checks also matter. In the hybrid session, local Qwen recorded 97,624 reasoning tokens. Its inference requests took about 31 minutes of active time in total. The two agents worked sequentially, and each agent’s context approached 95,000 tokens. Both needed context compaction; those operations took about 107 seconds combined. The hybrid run made 386 tool calls, compared with 85 for cloud-only. Some calls failed and required retries or corrections: 18 failed tool calls in the hybrid run and 6 in cloud-only. That count alone does not mean every such call was useless, but it shows how many extra cycles task splitting and subsequent integration can add. What took longer was not so much code generation as the overall process: two substantial local stages, handing off the contract, investigating errors, and checking the project again.

In the original Session Info, the hybrid session showed 15.29 million tokens, compared with 3.44 million for cloud-only. At first glance, that makes it look as if the hybrid run used more tokens. But the aggregate includes requests to local Qwen agents and cached tokens. The full logs show 15.68 million tokens for hybrid and 3.52 million for cloud-only. Of the hybrid total, about 15.38 million came from local Qwen and only 300,763 from GPT-6 Luna. Local tokens are not billed like API tokens, though the computations still consume electricity and GPU resources. So to answer “How much did the cloud portion cost?”, you need to look at each model’s usage separately. A single overall counter mixes different things: local and cloud inference, cache reads, and regular input and output.

By the way, I found a separate benchmark of Qwen4-35B-A3B in Q4 on the same RTX 4070 Ti SUPER, with 16 GB of VRAM and 96 GB of RAM. On Ubuntu, using Strata 0.2.26, UD-Q4_K_M, and MTP depth 3, the benchmark author measured generation speeds of 156–179 tokens/s on two short Python tasks. Counting the entire prompt, the speed was 140–142 tokens/s. For the reasoning task, the reported speeds were 114 and 77 tokens/s, respectively. On my Windows machine, using Strata with the same settings, I got about 100 tokens/s during inference and a 130K context window. I have a single GPU, which also serves the system; there is no integrated graphics. This may affect speed, but I did not run a controlled comparison between Ubuntu and Windows, so it would be wrong to attribute the entire difference to the operating system. A local model is already useful for more than generating tests: in this experiment, it wrote substantial parts of the application. Still, even 100 tokens/s does not guarantee a fast result. An agent may spend a long time reasoning, rereading files, running checks, and compacting context. For development, generation speed matters, but so does how many of these cycles it takes to reach a working, verified result.

If I want a testable, modular foundation and can wait, the hybrid approach looks useful: local agents handle a substantial share of the reasoning and implementation, while the cloud orchestrator uses fewer tokens. If I need an answer as quickly as possible, cloud-only finished about twice as fast in this run. There is room to speed up the hybrid approach: define the API contract upfront, run independent parts in parallel, limit repeated reads of large files, and avoid using maximum reasoning for every routine change. That does not remove its main trade-off: lower cloud usage and more thorough checks come at the cost of local inference and orchestration time. My takeaway is that a local GPU can help produce better-structured, better-tested code while noticeably reducing cloud usage. In this task, it nearly doubled the time to get a result. If you were choosing for your day-to-day development, what would matter more: finishing sooner, or using fewer cloud tokens and checking the code more thoroughly?


r/LLMDevs • • 13h ago

Discussion Adapting the free web ecosystem to the AI world

1 Upvotes

The success of the internet relied critically on the fact that so many applications were free to use. And this was primarily possible because the cost of web services was not exorbitant. Today the same idea doesn't work with AI because if I build a free AI application the LLM costs for me are massive and the only way to provide a service is to charge everyone who uses it.

What would be great is if users could securely attach their own models to any AI application. We can kind of do this through plugins but those are one way streets with ChatGPT and Claude having all of the control.

Potential Solution:

Users Host an Open-AI compatible API and provide a secure link to any application that wants to use it.

Lets say I have built ExampleAI:

  1. Users will generate a domain specific endpoint and API Key and provide it to ExampleAI
  2. For every LLM call ExampleAI would will call this endpoint for inference

This way my users get to use ExampleAI with their own LLM and essentially don't have to pay me.

Avoiding Abuse:

How do we ensure that ExampleAI stays within the bounds of approved usage?

  1. Internally the endpoint will maintain a terms file that will void an API key if the prompt violates the terms
  2. The user can also pause an endpoint at his discretion to prevent its usage when he is not using the application
  3. Finally the endpoint will maintain a log of all the calls received in case the user ever has any suspicions

Let me know what you guys think, if there are existing solutions and how you would approach this problem.


r/LLMDevs • • 14h ago

Discussion Why are we defaulting to LLMs to verify the outputs of other LLMs?

5 Upvotes

I've been experimenting with a different approach to enforcing engineering conventions and business rules.

Instead of asking an LLM to review an entire output against a set of instructions, we break each rule into narrow, testable assertions.

  • Deterministic logic wherever possible
  • Specialized decision models or classifiers when semantic judgment is necessary
  • Explicit passing and failing examples for each rule
  • Rules and evaluation datasets independent of the model

In one experiment, 97.6% of checks could be handled before making a model call.
The more interesting challenge is semantic verification. Can smaller, specialized models reliably evaluate previously unseen rules without requiring task-specific training?

I'm exploring this with a project here is the link: https://github.com/feuersteiner/agentests

I'd particularly appreciate feedback from people experimenting with classifiers, NLI models and alternatives to LLM-as-a-judge.
Thank you!


r/LLMDevs • • 14h ago

Discussion Same model, different harness, different reasoning style

Post image
1 Upvotes

Came across an interesting finding from Artificial Analysis' Terminal-Bench 4.1 study.

They tested 28 open-weight models across 13 agent harnesses. Seven showed persistent telegraphic reasoning, though the behavior varied across harnesses.

  •  GLM-5.3-Flash, GLM-5.3, MiMo-V2.6-Pro, and MiMo-V2.6-Flash only showed it in Codex.
  •  DeepSeek V4.1 Flash 1017 and Tencent Hy4 showed it in Codex and some other harnesses.
  •  Kimi K3.1 Pro kept its own telegraphic style across every harness tested.

Curious whether this kind of compressed reasoning actually affects task performance, or if it's mostly just a difference in how models express their thoughts lol

Have you noticed similar differences when running the same model across Codex or other agent setups?


r/LLMDevs • • 15h ago

Help Wanted Is Composio reliable enough for production agents? Real experiences wanted (vs Pipedream Connect / Nango / DIY)

1 Upvotes

Has anyone run Composio in production with paying users? I'm trying to work out whether it's solid enough to build on.

Context: we're building an agent product for very small design agencies (1 to 5 people). It reads from Slack, Gmail, Xero, Linear and Notion so they can ask questions about their work and numbers in one place. It's mostly read-only, with a few write actions like drafting replies or creating tickets.

What I'd love to know:

  • Reliability: how often do tool calls or triggers fail? I've read the April incident report where trigger events were lost and couldn't be recovered. Did that affect you, and do you now run your own webhooks as a backup?
  • Tool quality: do LLMs handle Composio's tool schemas well, or do you hit missing parameters and hallucinated arguments? Are you using its tools as they are, or only the OAuth layer with your own tools on top?
  • Coverage: has anyone used the Xero integration in anger? That's the one I'm most nervous about.
  • Alternatives: if you moved off it, what to? Pipedream Connect, Nango, or your own OAuth and hand-written tools? Was it worth it?
  • Ops: any problems with latency, rate limits, debugging failed calls, or lock-in?

I'll share what we end up choosing and why.


r/LLMDevs • • 16h ago

Help Wanted I added a 10-second EvalSeal demo: a 0.92 eval score still failed the CI gate

2 Upvotes

Someone read the EvalSeal repo and pointed out that the README explained the idea without showing what the tool actually did. Fair feedback, so I put a short terminal replay near the top.

It runs a recorded LLM evaluation with 20 cases and five verdicts per case. The mean is 0.92, above the 0.85 threshold. The receipt ledger verifies. But five cases exceed the 10% flip-rate limit, so the CI gate exits 3.

That’s the problem I built EvalSeal to make visible: an average can clear your threshold while individual cases keep changing verdicts. The demo uses committed responses, so you can replay the workflow without an API key.

If you use LLM judges in CI, what would you actually block on: one unstable case, a set of critical cases, or only a drop in the overall score?

Repo and demo


r/LLMDevs • • 17h ago

Tools Four of the six RAG/GraphRAG systems I benchmarked never handed the model the figure a question was about, so I built one that reads each page's outline instead (open source)

2 Upvotes

Disclosure: I built this. It's Graph-Me-Maybe, open source (Apache-2.0) and free, with no paid tier.

TL;DR: On MMLongBench-Doc, text-chunk pipelines (RAG, LightRAG, GraphRAG, HippoRAG 2) gave the answering model the figure a question was about in 0% of the questions that needed one. Reading every page as an image and keeping each document's own outline as the graph got that to 86%, and overall accuracy to 72%.

The problem

Long PDFs, slide decks and spreadsheets answer a lot of questions in tables, charts and layout. Most pipelines turn pages into text chunks first and extract entities from the text afterwards. By the time retrieval runs, the figure is already gone.

What I measured

MMLongBench-Doc marks the evidence for each question. On the 178 questions with evidence, this is how often that evidence reached the answering model. A chart or picture question counts only if the picture itself was handed over.

systemevidence handed overfigure evidence handed overaccuracy (all 243)
Graph-Me-Maybe93.8%85.9%72.0%
RAG-Anything84.3%60.6%67.5%
LightRAG59.6%0%58.8%
Text RAG39.3%0%49.8%
HippoRAG 231.5%0%46.1%
Microsoft GraphRAG42.7%0%44.4%

On DocBench (annual reports, legal and government documents, papers, news; 160 questions) it scored 83.1%, against 79.1% for LightRAG and 78.1% for RAG-Anything.

Setup: every system got the same documents and the same answering model (Claude Haiku 5.5). Claude Opus 5.5 graded each answer against the dataset's reference answer.

What it does differently

  1. Every page (Word, Excel, PowerPoint, PDF including scans, and mail) is rendered to an image. A vision model reads the page's outline: sections, paragraphs, tables as cell ranges, and figures with their crop.
  2. Each document becomes its own outline tree in the graph. There is no separate entity-extraction pass. Documents are linked when they cite each other, reply to each other, or are versions of the same file.
  3. Search is hybrid (vector + full-text, fused with weighted RRF) over graph chunks, and a hit can expand to its whole section.
  4. The answer step gets the passages plus the figure crops (about 12 per question). A second pass ties each claim to the passage it cites, so the app can highlight the exact cell, slide or paragraph on the original page.

Cost and speed (MMLongBench-Doc, Claude Haiku 5.5 at API prices)

  • Indexing: 20 minutes, against 24 for GraphRAG's fast mode and 5.8 hours for RAG-Anything.
  • Stored size: 1.25x the source documents, against 8.9x for RAG-Anything.
  • Per question: about half a cent ($0.0054), or 44k tokens. Most of that is text passages; the figure crops are about 5k.

Per-type scores, costs and timings: https://graphme.io/benchmarks/

Using it

It's a desktop app for macOS, Windows and Linux with its own Neo4j bundled (no Docker). It reads local folders, synced cloud drives and mail. It also runs an MCP server, so Claude Code, Claude Desktop or Cursor can search the same graph. Pages are read with an OpenAI, Anthropic or Gemini API key, or with a Claude, ChatGPT or Gemini subscription you already have.

A question for people doing document QA: do you pass figure crops to the answering model at question time, or caption the figures at index time and keep everything as text?


r/LLMDevs • • 17h ago

Resource How DoorDash Reduced LLM Search Costs by 98% Without Losing Accuracy

Thumbnail careersatdoordash.com
18 Upvotes

DoorDash reduced search-provider costs in its large language model (LLM)-powered query understanding system by more than 98% while maintaining comparable accuracy on production workloads. The company introduced Decoupled Search Grounding (DSG), an MCP-compatible gateway that separates evidence retrieval from model reasoning, allowing applications to switch search providers independently of the underlying model.

Native LLM search integrations bundle retrieval into the model provider's API, limiting provider choice, result reuse, retrieval-depth controls, and cost visibility. DSG exposes these capabilities through a shared interface rather than embedding search integrations in individual agents.

The gateway supports multiple search providers, including Serper, Bright Data, Firecrawl, Exa, and Tavily, as well as native search capabilities offered by model providers such as OpenAI and Anthropic. It normalizes provider responses into a common format containing titles, URLs, and content snippets, keeping retrieved evidence separate from model-generated responses.


r/LLMDevs • • 18h ago

Help Wanted Help: Evaluate my new open source remote desktop software

Thumbnail
gallery
1 Upvotes

I vibecoded a new remote desktop app that is now good enough for me to enjoy using every day, and the next step is to find out if other people like it too.

The background

As a person with a history in IT work and having many machines at home running on many different OSes, it's always been annoying bouncing around between remote desktop solutions. I'd settled on NoMachine for many years, because it's got a consistent experience across OSes, it's performant, and it autodiscovers machines on the network.

But it's always had weird UX choices and bugs that I've just been living with. One especially bad one is nx session files occasionally filling up my entire hard drive.

And then NoMachine went paid. They've always had a paid option, but NoMachine 10 now no longer offers a free version. Yuck.

I'll make my own remoting software. With blackjack. ...

The solution

I want remote desktop software that:

  • Works the same everywhere. No matter the client OS or the host OS, it should be the same app, and the experience should be the same.
  • Machines stay connected. After a setup, you shouldn't have to think about how to connect them again or what your password was.
  • No cloud. No accounts. I don't want to sign up for anything. I've got three computers, they should be able to communicate without a third party getting involved.
  • Balance between performance and ergonomics. The app should sufficiently accommodate remote gaming scenarios, but I think Moonlight and Sunshine expose the annoyances in tuning remote gaming software. The sheer volume of configuration menus to deal with just to connect to a remote desktop is out of control.
  • Free as in beer & free as in freedom. We're entering a period of software abundance and I'll be damned if I'm going to spend money to remotely access my own machine. And I want people around me to benefit from this as well.

So I just asked Codex to make it, and I've been tweaking it for weeks. I've been expressing my UX goals and my very high-level architectural desires more than anything.

This is probably a good time to point out that I am a professional software developer by trade, but this project is purely vibecoded. I'm not a Rust developer, and I don't think I've personally inspected a single line of code. I have no idea if the code is any good.

What we came up with is Ascry: https://github.com/x3haloed/ascry

Ascry is written in Rust to target high performance, it's a single app across Mac, Windows, and Linux, and it's intentionally careful about the experience of using a remote machine. Every remote desktoping solution has to answer hard questions about what your hotkeys mean, what to do when screen sizes don't match, etc. So far, my answer for most cases has been "try to do as little as possible."

The one thing that I'm in love with about it is the "minimap" viewer for remote screens that are larger than the client. It's my favorite way to deal with large remote resolutions.

Where it stands now

It works. Mostly. What you see in the screenshots is pretty much what you get. I think it's more useful to point out what's not currently working very well:

  • If your OS's firewall blocks TCP ports 4949 or 4950, then the setup magic falls apart, and you'll have to interrogate your firewall rules
  • Windows launches a bunch of terminal sessions that stay open. I haven't had time to clean this up into a tidier solution
  • Copy and paste from client to host works with CMD+V, but there is some unintuitive weirdness about it. For example, if you are viewing a remote desktop and press CMD+C, nothing will get copied into any clipboard. And there's no way to pull from the host clipboard into the client machine. Be prepared to copy things on your remote by right-clicking on things.
  • As far as I recall, there's no support whatsoever for resizing the *remote* display. This is only because I have not yet found a good UX solution for commanding how and when this should be done. And to go along with this, there's not enough control over when the remote display should shrink-to-fit without the sidebar appearing
  • The Linux version only supports X11 right now (no Wayland), and it's the least tested of the three OSes.
  • macOS *should* ask you for accessibility and app control permissions when it needs them, but this is undertested
  • Windows and Linux don't have installers, packaging, or even published builds, so you have to compile it yourself and install it yourself. (Just ask Claude to do it for you, honestly)
  • I've done some security review, but not extensive.

The ask

Beat the crap out of it, and if you enjoy it, improve it. Or fork it and make it work better for you. I just want us all to have nice remote desktop software that's easy to use and free.

If you use desktops remotely, ask Claude to pull it down and launch it for you. See if it works. See if you like it. If you find a bug, ask your agent to publish a pull request with the fix. If something about using the software itself is annoying or frustrating, report that here or ask your agent to fix it and submit a PR.

The one thing that doesn't help very much is an idea that's not rooted in an experience:

  • Helpful: "I tried it, and I didn't like ..., and I think I would like it better if ..."
  • Not very helpful: "Parsec is good. Just use that." or "You should think about adding the VNC protocol."

Repo again: https://github.com/x3haloed/ascry


r/LLMDevs • • 19h ago

Help Wanted What backend topics are required for AI engineering?

1 Upvotes

I'm currently pursuing a career in AI engineering and want to build strong backend skills without going too deep into traditional backend development.

What backend topics should I focus on? Is learning FastAPI, databases, authentication, and deployment enough, or are there other essential topics?