techlist.io

Mixture Of Experts

5 posts

Cloudflare2026-08-033 min readCurated summary

Smaller, faster, safer: running Kimi and GLM at scale

Cloudflare improves the efficiency of serving large, long-context models by optimizing both GPU memory usage and request concurrency. Its approach combines FP8 KV-cache quantization, INT4 weight compression, and integrity checks for shared caches, while using separate prefill and decode pools to apply each optimization where it helps most. These techniques increase throughput and reduce costs without materially affecting model accuracy. ## Quantizing the KV Cache - Long-context models store attention keys and values in a KV cache, which often exhausts GPU memory before model weights do. - Cloudflare stores the cache in FP8 instead of BF16, cutting its size in half. - On Kimi K2.6, this increases available context from roughly 686,000 to 1.37 million tokens. - FP8 is slightly slower at the same concurrency because values must be converted during attention. - However, FP8 supports more concurrent requests: - BF16 runs out of memory at 32 requests. - FP8 reaches 2,192 tokens per second at 64 requests. - Peak throughput improves by about 41%, with roughly 30% lower cost per token. - Cloudflare keeps BF16 for prefill, where workloads are compute-bound. - Evaluation results show FP8 and BF16 produce effectively indistinguishable quality across reasoning, knowledge, tool-calling, and internal benchmarks. ## Compressing Model Weights - GLM 5.2 weights are compressed from FP8 to INT4 for the decode phase. - The checkpoint shrinks from 705 GB to 421 GB, while per-GPU memory in an eight-way deployment falls from about 88 GB to 52 GB. - The freed memory supports approximately 1.18 million tokens of KV cache. - INT4 improves decode performance because generation is memory-bandwidth-bound: - Single-request throughput rises from 60 to 92 tokens per second, a 55% gain. - Gains range from 16% to 27% at higher concurrency. - Prefill becomes slower with INT4 because compressed weights must be expanded before computation: - FP8 prefill: about 10,160 tokens per second. - INT4 prefill: about 8,660 tokens per second. - Cloudflare therefore uses FP8 for prefill and INT4 for decode. - Accuracy remains within 0.8 percentage points of the FP8 model across tested benchmarks. ## Protecting a Shared KV Cache - Greater memory efficiency allows hundreds of requests to share physical KV-cache pages, increasing the risk of page-allocation or bookkeeping errors. - Cloudflare assigns each cache page a changing tag whenever it is reallocated. - Requests record the pages and tags they expect, and the server validates these mappings before supported decode operations. - If a mismatch occurs, the request is aborted instead of reading incorrect data. - In production-style tests, integrity checking caused: - Less than 1% throughput reduction. - Less than 1% increase in p95 latency. - Validation runs as a separate batch check rather than inside the attention kernel, avoiding GPU synchronization races. - The feature is enabled per deployment, while deployments that do not use it incur no measurable overhead. ## Future Work - Cloudflare is expanding FP8 KV caches across its fleet. - It is testing NVFP4 weight compression on NVIDIA Blackwell GPUs. - The company is also working toward making cache integrity checks universally enabled at negligible cost. Together, these optimizations let Cloudflare serve larger models with more concurrent users, lower inference costs, and essentially unchanged model quality. Separating prefill and decode workloads is central to applying each precision choice where it delivers the best trade-off.

Dropbox2025-10-233 min readCurated summary

With Mobius Labs' Aana models, we're bringing deeper multimodal understanding to Dropbox Dash

Dropbox is integrating Mobius Labs’ Aana multimodal models into Dropbox Dash to improve how it understands text, images, audio, and video together. Aana is designed for efficient, large-scale processing, enabling Dash to interpret scenes, actions, speech, and relationships across media rather than relying on isolated metadata. The goal is to make rich media searchable and support future AI agents that can analyze content and act on it. ## Dropbox Dash’s Multimodal Goal - Dash combines AI assistance and search to understand a team’s work, context, and tools. - Its multimodal capabilities are intended to cover formats such as: - Text - Photos - Videos - Audio - This is especially valuable for creative, technical, media, and marketing teams whose work is distributed across many applications and content repositories. ## Why Multimedia Understanding Is Difficult - A video may require analysis of: - Scene changes - Speaker shifts - On-screen text - Objects and actions - Audio cues and dialogue - Images require systems to understand people, locations, events, and visual context. - Each modality has different timelines and semantic boundaries; transcripts, shots, visuals, and audio do not automatically align. - Effective understanding requires connecting modalities—for example, linking what someone says to the diagram they are showing. - Processing this information across exabytes of content would be prohibitively expensive without highly efficient infrastructure. ## How Aana Combines Models and Context - Aana analyzes images, audio, video, and related text as a connected system instead of separate data streams. - It combines fine-tuned, open-source foundation models for: - Speech, including optimized Whisper-based models such as `faster-whisper-large-v3-turbo` - Vision - Language - Transformer and mixture-of-experts architectures support fast inference on standard GPUs. - Aana tracks how scenes evolve over time, including: - Object movement - Actions - Changing layouts - Cross-modal events - Insights are stored in a shared vector space, enabling searches such as “the part where the presenter explains the API flow” rather than requiring users to scrub through a video manually. ## Efficiency at Dropbox Scale - Aana uses low-bit 8-bit and 4-bit inference through its HQQ system to reduce memory and compute requirements. - Gemlite provides custom GPU kernels to accelerate matrix multiplication and attention operations. - The Aana SDK coordinates models, batching, GPU utilization, and production pipelines. - Teams can configure and deploy different combinations of models while experimenting with new workflows. - These optimizations are intended to make analysis of exabytes of media possible with a much smaller compute footprint than conventional approaches. ## Future Applications in Dash - Aana could help users find specific visual elements across large creative archives. - It could summarize years of client meetings into searchable highlights. - Its capabilities may support agentic workflows that: - Analyze multimedia - Surface relevant insights automatically - Generate ideas - Take actions for teams Dropbox’s integration of Aana is intended to make Dash a more context-aware search and AI assistant for rich media. The practical outcome is less time spent organizing and manually reviewing content, and more time spent creating and acting on information.

OpenAI2022-06-084 min readCurated summary

Techniques for training large neural networks

# Techniques for Training Large Neural Networks Training large neural networks requires coordinating many GPUs to perform a single synchronized calculation, and practitioners have developed several ways to parallelize that work. Viewed with a few simplifying assumptions, these techniques reduce to moving opaque chunks of data between devices. The post surveys the main approaches, from data and pipeline parallelism to tensor parallelism and Mixture-of-Experts, along with memory-saving methods that make very large models feasible to train. ## The Basic Training Loop Each training iteration runs a forward pass to compute outputs for a batch, then a backward pass to compute a gradient for each parameter. An optimizer such as Adam uses the averaged gradients and its per-parameter state to produce the next set of parameters. Parallelism techniques divide this process along different dimensions. ## Data Parallelism - Each GPU (worker) holds a full copy of the parameters and processes a different subset of the batch. - The model must still fit in a single GPU's memory, and parameters are duplicated on every device. - Workers synchronize by averaging gradients each step, which requires transferring data proportional to the number of workers times the parameter size. - Asynchronous schemes reduce this communication overhead but hurt learning efficiency, so synchronous training is the common choice. ## Pipeline Parallelism - The model is split into consecutive groups of layers, with each GPU holding only a fraction of the parameters. - A naive implementation leaves workers idle while they wait for upstream outputs, creating "bubbles." - Splitting each batch into microbatches lets workers start on the next microbatch as soon as it is ready, which shrinks the bubbles. - Only activations (forward) and their gradients (backward) move between neighboring stages. - GPipe runs forward and backward passes consecutively and aggregates gradients synchronously at the end, while PipeDream alternates forward and backward passes. ## Tensor Parallelism - Individual operations within a layer, especially large matrix multiplications, are split across GPUs. - Weight matrices are sharded so each GPU computes part of the product, and the results are then combined through communication. - Megatron-LM applies this to the self-attention and MLP layers of Transformers. - PTD-P combines tensor, data, and pipeline parallelism, assigning multiple non-consecutive layers to each device to reduce bubble overhead at the cost of more communication. - Sequence parallelism splits an input sequence across time into sub-examples, lowering peak memory use. ## Mixture-of-Experts - Only a fraction of the network is activated for each input, with a gating mechanism choosing which expert weight sets to use. - This increases the total parameter count without a proportional increase in computation. - Different experts can be placed on different GPUs, giving a natural way to scale across hardware. - GShard scales an MoE Transformer to 600 billion parameters by splitting only the MoE layers across devices, while Switch Transformer routes each input to a single expert and reaches trillions of parameters. ## Memory-Saving Techniques - **Checkpointing (activation recomputation):** Stores only a subset of activations and recomputes the rest during the backward pass, costing at most one extra forward pass. Selective recomputation targets activations that are expensive to store but cheap to recompute. - **Mixed precision training:** Uses lower-precision formats such as FP16 to increase throughput and reduce memory, with little loss in accuracy when done carefully. - **Offloading:** Moves unused data to CPU memory or other devices and prefetches it back before it is needed. ZeRO partitions parameters, gradients, and optimizer states across all hardware. - **Memory-efficient optimizers:** Adafactor reduces the memory footprint of optimizer state. - **Compression:** Gist compresses activations saved for the backward pass, and DALL·E compresses gradients before synchronization. These strategies are typically combined in practice, since each addresses a different bottleneck in compute, communication, and memory.