Skip to main content
NVIDIA CUDA Tile Primitives accelerate Mamba-2 with faster exp2 operations, enhancing AI model performance.

Editorial illustration for NVIDIA CUDA Tile Primitives Accelerate Mamba-2 With Faster exp2 Operations

NVIDIA CUDA Tile Primitives Speed Up Mamba-2

• 4 min read

Jane Street's machine learning engineers spent part of their recent research cycle rewriting Mamba-2's forward pass in NVIDIA's new CUDA Tile programming model, known as cuTile. The trading firm, which leans on deep learning for quantitative research, worked directly with NVIDIA engineers to build and tune the kernels. CuTile itself is a Python-based DSL that lets developers write GPU code at the tile level rather than managing threads and warps by hand, with the compiler handling the work of mapping operations onto Tensor Cores and other hardware features.

Mamba-2 matters here because it sits at an awkward middle point in sequence modeling. Softmax attention trains fast thanks to matrix multiplication on Tensor Cores, but its compute and memory costs climb linearly with sequence length during inference. Recurrent networks go the other way: constant memory and compute regardless of sequence length, but training is slow and resistant to parallelization.

Mamba-2 tries to split the difference, keeping a fixed-size hidden state like an RNN while still aiming for throughput closer to attention-based models. Building that architecture efficiently took three custom kernels, each leaning on specific cuTile optimizations to get there.

As an early adopter of cuTile, machine learning engineers at Jane Street implemented Mamba-2, a state-of-the-art sequence model, in cuTile and partnered with NVIDIA to optimize the kernels.

Why this matters

NVIDIA is betting that Python can replace hand-tuned CUDA C++ for high-performance kernels, and the Mamba-2 example is the proof point it wants researchers to notice. Mamba-2 and other state-space models are the leading challenger to Transformer attention for long-sequence work, so faster forward-pass kernels matter directly to anyone building or fine-tuning these architectures. The exp2 trick, swapping a costly exponential for a cheaper one and rescaling by log2(e), is the kind of low-level optimization that used to require a CUDA specialist. If cuTile's primitives (ct.bid, ct.load/store, ct.cumsum) genuinely let a Python-literate ML engineer write that kernel without dropping into C++, that's a real shift in who can touch the performance layer.

Worth watching with some caution: this is NVIDIA's own framework, demoed on NVIDIA's own hardware, by an "early adopter" NVIDIA chose to highlight. No independent benchmarks or comparisons against Triton or raw CUDA appear here. Founders evaluating infrastructure should treat this as a promising abstraction to test themselves, not a settled performance claim.

Common Questions Answered

What is cuTile and how does it simplify GPU programming compared to traditional CUDA?

cuTile is a Python-based DSL (domain-specific language) developed by NVIDIA that allows developers to write GPU code at the tile level rather than manually managing threads and warps. The compiler automatically handles the low-level work of thread and warp management, making high-performance GPU kernel development more accessible to researchers and engineers without requiring deep CUDA C++ expertise.

How did Jane Street optimize Mamba-2's forward pass using NVIDIA CUDA Tile primitives?

Jane Street's machine learning engineers rewrote Mamba-2's forward pass in cuTile and partnered directly with NVIDIA engineers to build and tune the kernels for optimal performance. They implemented the state-of-the-art sequence model as an early adopter of cuTile, demonstrating how the tile-based programming model could accelerate complex neural network operations.

What is the exp2 optimization trick mentioned for Mamba-2 kernels?

The exp2 optimization trick involves swapping a costly exponential operation for a cheaper exponential operation and then rescaling the result by log2(e). This technique reduces computational overhead in the forward pass while maintaining numerical accuracy, directly improving performance for state-space models like Mamba-2.

Why are faster Mamba-2 forward-pass kernels important for sequence modeling?

Mamba-2 and other state-space models represent the leading challenger to Transformer attention for processing long sequences, making them critical for many deep learning applications. Faster forward-pass kernels directly benefit anyone building or fine-tuning these architectures, enabling more efficient training and inference at scale.

What is NVIDIA's strategic goal with the cuTile programming model?

NVIDIA is betting that Python can effectively replace hand-tuned CUDA C++ for developing high-performance GPU kernels, democratizing GPU programming for researchers and engineers. The successful optimization of Mamba-2 with cuTile serves as a proof point that this approach can deliver competitive performance while improving developer productivity and accessibility.

LIVE04:33Multimodal AI Model Clef, Fine-Tuned From Qwen, Comes to Ollama's Cloud