AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Cloudflare Blog·2026年4月16日 23:00·約3分で読める

超大規模言語モデル実行の基盤構築

#LLM推論最適化#Prefill Decode非同期化#エージェント基盤インフラ#Cloudflare Workers AI#オープンソースモデル
TL;DR

CloudflareはWorkers AIにおける大規模LLMの推論効率を向上させるため、エージェントワークフローに最適化した「Prefill Decode非同期化」アーキテクチャを採用し、GPUリソースの最適利用を実現している。

AI深層分析2026年4月16日 23:42
4
重要/ 5段階
深度40%
4
関連度30%
4
実用性20%
3
革新性10%
3

キーポイント

1

エージェントワークフローに特化した推論最適化

大規模エージェントアプリケーションではシステムプロンプトやツール呼び出しにより入力トークンが膨大になるため、CloudflareはKimi K2.5などのモデルを3倍高速化し、入力処理とツール呼び出しの速度向上に注力した。

2

用途に応じたハードウェア構成の柔軟な調整

ファンフィクション生成(小入力・大出力)と要約タスク(大入力・小出力)など用途によって最適化するGPUリソースが異なるため、Cloudflareはソフトウェアエンジニアリングでハードウェアの効率を最大化している。

3

Prefill Decode非同期化(Disaggregation)の採用

計算集約型のprefillとメモリ集約型のdecodeを別サーバーで実行する非同期化アーキテクチャを導入し、単一マシンでの並列処理によるGPUリソースの競合を解消して推論スループットを向上させた。

4

分散キャッシュ共有とNVMeストレージの活用

LMCacheやSGLang HiCacheによりノード間でキャッシュを共有しセッション認識ルーティングを不要にすることで負荷分散を実現。Mooncake StoreでVRAMを超えてNVMeを活用し、キャッシュ保持時間を延長してヒット率と処理能力を向上させる。

5

スペキュラティブ・ディコーディングによる推論高速化

小さなドラフトモデル(EAGLE-3)で候補トークンを生成し、ターゲットモデルが単一フォワードパスで検証する手法を採用。ツール呼び出しや構造化出力が予測可能なエージェント利用ケースで特に効果的であり、スループット向上と品質維持を両立する。

6

独自推論エンジンInfireの拡張とMulti-GPU対応

Rustで構築されたCloudflare独自の分散ネットワーク向け推論エンジンInfireを、超大規模LLMのサポートに対応するため拡張。Multi-GPU支援などの新機能を追加し、グローバルネットワークにおける推論速度とスケーラビリティを強化している。

7

マルチGPU並列処理の最適化

パイプライン、テンソル、専門家の並列処理に対応し、ステージ間の負荷分散とGPU間通信の最小化を実現。両方を併用することでスループットとレイテンシーの最適なバランスを達成している。

影響分析・編集コメントを表示

影響分析

本記事は、大規模言語モデルの推論コスト削減とスケーラビリティ向上に向けたインフラ層の重要な進化を示している。特にエージェントアプリケーションが主流となる中で、推論パイプラインの非同期化はクラウドプロバイダー間の競争を加速させ、開発者にとってより低遅延・低コストなAIサービス提供を可能にする。

編集コメント

推論パイプラインの分離は既存の技術概念だが、エージェントワークフローという具体的なユースケースに最適化し、実サービスで公開した点は実務的な価値が高い。今後はメモリ帯域と計算リソースの動的割り当てがクラウドAIインフラの標準規格となる可能性がある。

2025年のバースデーウィーク中にお伝えした通り、Cloudflareには機械学習モデルを高速化する独自の推論エンジン「Infire」があります。InfireはRustで記述された推論エンジンで、当社の分散型グローバルネットワークにおける推論の特有の課題に対応するよう設計されています。今回、実行を計画している新たなクラスの大規模言語モデルに対してInfireのサポートを拡張しましたが、これはすべてを機能させるためにいくつかの新機能を構築する必要があったことを意味します。

マルチGPUサポート

Kimi K2.5のような大規模言語モデルは1兆以上のパラメータを持ち、これは約560GBのモデル重みに相当します。典型的なH100は約80GBのVRAMを搭載しており、モデルを実行するにはその重みをGPUメモリにロードする必要があります。つまり、Kimi K2.5のようなモデルをメモリにロードして実行するには、少なくとも8台のH100が必要です。これは、コンテキストウィンドウを含むKVキャッシュに必要な追加のVRAMはまだ考慮していません。

Infireを最初にローンチして以来、マルチGPUのサポートを追加する必要がありました。これにより、推論エンジンはパイプライン並列またはテンソル並列モードで複数のGPUにまたがって実行できるようになり、エキスパート並列性もサポートされています。

パイプライン並列性については、Infireはパイプラインの全段階のロードバランスを適切に調整し、ある段階のGPUが他の段階の実行中にリソース不足にならないようにします。一方、テンソル並列性については、InfireはGPU間通信の削減を最適化し、可能な限り高速化します。ほとんどのモデルでは、パイプライン並列性とテンソル並列性を併用することで、スループットとレイテンシの最適なバランスが得られます。

より低いメモリオーバーヘッド

vLLMよりもはるかに低いGPUメモリオーバーヘッドを既に実現していますが、Infireをさらに最適化し、活性化のような内部状態に必要なメモリを削減しました。現在、Infireはわずか2台のH200 GPUでLlama 4 Scoutを実行可能で、KVキャッシュ用に56 GiB以上が残り、120万トークン以上に十分です。Infireはまた、8台のH100 GPU(そうです、H100です)でKimi K2.5を実行可能で、KVキャッシュ用に30 GiB以上がまだ利用可能です。どちらの場合でも、vLLMではそもそも起動することさえ困難でしょう。

より高速なコールドスタート

マルチGPUサポートを追加する過程で、起動時間を改善する追加の機会を特定しました。Kimi K2.5のような最大規模のモデルであっても、Infireは20秒未満でリクエストの処理を開始できます。ロード時間はドライブ速度によってのみ制限されます。

ハードウェアを最大限活用してスループットを高速化

独自の推論エンジンに投資することで、制約のないシステムではトークン毎秒スループットを最大20%向上させることができます。また、以前は完全に実行不可能だった最新モデルをローエンドハードウェアで実行できるようにすることで、当社のハードウェアを最大限に活用できます。

旅は終わらない

機械学習コミュニティでは、新技術、研究、モデルが毎週のように登場しています。当社は、GPUを効率的に運用しながら、お客様に高品質で高性能な推論を提供するために、技術スタックを継続的に最適化しています。これらがあなたにとって興味深い課題に聞こえるなら、当社は採用中です!

原文を表示

An agent needs to be powered by a large language model. A few weeks ago, we announced that Workers AI is officially entering the arena for hosting large open-source models like Moonshot’s Kimi K2.5. Since then, we’ve made Kimi K2.5 3x faster and have more model additions in-flight. These models have been the backbone of a lot of the agentic products, harnesses, and tools that we have been launching this week.

Hosting AI models is an interesting challenge: it requires a delicate balance between software and very, very expensive hardware. At Cloudflare, we’re good at squeezing every bit of efficiency out of our hardware through clever software engineering. This is a deep dive on how we’re laying the foundation to run extra-large language models.

Hardware configurations

As we mentioned in our previous Kimi K2.5 blog post, we’re using a variety of hardware configurations in order to best serve models. A lot of hardware configurations depend on the size of inputs and outputs that users are sending to the model. For example, if you are using a model to write fanfiction, you might give it a few small prompts (input tokens) while asking it to generate pages of content (output tokens).

Conversely, if you are running a summarization task, you might be sending in hundreds of thousands of input tokens, but only generating a small summary with a few thousand output tokens. Presented with these opposing use cases, you have to make a choice — should you tune your model configuration so it’s faster at processing input tokens, or faster at generating output tokens?

When we launched large language models on Workers AI, we knew that most of the use cases would be used for agents. With agents, you send in a large number of input tokens. It starts off with a large system prompt, all the tools, MCPs. With the first user prompt, that context keeps growing. Each new prompt from the user sends a request to the model, which consists of everything that was said before — all the previous user prompts, assistant messages, code generated, etc. For Workers AI, that means we had to focus on two things: fast input token processing and fast tool calling.

Prefill decode (PD) disaggregation

One hardware configuration that we use to improve performance and efficiency is disaggregated prefill. There are two stages to processing an LLM request: prefill, which processes the input tokens and populates the KV cache, and decode, which generates output tokens. Prefill is usually compute bound, while decode is memory bound. This means that the parts of the GPU that are used in each stage are different, and since prefill is always done before decode, the stages block one another. Ultimately, it means that we are not efficiently utilizing all of our GPU power if we do both prefill and decode on a single machine.

With prefill decode disaggregation, separate inference servers are run for each stage. First, a request is sent to the prefill stage which performs prefill and stores it in its KV cache. Then the same request is sent to the decode server, with information about how to transfer the KV cache from the prefill server and begin decoding. This has a number of advantages, because it allows the servers to be tuned independently for the role they are performing, scaled to account for more input-heavy or output-heavy traffic, or even to run on heterogeneous hardware.

This architecture requires a relatively complex load balancer to achieve. Beyond just routing the requests as described above, it must rewrite the responses (including streaming SSE) of the decode server to include information from the prefill server such as cached tokens. To complicate matters, different inference servers require different information to initiate the KV cache transfer. We extended this to implement token-aware load balancing, in which there is a pool of prefill and decode endpoints, and the load balancer estimates how many prefill or decode tokens are in-flight to each endpoint in the pool and attempts to spread this load evenly.

After our public model launch, our input/output patterns changed drastically again. We took the time to analyze our new usage patterns and then tuned our configuration to fit our customer’s use cases.

Here’s a graph of our p90 Time to First Token drop after shifting traffic to our new PD disaggregated architecture, whilst request volume increased, using the same quantity of GPUs. We see a significant improvement in the tail latency variance.

imageimage

Similarly, p90 time per token went from ~100 ms with high variance to 20-30 ms, a 3x improvement in intertoken latency.

imageimage

Prompt Caching

Since agentic use cases usually have long contexts, we optimize for efficient prompt caching in order to not recompute input tensors on every turn. We leverage a header called x-session-affinity in order to help requests route to the right region that previously had the computed input tensors. We wrote about this in our original blog post about launching large LLMs on Workers AI. We added session affinity headers to popular agent harnesses like OpenCode, where we noticed a significant increase in total throughput. A small difference in prompt caching from our users can sum to a factor of additional GPUs needed to run a model. While we have KV-aware routing internally, we also rely on clients sending the x-session-affinity in order to be explicit about prompt caching. We incentivize the use of the header by offering discounted cached tokens. We highly encourage users to leverage prompt caching in order to have faster inference and cheaper pricing.

imageimage

We worked with our heaviest internal users to adopt this header. The result was an increase in input token cache hit ratios from 60% to 80% during peak times. This significantly increases the request throughput that we can handle, while offering better performance for interactive or time-sensitive sessions like OpenCode or AI code reviews.

KV-cache optimization

As we’re serving larger models now, one instance can span multiple GPUs. This means that we had to find an efficient way to share KV cache across GPUs. KV cache is where all the input tensors from prefill (result of prompts in a session) are stored, and initially lives in the VRAM of a GPU. Every GPU has a fixed VRAM size, but if your model instance requires multiple GPUs, there needs to be a way for the KV cache to live across GPUs and talk to each other. To achieve this for Kimi, we leveraged Moonshot AI’s Mooncake Transfer Engine and Mooncake Store.

Mooncake’s Transfer Engine is a high-performance data transfer framework. It works with different Remote Direct Memory Access (RDMA) protocols such as NVLink and NVMe over Fabric, which enables direct memory-to-memory data transfer without involving the CPU. It improves the speed of transferring data across multiple GPU machines, which is particularly important in multi-GPU and multi-node configurations for models.

When paired with LMCache or SGLang HiCache, the cache is shared across all nodes in the cluster, allowing a prefill node to identify and re-use a cache from a previous request that was originally pre-filled on a different node. This eliminates the need for session aware routing within a cluster and allows us to load balance the traffic much more evenly. Mooncake Store also allows us to extend the cache beyond GPU VRAM, and leverage NVMe storage. This extends the time that sessions remain in cache, improving our cache hit ratio and allowing us to handle more traffic and offer better performance to users.

Speculative decoding

LLMs work by predicting the next token in a sequence, based on the tokens that came before it. With a naive implementation, models only predict the next n token, but we can actually make it predict the next n+1, n+2... tokens in a single forward pass of the model. This popular technique is known as speculative decoding, which we’ve written about in a previous post on Workers AI.

imageimage

With speculative decoding, we leverage a smaller LLM (the draft model) to generate a few candidate tokens for the target model to choose from. The target model then just has to select from a small pool of candidate tokens in a single forward pass. Validating the tokens is faster and less computationally expensive than using the larger target model to generate the tokens. However, quality is still upheld as the target model ultimately has to accept or reject the draft tokens.

In agentic use cases, speculative decoding really shines because of the volume of tool calls and structured outputs that models need to generate. A tool call is largely predictable — you know there will be a name, description, and it’s wrapped in a JSON envelope.

To do this with Kimi K2.5, we leverage NVIDIA’s EAGLE-3 (Extrapolation Algorithm for Greater Language-model Efficiency) draft model. The levers for tuning speculative decoding include the number of future tokens to generate. As a result, we’re able to achieve high-quality inference while speeding up tokens per second throughput.

Infire: our proprietary inference engine

As we announced during Birthday Week in 2025, Cloudflare has a proprietary inference engine, Infire, that makes machine learning models faster. Infire is an inference engine written in Rust, designed to support Cloudflare’s unique challenges with inference given our distributed global network. We’ve extended Infire support for this new class of large language models we are planning to run, which meant we had to build a few new features to make it all work.

Multi-GPU support

Large language models like Kimi K2.5 are over 1 trillion parameters, which is about 560GB of model weights. A typical H100 has about 80GB of VRAM and the model weights need to be loaded in GPU memory in order to run. This means that a model like Kimi K2.5 needs at least 8 H100s in order to load the model into memory and run — and that’s not even including the extra VRAM you would need for KV Cache, which includes your context window.

Since we initially launched Infire, we had to add support for multi-GPU, letting the inference engine run across multiple GPUs in either pipeline-parallel or tensor-parallel modes with expert-parallelism supported as well.

For pipeline parallelism, Infire attempts to properly load balance all stages of the pipeline, in order to prevent the GPUs of one stage from starving while other stages are executing. On the other hand, for tensor parallelism, Infire optimizes for reducing cross-GPU communication, making it as fast as possible. For most models, utilizing both pipeline parallelism and tensor parallelism in tandem provides the best balance of throughput and latency.

Even lower memory overhead

While already having much lower GPU memory overhead than vLLM, we optimized Infire even further, tightening the memory required for internal state like activations. Currently Infire is capable of running Llama 4 Scout on just two H200 GPUs with more than 56 GiB remaining for KV-cache, sufficient for more than 1.2m tokens. Infire is also capable of running Kimi K2.5 on 8 H100 GPUs (yes that is H100), with more than 30 GiB still available for KV-cache. In both cases you would have trouble even booting vLLM in the first place.

Faster cold-starts

While adding multi-GPU support, we identified additional opportunities to improve boot times. Even for the largest models, such as Kimi K2.5, Infire can begin serving requests in under 20 seconds. The load times are only bounded by the drive speed.

Maximizing our hardware for faster throughput

Investing in our proprietary inference engine enables us to maximize our hardware by getting up to 20% higher tokens per second throughput on unconstrained systems, and also enabling us to use lower-end hardware to run the latest models, where it was previously completely infeasible.

The journey doesn’t end

New technologies, research, and models come out on a weekly basis for the machine learning community. We’re continuously optimizing our technology stack in order to provide high-quality, performant inference for our customers while operating our GPUs efficiently. If these sound like interesting challenges for you – we’re hiring!

この記事をシェア

関連記事

NVIDIA Developer Blog★42026年4月21日 07:52

エンドツーエンドFP8精度による高スループット強化学習トレーニングの実行

NVIDIAは、大規模言語モデルの複雑な推論支援のため、エンドツーエンドFP8精度を活用した高スループット強化学習トレーニング手法を提供する。

Cloudflare Blog★42026年4月17日 22:00

Unweight: 品質を犠牲にせずLLMを22%圧縮した方法

Unweight社は、LLMの推論速度向上のため、モデル重みの圧縮技術を開発し、品質を維持しながら22%の圧縮を実現した。

Together AI Blog★42026年3月31日 09:00

Aurora:推論効率を向上させるオープンソース強化学習フレームワーク

Auroraは、推論効率を1.25倍向上させるオープンソースの強化学習フレームワークです。これは、推論を単なるオフライン設定から、リクエストごとに自己改善するシステムへと変革します。

ニュース一覧に戻る元記事を読む