Research

Featured Story

# Cloudflare and Adaption: Self-Improving Intelligence for Optimized Inference

![Dhruv Naik](https://adaptionlabs.ai/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F5fn3so8t%2Fproduction%2Ff93818552540a5acde5a1ee26f2a26addf4dad20-474x488.jpg&w=96&q=75)

[Dhruv Naik](https://www.linkedin.com/in/dhruvrnaik/)

 &

![Sudip Roy](https://adaptionlabs.ai/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F5fn3so8t%2Fproduction%2Fd21d3e8a32d333abc69684e28b30c99dac1638ba-683x683.png&w=96&q=75)

[Sudip Roy](https://www.linkedin.com/in/sudip-roy-81a23b15/)

·

Dec 01, 2026

·

4min read

![Cloudflare and Adaption: Self-Improving Intelligence for Optimized Inference](https://adaptionlabs.ai/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F5fn3so8t%2Fproduction%2Fb855d71f30f1a55386753a98f4aeb0d22a68619a-2220x1080.jpg&w=1920&q=75)

Compute scarcity and growing inference costs are pushing enterprises to get more out of the GPUs they already have. But optimizing inference means navigating a large set of interacting serving parameters, with the best configuration varying by model, workload and hardware. Even for experienced inference engineers, finding that configuration can take hundreds of benchmark runs over several days.

We collaborated with Cloudflare to understand their inference challenges and identify where self-improving intelligence could help. Cloudflare handles traffic for more than 20% of the web and deploys AI inference globally. This guided our experiments with AutoScientist to optimize inference for specific workloads, performance requirements and available hardware. [AutoScientist](https://adaptionlabs.ai/auto-scientist) learns from the optimization process itself. It carries what it learns from one model family to the next, so it finds better serving configurations in fewer experiments. Across four open models (GLM-5.2, GLM-5.3, GLM-5.3-Flash and DeepSeek-V3.2), AutoScientist delivered:

- 33% to 73% faster per-user inference than default settings on the same hardware: DeepSeek-V3.2 +73%, GLM-5.3-Flash +62%, GLM-5.2 +50% and GLM-5.3 +33%.
- 5% to 9% faster than expert-published configurations on GLM-5.2 (59.5 vs 56.7 tok/s/user) and GLM-5.3 (66.2 vs 60.5 tok/s/user). It never saw those configurations, and it surpassed them in as few as two experiments.
- 5x fewer trials than OpenAI’s Codex CLI to meet every speed and latency target (2 trials vs 10), using the same underlying model and tools. OpenCode and Prime Intellect’s Prime Agent did not meet the targets within the same ten-trial budget.

### How AutoScientist Optimizes Inference

For enterprises, the opportunity is to adapt inference to their specific workloads, latency requirements and available hardware. As those workloads and constraints evolve, AutoScientist can build on prior experience to retune serving configurations, helping teams meet their performance targets on the infrastructure they have.

Each optimization run began with a model, a workload and a set of performance requirements. These defined the deployment AutoScientist had to optimize for, including the number of concurrent users, minimum generation speed per user and latency limits.

AutoScientist guided and tuned an agent that proposed serving configurations, deployed a model and measured their performance under the target workload. Each experiment informed what to test next. Knowledge accumulated from previous optimization runs also guided the search, allowing the agent to build on earlier experience. The process continued until a configuration satisfied all performance requirements.

The study ran on a single server with eight NVIDIA B200 GPUs, using the open-source SGLang inference engine. The agent had no access to the expert-published configurations used for comparison, so its results came from an independent search.

### Up to 73% Faster than Default Settings on DeepSeek and GLM Models

AutoScientist can improve models and the agent systems around them. Here, it optimized the agent harness, so the agent reaches an optimized configuration faster than general-purpose agents like OpenAI's Codex CLI. We showcase that the gains generalize across GLM and Deepseek models. AutoScientist improved per-user generation speed across all four models tested, with gains ranging from 33% to 73% over default settings. It also surpassed the published expert configurations on both models where those baselines were available.

![Up to 73% Faster than Default Settings on DeepSeek and GLM Models](https://adaptionlabs.ai/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F5fn3so8t%2Fproduction%2F45c87aebe0cb599ee01276f6b5a1a5ee1946057c-3840x2160.jpg&w=1920&q=75)

Figure 1\. Speed for each user, in tokens per second, with 64 users at once on a single 8-GPU server. Expert settings are shown only for models with published settings: [GLM5.2](https://docs.sglang.io/cookbook/autoregressive/GLM/GLM-5.2#hw=b200&variant=default&quant=fp8&strategy=balanced&nodes=single), [GLM 5.3](https://docs.sglang.io/cookbook/autoregressive/GLM/GLM-5.3#hw=b200&variant=default&quant=fp8&strategy=high-throughput&nodes=single)

![Blog section illustration](https://adaptionlabs.ai/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F5fn3so8t%2Fproduction%2Fe70698b4ac45dc6de177e7c4f37b28b9febd978d-3840x2160.jpg&w=1920&q=75)

Figure 2\. One optimization run on GLM-5.2, on one 8×B200 server. The agent was asked to minimize each user’s response time with 8 users at once, on 8K-in, 1K-out requests. Each experiment tests a new set of server settings, and each step up is a new fastest result, ending 65% faster than the defaults.

### AutoScientist vs. General-Purpose Coding Agents

We tested AutoScientist-tuned agent against OpenAI’s Codex CLI, OpenCode and Prime Intellect’s Prime Agent using the same underlying model, tools and ten-trial budget. AutoScientist met every speed and latency requirement at 64 concurrent users in two trials. Codex needed ten; OpenCode and Prime Agent did not reach the target within the budget.

| Agent           | Best per-user speed within limits (tok/s/user) | Reached at experiment | Fastest config found (tok/s/user) | Why the fastest config was rejected        |
| --------------- | ---------------------------------------------- | --------------------- | --------------------------------- | ------------------------------------------ |
| **Our agent**   | 59.5                                           | 2                     | 59.5                              | Not rejected (within limits)               |
| **Codex CLI**   | 62.0                                           | 10                    | 62.0                              | Not rejected (within limits)               |
| **OpenCode**    | —                                              | —                     | 78.6                              | p95 time to first token 11.1 s (limit 8 s) |
| **Prime Agent** | —                                              | —                     | 75.3                              | p95 time to first token 11.4 s (limit 8 s) |

Table 1\. Every agent was asked to maximize per-user speed at 64 concurrent users (8K-input / 1K-output). A configuration counted only if it met every constraint: p95 time to first token ≤ 8 s, p95 end-to-end latency ≤ 35 s.

These results show what self-improving intelligence can deliver for inference. We see an opportunity to bring AutoScientist to Cloudflare and other enterprises, helping them optimize inference for their own workloads and constraints.

Optimizing AI systems is one application of self-improving intelligence. The same approach can extend to a broad class of problems where experimentation and measurable feedback guide progress. Our broader ambition is to build intelligence that accumulates expertise through experience, finding better solutions and carrying what it learns into new problems and applications.

[Learn More](https://adaptionlabs.ai/enterprise)[Talk to an AI Expert](https://adaptionlabs.ai/book-a-call)

Author

[Dhruv Naik](https://www.linkedin.com/in/dhruvrnaik/), Member of Technical Staff and [Sudip Roy](https://www.linkedin.com/in/sudip-roy-81a23b15/), Co-founder

Date

Dec 01, 2026
