bench string | task_dir string | infra_name string | reward_class string | gpus int64 | max_submissions int64 | ref_speedup float64 | summary string |
|---|---|---|---|---|---|---|---|
kfc | arch-tiling-dram-traffic-min | gemm_tile_size_planner | performance | 0 | 1 | 63.46 | This is the tile-size planner in a blocked matrix-multiply pipeline; it decides what Tm/Tn/Tk block sizes to run the loop nest with for `C=A*B`, which directly determines how many bytes have to be moved from DRAM. The existing `plan_tiling` runs but chooses poorly — you must pick, from the candidate sizes on each axis,... |
kfc | chunked-mlp-recompute | chunked_swiglu_recompute | implementation | 1 | 1 | null | This is one training step of a SwiGLU gated feed-forward block; the naive approach keeps every intermediate activation around for the backward pass, so peak memory runs very high. The `gated_mlp_fwd_bwd` in `submission/kernel.py` is empty (it just raises) — you must implement both the forward and the backward pass and ... |
kfc | ckpt-dcp-meta-bbox-merge | dcp_shard_meta_merge | performance | 0 | 1 | 41,666.666667 | This is the metadata-merge step of a distributed checkpoint: each rank writes out the metadata for its own shard, and these must be aggregated into the global checkpoint metadata. `merge_shard_extents` is empty — per the contract, you must compute for each logical tensor the maximum byte boundary covered by all of its ... |
kfc | compile-cache-key-canonicalize | compile_cache_key_canon | performance | 0 | 1 | 4 | This is the reuse layer of a batch-execution service: before running an expensive step, it computes a short string identity for the request signature and reuses the previous result on a hit. The existing `identity_key` is correct but produces far more distinct identities than necessary (equivalent requests compute diff... |
kfc | errorfeedback-sign-compress | grad_signsgd_error_feedback | performance | 1 | 1 | 31.7519 | This is the gradient-exchange path of data-parallel training, running over a bandwidth-limited network; right now every step ships the full-precision, whole gradient block and saturates the link. You must rework `compress`/`decompress` so that the payload actually put on the wire each step is far smaller, while using e... |
kfc | flash-online-softmax-prefill | flash_causal_attn_prefill | performance | 1 | 1 | 6 | This is the attention step in the transformer stack of a high-throughput inference service, computing causally-masked scaled dot-product attention over the entire input sequence. The existing `causal_attention` is a naive implementation (it materializes the whole attention matrix) — you must rewrite it in a blocked, on... |
kfc | fp16-tensorcore-mma-gemm | fp16_tensorcore_mma_gemm | performance | 1 | 1 | 2 | This is the half-precision dense matrix multiply at the core of an inference service's linear layer — a CUDA kernel, with Tensor Cores available underneath but going unused. You may only modify `gemm_kernel.cu`; you must make the fp16 GEMM fast using the Tensor Core MMA instructions, and you are forbidden from delegati... |
kfc | fusion-dag-normalization-idiom-collapse | fusion_dag_idiom_collapse | performance | 0 | 1 | 11.29167 | This is the graph-fusion pass in a tensor-program AOT compiler: once the model has been lowered to a DAG, it must be rewritten — before being handed to codegen — into an equivalent graph with fewer nodes. You must collapse recognized numerical idioms into a single fused operator and delete redundant pass-through nodes,... |
kfc | insea-coalesced-vectorized-transpose-loop16 | coalesced_matrix_transpose | performance | 1 | 1 | 3.16 | This is a data-layout kernel used all over an inference service: transposing a row-major matrix, in a GPU CUDA implementation. You may only modify `transpose_kernel.cu`; you must make it fast via coalesced memory access plus vectorization (e.g. shared-memory tiling to avoid non-coalesced writes), and you are forbidden ... |
kfc | insea-contiguous-mem-pool-defrag-coalesce-loop16 | arena_pool_defrag_coalesce | performance | 0 | 1 | 3.01623 | This is the memory pool of a training runtime: it carves many variable-length buffers out of one reserved arena, and each buffer must occupy contiguous cells. After a long run of allocations and frees the arena fragments — you must speed up the pool's logic for coalescing free blocks and compacting (sliding live buffer... |
kfc | insea-cpu-int4xint8-quantized-dot-loop16 | int4_int8_blocked_dot | performance | 0 | 1 | 1.25313 | This is the inner product of block-encoded integer vectors, the basic building block of block-quantized matrix-vector multiply, running on CPU. The existing `blocked_dot` is correct but slow — you must vectorize it for speed while keeping bit-for-bit identical results. The input is two block-encoded vector streams (eac... |
kfc | insea-dsl-index-symbolic-simplifier-loop16 | index_expr_symbolic_simplify | performance | 0 | 1 | 3.36 | This is the index-arithmetic frontend of a kernel code generator: after a tensor program is lowered to a loop nest, every memory access turns into a mechanically-generated, often bloated integer index expression. You must speed up this simplifier, rewriting each expression into a smaller canonical form that computes th... |
kfc | insea-fused-softmax-cross-entropy-grad-loop16 | fused_ce_softmax_grad | performance | 1 | 1 | 7.4157 | This is the loss stage of a large-model training step: computing the mean cross-entropy over a batch of logits and integer labels, along with its gradient with respect to the logits. The existing implementation runs in multiple passes (softmax first, then the gradient) — you must fuse it into a single pass to cut memor... |
kfc | insea-h2d-prefetch-compute-overlap-loop16 | h2d_prefetch_compute_overlap | performance | 1 | 1 | 1.4856 | This is the data-movement frontend of a chunked GPU workload in an inference service: a large tensor is already sliced into N row-chunks in host memory, and each chunk must be moved to device memory and then computed. The existing `streamed_chunk_apply` does a serial copy-compute-copy — you must use multiple CUDA strea... |
kfc | jit-source-arch-cache-key | jit_build_cache_key | performance | 0 | 1 | 4 | This is the reuse layer of a batch build service: before running an expensive compile, it computes a short identity for the build-spec and reuses the already-produced artifact on a hit. The existing `identity_key` produces far more distinct identities than necessary (equivalent specs compute different keys) — you must ... |
kfc | lowrank-adapter-apply | lora_adapter_apply | performance | 1 | 1 | 1.1626 | This is a linear layer with a small low-rank correction — the LoRA structure used for cheap adaptation of large models. The existing `lowrank_adapter_apply` computes the base multiply and the low-rank correction separately, with redundant intermediate materialization — you must speed it up while staying within numerica... |
kfc | mamba-zoh-discretize | mamba_zoh_discretize | implementation | 1 | 1 | null | This is the zero-order-hold (ZOH) discretization step in a Mamba/state-space model, converting continuous-time parameters into the discrete recurrence coefficients used at each step. The `discretize` in `submission/kernel.py` is empty — you must implement it correctly per the contract (this task judges correctness only... |
kfc | merge-attn-states-combine | attn_partial_state_merge | performance | 1 | 1 | 6.4424 | This is chunked-attention merging in a high-throughput inference server: the KV of a long sequence is split into several disjoint chunks that are computed separately, each producing a partial output and the log-sum-exp of that chunk's softmax. You must accelerate combine_attn_states, recombining these partial results i... |
kfc | nativehist-merge | sparse_histogram_merge | performance | 0 | 1 | 2.58717 | This is the metric-aggregation path of an observability platform: individual services report sparsely-stored exponential-bucket histograms (native histograms) that must be folded into a single aggregated result. You must accelerate this merger so that it is fast in the common case of sparse buckets and a very wide dyna... |
kfc | s4-fft-longconv | s4_fft_causal_longconv | implementation | 1 | 1 | null | This is the core operator of an S4-style long-convolution sequence model: a causal convolution of the sequence with a very long kernel. The causal_conv in submission/kernel.py is empty, and you must implement it (this task only checks correctness): it must be strictly causal and may not read future samples. The input i... |
kfc | sgemm-register-blocktiling | sgemm_register_blocktiling | performance | 1 | 1 | 2.99 | This is a single-precision dense matrix-multiply (SGEMM) CUDA kernel for the linear layers of an inference server. You may only modify sgemm_kernel.cu, and must make it fast using register-level tiling (each thread computes multiple outputs); delegating to an off-the-shelf BLAS library is forbidden. The inputs are A(M,... |
kfc | size-binned-caching-allocator | size_binned_caching_alloc | performance | 0 | 1 | 25.48631 | This is a caching allocator in a training runtime: device-memory allocation and deallocation are expensive, so freed buffers first go into a pool and are reused directly by the next request of the same size. The existing CachingAllocator is correct but slow, and you must accelerate it while preserving exactly the same ... |
kfc | splitk-tall-skinny-gemm | splitk_tall_skinny_gemm | performance | 1 | 1 | 5.69 | This is a matrix-multiply kernel for the linear layers of an inference server, where the difficulty is insufficient parallelism on tall-skinny shapes (M and N very small while K is enormous). You may only modify gemm_kernel.cu, and must make such shapes fast using split-K (splitting the K dimension into segments comput... |
kfc | ssm-causal-depthwise-conv1d | causal_depthwise_conv1d | performance | 1 | 1 | 18.5413 | This is the per-row sequence-mixing step inside a high-throughput sequence-model block on GPU, essentially a short-window causal depthwise 1D convolution plus gating. You must accelerate channel_window_op: a trailing-window weighted sum along the length axis, adding a per-row bias, then applying a smooth gating activat... |
kfc | ssm-gla-chunk-recurrence | gated_linear_attn_recurrence | performance | 1 | 1 | 62.2504 | This is a sequence-mixing layer in a long-context language model: it mixes tokens using a continuously-updated small state matrix together with per-feature decay gates, as a replacement for pairwise attention. The existing implementation advances the state serially, one timestep at a time, and you must rewrite it into ... |
kfc | ssm-selective-scan-firstorder | ssm_selective_scan | performance | 1 | 1 | 103.1823 | This is the core sequence operator of a state-space / linear-recurrence block: it advances a hidden state with a first-order linear recurrence along the time axis and reads it out step by step. The existing state_space_scan is serial and step-by-step, and you must parallelize it (e.g. chunking / prefix scan) to speed i... |
kfc | wli-fla-retention-chunkscan-loop16 | retnet_chunk_retention | performance | 1 | 1 | 510.24 | This is the forward path of multi-scale retention (RetNet) in the real open-source repository fla-org/flash-linear-attention (an LLM-infra kernel library with 2000+ GitHub stars). The in-scope implementation is correct but very slow — it advances the retention state serially in Python, one timestep at a time, and you m... |
kfc | wre-cloud-catalog-cost-select-loop16 | cloud_instance_cost_select | performance | 0 | 1 | 5.959689 | This is a selector that picks cloud instance types for a batch of resource requests: the catalog is a flat table of (cloud, region, instance type) carrying vCPU/memory/accelerators and both on-demand and spot prices. The existing implementation linearly scans the whole table for every request, and you must make batch s... |
kfc | wre-diloco-comm-chunk-balance-loop16 | diloco_comm_chunk_balance | performance | 0 | 1 | 1.66973 | This is communication-chunk balancing in DiLoCo-style low-frequency-communication training: split a batch of tensors to be synchronized into P chunks so that the byte size of the largest chunk is as small as possible (bottleneck minimization). The balance_chunks in submission/kernel.py is empty, and you must implement ... |
kfc | wre-kvoffload-lfu-admit-sketch-loop16 | tinylfu_kv_offload_admit | performance | 0 | 1 | 12.423595 | This is the admission step of a tiered KV cache offloading policy (TinyLFU style): a candidate block is promoted only if the frequency sketch judges it hot enough and it is not already present downstream. select_offload is empty, and you must implement the admission decision using a count-min sketch (a [D,W] count tabl... |
kfc | wre-modelload-mmap-multi-route-loop16 | safetensors_shard_route | performance | 0 | 1 | 12,195.12195 | This is the name-routing step of a multi-file mmap weight loader: several shard files declare, in order, the tensor names they contain, and for a tensor name that appears more than once the last file to declare it wins. resolve_tensor_files is empty, and you must implement this last-write-wins routing and make it fast.... |
kfc | wre-parallel-all2all-redistribute-loop16 | all2all_tensor_redistribute | performance | 1 | 1 | 1,428.571429 | This is all-to-all redistribution in tensor-parallel / expert-parallel setups: rearranging data distributed under one sharding scheme into another. The routine in submission/kernel.py is empty, and you must implement the redistribution and make it as fast as possible on GPU (H20). The input is the sharded data under th... |
kfc | wre-router-power-of-two-choices-loop16 | p2c_least_loaded_router | performance | 0 | 1 | 2.935892 | This is the load-balancing routing core of a serving system: each request gives you two candidate replicas, and by the power-of-two-choices rule you send it to whichever currently has the lower load, then update the bookkeeping. route_p2c is empty, and you must implement this rule and make batch routing fast. The input... |
kfc | wre-runtime-memplan-arena-loop16 | runtime_arena_memplan | performance | 0 | 1 | 5.681818 | This is runtime memory planning: assign offsets within a single arena to a batch of buffers that have lifetime intervals, where buffers with overlapping lifetimes may not overlap in memory. plan_arena is empty, and you must implement a legal and as-compact-as-possible plan, and make the planning process itself fast. Th... |
kfc | wre-sched-fair-vtc-roundrobin-loop16 | vtc_fair_tenant_interleave | performance | 0 | 1 | 43.0923 | This is the fair-scheduling step of a multi-tenant serving scheduler (VTC-style fairness: one bursty tenant must not starve its neighbors). fair_interleave_order is empty; you must implement a round-robin interleaving order across tenants (every tenant's 1st item, then every tenant's 2nd item, …) and make it fast. The ... |
kfc | wre-spec-accept-slot-compact-loop16 | spec_decode_slot_compact | performance | 0 | 1 | 4.896368 | This is the commit step of speculative decoding: after the target model has verified a batch of draft trees, the accepted prefix of each request must be moved from the draft staging slots into that request's own paged KV table. The existing implementation is slow; you must accelerate this transfer plan — each request h... |
kfc | wre-stability-fused-gradclip-loop16 | fused_global_grad_clip | performance | 1 | 1 | 8.207081 | This is the gradient-clipping step of the training loop: all gradients are scaled by the same factor so that the L2 norm of all gradients concatenated together is bounded. clip_grads_by_global_norm is empty; you must implement it and make it fast on the GPU (H20) (avoiding many per-tensor kernel launches). The inputs a... |
kfc | wre-tp-allreduce-bias-fuse-loop16 | tp_allreduce_bias_fuse | performance | 1 | 1 | 7.8501 | This is the post-processing after all-reduce in tensor parallelism: the partial sums from each rank are reduced and then a bias is added, and the two steps can be fused. reduce_partials is empty; you must implement the reduce-plus-bias and make it fast on the GPU (H20). The inputs are the partial results from each rank... |
kfc | wre-verl-grpo-advantage-loop16 | grpo_rloo_advantage | implementation | 0 | 1 | null | This is group-relative advantage estimation in RL post-training (verl-style): the multiple responses sampled from the same prompt form a group, and each sample's advantage must be normalized relative to its own group. You must implement two estimators, GRPO and RLOO (this task only judges correctness, with binary scori... |
kfc | wro-brpc-rdma-blockpool-window-loop16 | rdma_blockpool_window | performance | 0 | 1 | 3.767532 | This is the hot path of RDMA transfer: before sending bytes, two questions must be answered — which registered memory region this address falls in, and which pre-sliced block tier (8KiB/64KiB/2MiB) this size should be sent from. The in-scope implementation is correct but slow (linearly scanning registered regions, adva... |
kfc | wro-colossalai-devicemesh-rank-collate-loop16 | device_mesh_group_planner | performance | 0 | 1 | 7.005358 | This is ColossalAI's device-mesh communication-group planner: devices are arranged on an N-dimensional logical mesh, and for a given device you must return the list of collinear devices along each mesh axis. The in-scope implementation is correct but slow — when it back-computes mesh coordinates into a global device id... |
kfc | wro-deepspeed-curriculum-cluster-select-loop16 | curriculum_cluster_select | performance | 0 | 1 | 20.777027 | This is the difficulty-cluster selection of DeepSpeed-style curriculum learning: according to the current curriculum stage, the batch to use is picked from the sample difficulty clusters. You may only edit curriculum_cluster.py; you must find the slow points within scope and drive down the wall-clock time of select_cur... |
kfc | wro-gbench-bigo-least-squares-loop16 | bigo_least_squares_fit | performance | 0 | 1 | 55.610556 | This is the empirical-complexity estimator in a microbenchmark framework, corresponding to Google Benchmark's ComputeBigO / MinimalLeastSq (src/complexity.cc). The existing implementation uses naive least squares to fit each candidate curve one by one and is slow; you must accelerate it while keeping the fitting result... |
kfc | wro-gbench-counter-finalize-loop16 | benchmark_counter_finalize | performance | 0 | 1 | 15.127159 | This is the per-counter finalization of a microbenchmark framework, corresponding to Google Benchmark's Finish (src/counter.cc) and the flag semantics of counter.h. The existing implementation is slow; once iterations/cpu_time/num_threads are known, you must convert each counter's raw value into its final value accordi... |
kfc | wro-megatron-moe-routing-fused-triton-loop16 | moe_routing_map_fuse | performance | 1 | 1 | 5.902762 | This is the MoE routing-preprocessing subsystem of NVIDIA Megatron-LM: it turns the token dispatcher's per-token expert selection into the dense structure that the downstream grouped computation consumes. Two operators run back to back (converting compact expert indices into a dense multi-hot routing map, then doing an... |
kfc | wro-megatron-moe-routing-map-pad-loop16 | moe_routing_map_pad | performance | 0 | 1 | 479.507333 | This is the MoE routing-map alignment padding of Megatron-LM: to align the expert GEMM, the number of tokens assigned to each expert must be padded up to some multiple. The in-scope implementation scans the routing map item by item in Python and is slow; you must vectorize it for speed, and the result must match (turni... |
kfc | wro-nccl-ib-multisend-wr-plan-loop16 | ib_multisend_wr_plan | performance | 0 | 1 | 4.909378 | This is the work-request orchestration InfiniBand transport performs before handing a batch of sends to the NIC: the credit window advertised by the receiver must be turned into a chain of RDMA work requests. The existing implementation advances 128-byte alignment byte by byte and repeatedly rescans the aggregate repor... |
kfc | wro-offload-layer-prefetch-ring-pipeline-loop16 | layer_prefetch_staging_ring | performance | 0 | 1 | 32.230499 | This is the per-layer prefetch scheduler used when weights don't fit in GPU memory: while computing layer l, the weights of subsequent layers are streamed in through a fixed ring of pinned staging slots. The existing prefetch_ring.py is correct but slow; you must accelerate this planning process (how to slice transfer ... |
kfc | wro-offload-policy-grid-search-loop16 | offload_policy_grid_search | performance | 0 | 1 | 56.516589 | This is the policy search of a single-GPU heterogeneous-offload inference runtime: the model doesn't fit, so each tensor family must be tiered across GPU / CPU DRAM / NVMe. The existing implementation materializes the entire placement-ratio simplex grid and then evaluates each point one by one, which is slow; you must ... |
kfc | wro-outlines-guide-transition-batch-loop16 | guided_decode_fsm_advance | performance | 0 | 1 | 136.988316 | This is the batched state advancement of regex-constrained (guided) decoding, corresponding to the advance step of the guide state machine in outlines. You may only edit guide_transition.py; you must find the slow points and drive down the wall-clock time of batch_advance. The inputs are a batch of current guide states... |
kfc | wro-sbert-paraphrase-mining-loop16 | paraphrase_mining_topk | performance | 0 | 1 | 45.338376 | This is sentence-transformers' all-pairs paraphrase mining: finding the most similar sentence pairs among a set of sentence vectors. The current baseline computes similarities with a triple Python loop, repeatedly rescans row by row for the maximum, and then dedupes in Python; you must restore it to production speed wi... |
kfc | wro-torchao-int8-rowwise-quant-loop16 | int8_rowwise_quant | performance | 1 | 1 | 902.116643 | This is the row-wise int8 quantization primitive in pytorch/ao (torchao), which during low-precision/int8 mixed-precision training quantizes a high-precision 2D tensor row by row using symmetric absmax. The in-scope implementation quantizes only one row at a time and is slow; you must vectorize it to speed it up. The i... |
kfc | wro-torchtitan-varlen-cu-seqlens-loop16 | varlen_cu_seqlens_build | performance | 0 | 1 | 2.806253 | This is a step in torchtitan that prepares metadata for variable-length attention: for a batch of documents packed together, it must compute the cumulative-length array (cu_seqlens). You may only edit varlen_cu_seqlens.py, and must bring down the wall-clock time of build_varlen_cu_seqlens. The input is the document-bou... |
kfc | wro-tvm-winograd-conv2d-transform-loop16 | winograd_conv2d_transform | performance | 0 | 1 | 891.920536 | This is the Winograd 3x3 convolution path (TVM-style) essential for CPU edge inference: it splits the activations into overlapping tiles, uses Cook-Toom constant matrices to map into the transform domain for element-wise multiplication, and then transforms back. The existing winograd_conv.py is correct but slow; you mu... |
kfc | wro-yogi-foreach-fused-loop16 | yogi_foreach_fused_step | performance | 1 | 1 | 5.291184 | This is one update step of the Yogi adaptive-moment optimizer in torch-optimizer (which maintains a moving average of gradients and a sign-based second-moment estimate per parameter). The in-scope implementation updates parameter tensors one at a time in a Python loop and is slow; you must speed up this step with a for... |
lh | wli-fla-kkt-solvetril-build | wy_ut_transform_solve_tril | implementation | 1 | 1 | null | This is the intra-chunk WY/UT transform in fla-org/flash-linear-attention (a flagship open-source LLM-infra kernel library), the intra-chunk mixing primitive for delta-rule and gated-delta linear attention. The implementation across two coupled files is for you to complete: compute the A matrix and solve T=(I+A)^{-1} (... |
lh | wli-torchtitan-gptoss-expert-compute | gptoss_moe_expert_compute | implementation | 0 | 1 | null | This is the expert computation of the gpt-oss MoE layer in torchtitan (PyTorch's native LLM training platform), with two coupled files on the per-token forward path. You must fix the routing counts and the grouped SwiGLU expert computation: build the one-hot routing map and reduce it into per-expert token counts, then ... |
lh | wro-blocksparse-gemm-sol | kblock_sparse_fp16_matmul | performance | 1 | 16 | 26.560385 | This is the matrix-multiply subsystem for structured K-block-sparse weights times fp16 activations: the K rows are split into several contiguous row blocks, only some blocks are non-zero (input-feature block pruning), and the weights are stored in compressed form. The existing blocksp_matmul is correct but slow; you mu... |
lh | wro-causal-delivery-vclock-coupled | causal_delivery_vclock | performance | 0 | 16 | 187.500717 | This is the delivery layer of a causal-broadcast messaging system: the receiver must hand messages to the application in happens-before order, buffering out-of-order arrivals first. The two coupled files under causal/ are correct but slow when there are many out-of-order arrivals; you must speed up the buffering and de... |
lh | wro-fla-abc-chunkscan-sol | abc_gated_slot_recurrence | performance | 1 | 16 | 578.380265 | This is chunk_abc, a two-stage gated linear-recurrence operator in flash-linear-attention with bounded slot memory. The existing implementation is correct but slow; you must speed up this chunk scan while preserving its numerical behavior. The input is per-step q/k/v and slot logits, and the output is the output stream... |
lh | wro-fla-gated-delta-chunkscan-sol | gated_deltanet_chunk_scan | performance | 1 | 16 | 822.619615 | This is the chunk forward of Gated DeltaNet (gated delta-rule linear attention) in flash-linear-attention, spanning three coupled files. The existing implementation is correct but slow; you must make it fast: at each step the state first decays by a scalar log-domain forget gate, then undergoes a beta-weighted delta up... |
lh | wro-fla-nsa-sparse-sol | native_sparse_attn_select | performance | 1 | 16 | 1,036.420558 | This is parallel_nsa, the selection path of Native Sparse Attention (NSA) in flash-linear-attention. The existing implementation is correct but slow; you must make it fast: under a causal mask, each query attends only to the keys within its own selected KV blocks. The input is q/k/v and the per-query selected block ind... |
lh | wro-fla-ttt-chunkscan-sol | ttt_linear_chunk_scan | performance | 1 | 16 | 63.173556 | This is chunk_ttt_linear, the test-time-training (TTT) linear layer in flash-linear-attention. The existing implementation is correct but slow; you must make it fast: the sequence is processed in mini-batches, and each batch performs one inner-loop gradient update to the fast-weight state under a layer-norm reconstruct... |
lh | wro-fla-wallattn-flash-sol | windowed_decay_attention | performance | 1 | 16 | 308.863663 | This is parallel_wall_attn, the sliding-window decayed attention in flash-linear-attention, with per-channel multiplicative decay. The existing implementation is correct but slow; you must make it fast (the logit contains a difference of the log-domain prefix P=cumsum(g)/ln2). The input is q/k/v and the per-channel log... |
lh | wro-flashattn-cute-blocksparse-bwd | blocksparse_attn_backward | performance | 1 | 16 | 49.008492 | This is the differentiable block-sparse multi-head attention in the flash-attention CuTe version: given the allowed (query-block, key-block) pairs, a query may only attend to keys within the allowed blocks. The existing implementation is correct but slow; you must make both the forward and the backward(dout) pass fast,... |
lh | wro-flashattn-cute-blocksparse | blocksparse_attn_forward | performance | 1 | 16 | 189.21 | This is the forward of block-sparse multi-head attention in the flash-attention CuTe version: a query may only attend to keys within the allowed (query-block, key-block) pairs. The existing implementation is correct but slow; you must make the forward fast, and neither the signature nor the block-sparse mask semantics ... |
lh | wro-flashattn-cute-scoremod-tanh | attn_score_mod_tanh | performance | 1 | 16 | 31.37 | This is the attention forward with a user-defined score modification in the flash-attention CuTe version: before softmax, a callable transform is applied to each scaled score. The existing implementation is correct but slow; you must make this gated-tanh-form score-mod path fast (it may include a causal mask and groupe... |
lh | wro-llamacpp-simd-q5k | q5k_q8k_simd_dot | performance | 0 | 16 | 11.53 | This is the CPU hot-path kernel ggml_vec_dot_q5_K_q8_K in the ggml tensor library used by llama.cpp: the dot product of a 5-bit K-quantized weight row with its paired activation row. The x86 implementation is slow; you must speed up this dot product with SIMD while reproducing results bit-for-bit. The input is paired Q... |
lh | wro-lora-punica-fused | punica_multilora_shrink_expand | performance | 1 | 16 | 16.59 | This is vLLM's Punica-style batched multi-LoRA application subsystem (a two-stage shrink → expand path), spanning three Triton kernel files. The existing implementation is correct but slow; you must make it fast within a 2% relative tolerance (fp16 inputs, fp32 accumulation). The inputs are the batched activations toge... |
lh | wro-memory-accounting-sim-coupled | memory_plan_peak_accounting | performance | 0 | 16 | 1,344.398352 | This is a memory planner and OOM predictor for training/inference execution plans: each tensor is allocated at some step and freed at another, occupying nbytes while it is live. The two coupled files under memsim/ are correct but slow on large plans and under repeated peak queries; you must make the step-by-step usage,... |
lh | wro-secure-agg-shamir-committee-coupled | shamir_secure_aggregation | performance | 0 | 16 | 57.658178 | This is the server side of a privacy-preserving (secure aggregation) system: clients mask their model updates and split them across a committee using Shamir secret sharing, and the server reconstructs the aggregated value from these shares. The two coupled files under secureagg/ are correct but slow when reconstructing... |
lh | wro-sp24mm-matmul-sol | sparse_2_4_fp16_matmul | performance | 1 | 16 | 10.28458 | This is a matmul subsystem multiplying 2:4 semi-structured sparse weights by fp16 activations: within every 4 consecutive K rows exactly 2 are nonzero, and the weights are stored in a compressed format (values + 2-bit position metadata). The existing sp24mm_matmul is correct but slow; you must make it fast, and you may... |
lh | wro-ssm-ssd-chunkscan | mamba2_ssd_chunk_scan | performance | 1 | 16 | 467.4 | This is vLLM's Mamba-2 SSD (state-space dual) sequence-scan subsystem, where five coupled files make up the full chunk-scan pipeline. The existing implementation is correct but slow; you must make it fast within a given tolerance, and your changes may only land within the declared scope. The inputs are the sequence's s... |
lh | wro-vllm-v1-priority-request-queue | vllm_priority_request_queue | performance | 0 | 16 | 312 | This is the priority request queue of the vLLM V1 scheduler, which dequeues in ascending order of (priority, arrival_time, insertion order). It currently uses an unordered list: enqueue is O(1), but every peek/pop linearly scans for the minimum (draining n items is O(n^2)); you must make it fast while keeping the deque... |
lh | wro-w8a16-groupdequant-matmul-sol | w8a16_group_dequant_matmul | performance | 1 | 16 | 6.42047 | This is a matmul subsystem multiplying group-quantized int8 weights by fp16 activations: along the K dimension, every group_size rows share one (scale, zero-point) pair. The existing w8a16_matmul is correct but slow; you must make the dequantization and the matmul fast (ideally fusing away the intermediate dense weight... |
e2e | a3-moe-train-budget | moe_train_wallclock_budget | performance | 1 | 16 | 1.533748 | You are given the complete karpathy/nanoGPT training system (/app/repo, freely modifiable) and a pre-tokenized WikiText-103 corpus, on a single H20. Within the fixed wall-clock budget set by the framework, train the best MoE language model you can, while satisfying a hard lower bound on total parameter count (parameter... |
e2e | a4-token-efficiency-budget | lm_train_token_budget | performance | 1 | 16 | 1.204528 | Again the complete nanoGPT training system plus the WikiText-103 corpus on a single H20, but the budget is now switched to a fixed number of training tokens. Train the best language model you can without exceeding the given token budget — because the budget is tokens rather than time, merely raising throughput does not... |
e2e | a8-peft-adapter-byte-golf | peft_adapter_byte_budget | performance | 1 | 16 | 1.232658 | You are given the complete huggingface/peft source, a frozen Qwen2.5-0.5B-Instruct base model, a single H20, and a corpus of real distributed-training system code. Adapt this frozen base as well as you can to the corpus's domain, but the adaptation artifacts you may deliver (adapter weights + loading code) are hard-cap... |
e2e | checkpoint-transfer-integrity | checkpoint_transfer_integrity | implementation | 0 | 1 | null | This is a checkpoint tiered-transfer integrity-and-recovery task, semantically aligned with real systems such as NeMo's S3CheckpointIO. You must implement the CheckpointTransfer class: slice the checkpoint binary into chunks, compute a crc32 per chunk and generate a manifest, perform an all-or-nothing durable upload, v... |
e2e | embed-compress-golf | embedding_compress_retrieval | performance | 0 | 16 | 1.429024 | You are given a complete UKPLab/sentence-transformers checkout and a frozen 384-dimensional all-MiniLM-L6-v2, in an environment with 8 CPU cores, no GPU, and no internet. Under a hard budget of at most 64 bytes per vector (384-dim fp32, or even int8, won't fit, so heavy compression is required), make the nDCG@10 on the... |
e2e | eval-scoring-throughput | eval_harness_scoring_throughput | performance | 0 | 16 | 2.24419 | You are given a complete EleutherAI/lm-evaluation-harness checkout (editable-installable), in an environment with 8 CPU cores and no GPU — what is under evaluation is the pure-CPU scoring/aggregation pipeline that runs after model inference. You must optimize this end-to-end throughput: regex answer extraction, the tak... |
e2e | kv-traffic-sol | paged_kv_cache_traffic | performance | 1 | 16 | 2.579932 | You are given a complete vLLM 0.10.1.1 source tree (importable, with torch/triton present) on a single H20 — the task is the movement bandwidth of the paged KV cache. A large fraction of an inference engine's memory bandwidth is spent moving the KV cache, and you must bring these movements as close as possible to the h... |
e2e | tiered-storage-io | tiered_storage_engine | implementation | 0 | 1 | null | This is a tiered-storage engine and cross-tier consistency task, semantically aligned with real systems such as seaweedfs volume-tier, RocketMQ TieredMessageStore, and Kafka RemoteLogManager. You must implement TieredStore: a capacity-limited in-memory hot tier layered over a durable cold tier, supporting size-driven L... |
e2e | varlen-prefill-attn-sol | varlen_causal_prefill_attn | performance | 1 | 16 | 1.5317 | You are given a complete vLLM 0.10.1.1 source tree on a single H20 — the task is variable-length causal prefill attention in a continuous-batching engine. A batch of prompts is packed into one flat tensor, with a cumulative-length array describing the boundaries; you must bring this one prefill as close as possible to ... |
e2e | vllm-scheduler-mixed-batch-serving | vllm_continuous_batch_serving | performance | 1 | 16 | 1.285711 | You are given a vLLM OpenAI-compatible serving instance running on a single H20, up against a strong baseline that has already been hardened on the scheduling side (CUDA graph enabled, chunked-prefill token budget tuned, etc.). Without changing the greedy outputs at all, you must make this service serve the hidden mixe... |
Φ-Bench: Can Large Language Models Engineer the Infrastructure That Powers Them?
The Frontier AI Infrastructure Benchmark for evaluating frontier LLMs and autonomous coding agents on real-world ML systems and LLM infrastructure engineering — also written FAI-Bench / ΦBench.
85 open-source LLM-infrastructure engineering tasks — build a public Docker image, solve the task offline, and score against a grader shipped with the package.
🔗 llminfrabench.com
🌐 English · 简体中文
Contents
- Abstract
- Benchmark Overview
- Directory shape
- Running a Task
- Using the Task Runner
- Important Conventions
- Reproducibility
- Package Verification
- License
Abstract
Large language models (LLMs) have demonstrated remarkable capabilities in reasoning and code generation, raising the prospect that they could help develop and optimize the very infrastructure that powers them. However, existing benchmarks mainly focus on isolated GPU kernels, predefined operators, or pre-specified optimization targets. They therefore do not fully evaluate open-ended, long-horizon LLM infrastructure engineering, where an LLM must navigate a real codebase, identify bottlenecks, and iteratively implement, profile, debug, and refine a solution. Prior benchmarks such as KernelBench, TritonBench, and FlashInfer-Bench have established valuable testbeds for GPU kernel generation and optimization, while more recent efforts such as ISO-Bench and CUDAHercules have explored broader repository-level optimization settings. Nevertheless, these evaluation settings are generally centered on predefined functions, operators, or optimization objectives, leaving open-ended, long-horizon infrastructure engineering underexplored.
To address this gap, we present Φ-Bench (Frontier AI Infrastructure Benchmark), a benchmark for systematically evaluating LLMs on engineering the LLM infrastructure stack. Derived from problems studied in frontier systems research and grounded in real-world open-source repositories, Φ-Bench provides broad coverage of AI infrastructure for LLM training and inference. Its 85 tasks span three progressively broader settings: Kernel Function Completion (KFC), Long-Horizon Implementation (LHI), and End-to-End Optimization (E2EO). Together they range from localized CUDA/GPU kernel implementation and optimization to repository-scale development and open-ended system optimization.
Experiments on frontier LLMs reveal their current capabilities and limitations in engineering complex LLM infrastructure, offering insights into the challenges that remain on the path toward autonomous optimization of future AI infrastructure.
Benchmark Overview
Every task ships a self-contained public Dockerfile — git clone + docker build reproduces the environment, and the scoring surface is released with the package. All tasks are allow_internet = false: both solving and scoring run offline, so every dependency (including model weights and datasets) is baked into the image at docker build time.
| Subset | Tasks | Task type |
|---|---|---|
tasks/kfc/ |
55 | Single-kernel implementation and optimization |
tasks/lh/ |
20 | Long-horizon repository-level development |
tasks/e2e/ |
10 | End-to-end system optimization |
Machine-readable index: tasks_index.json (85 entries — package root / layout / GPU / scope / anchor / oracle availability per task). Scoring formulas: SCORING.md.
Directory shape
fai_bench/
├── tasks_index.json index of 85 tasks
├── SCORING.md formulas for the two reward classes
├── scripts/verify_package.py self-check: package structure + Dockerfile parseability + excavated-tree self-attestation
└── tasks/
├── kfc/<dir>/task/ ┐
├── e2e/<dir>/task/ ├ the three subsets place their **package root** differently — see package_root in tasks_index.json
└── lh/<dir>/ ┘ (lh is flat; kfc/e2e have an extra task/ level)
The package root (i.e. the docker build context) contains exactly these, and nothing else:
<package_root>/
├── instruction.md the only input visible to the model
├── task.toml resources, scoring entrypoint, primary_metric, docker_image
├── .dockerignore must live at the context root (docker does not read environment/.dockerignore)
├── environment/
│ ├── Dockerfile ★ self-contained public recipe (public base + public sources + pinned versions)
│ ├── repo/ the excavated working tree (vendored; present for 75 tasks)
│ ├── runtime/ entrypoint.sh / timer.sh / run_dev_bench.sh
│ ├── loop/ in-session self-eval harness (76 tasks have it; 26 of those actually run 1–16 rounds,
│ │ the other 50 are kfc with MIN=MAX=1, single submission — see SCORING.md)
│ └── … submission / dev_bench / stubs / workspace (per task)
├── tests/ scoring surface: test.sh + compute_reward.py + workloads + anchors
└── solution/ ★ reviewer-only: reference implementation / oracle patch (83 tasks have it)
Running a Task
cd <package_root>
docker buildx build -f environment/Dockerfile -t <docker_image from task.toml> .
docker run --rm [--gpus all] -it <image> # agent solves inside the container
docker run --rm [--gpus all] -v "$PWD/tests:/tests:ro" <image> bash /tests/test.sh
cat /logs/verifier/reward.json # the reward field is this task's score
Every task's Dockerfile header spells out the four copy-paste commands (build / run / score / re-calibrate), along with that task's version anchors and working-tree provenance (the PROVENANCE block: which image digest it was restored from, by what method, and how it was verified).
Network egress needed at build time (varies by task; cross-check tasks_index.json): all tasks need apt and PyPI; 5 tasks need git clone from public GitHub; 5 e2e tasks pull model weights (~GB) from HuggingFace. BuildKit is required: the packages use RUN <cmd> <<'PY' … PY heredocs, so use Docker ≥ 23 + buildx (docker buildx build) — the classic builder cannot parse this syntax.
Mirror-network note: 11 tasks write
pip install --index-url https://download.pytorch.org/whl/....--index-urlreplaces the primary index, so if your network can only reach an internal PyPI mirror, these 11 will fail to fetch torch — change it to--extra-index-urlfor compatibility with both networks (behavior is unchanged when public internet is available). The other 45 tasks already use--extra-index-urland are unaffected.
Using the Task Runner
scripts/run_task.py strings the manual commands above into one flow (build → agent → score → reward). It is single-file and stdlib-only (runs on any Python ≥ 3.8; below 3.11 it falls back to a built-in TOML parser, no tomli needed) and does build → start container → invoke agent → collect artifacts → mount tests/ for scoring → aggregate reward in one command:
# Solve a task with claude-code / codex (the agent CLI is not in the image; it is injected at runtime)
python3 scripts/run_task.py --task tasks/kfc/<dir> --agent claude-code --model claude-opus-5 \
--agent-bin /path/to/claude # or --agent-install to install it inside the container
python3 scripts/run_task.py --task tasks/e2e/<dir> --agent codex --model gpt-5.6 --agent-install
# Two self-check paths that don't call a model:
python3 scripts/run_task.py --task tasks/lh/<dir> --agent oracle # runs solution/solve.sh, should hit the task's reference score
python3 scripts/run_task.py --task tasks/kfc/<dir> --agent none # scores the pristine baseline, should be ≈ 0
# Sample / full sweep:
python3 scripts/run_task.py --tasks-root tasks --n-tasks 10 --sample-seed 0 --agent claude-code
Key points:
- The submission contract is "working-tree style," not
git commit. The agent edits the allowed files directly and leaves the changes in the working tree — scoring reads the tree's diff against the baked-in baseline commit (pre_artifacts.shcaptures it withgit add -AN+git diff HEAD, without moving HEAD). This lets any file-editing scaffold plug in — swapping between claude-code / codex / mini-swe-agent needs no task change. Do not let the agent commit — once HEAD moves, the scope gate and thegit checkout HEAD -- <scope>baseline capture both break, and a correct solution gets scored 0. - The agent CLI is injected at runtime: the open-source images deliberately ship no agent (verified: zero hits across 91/91 Dockerfiles).
--agent-bin <host path>mounts the CLI in read-only, or--agent-installinstalls a public npm package inside the container. GPT-family models usecodex; everything else usesclaude-code. - Network: all tasks are
allow_internet = false. Scoring is always--network=none; the agent step is offline by default too, opening only that agent's minimal allowlist when a model API must be called (--agent-net proxy --net-proxy URL, enforced by the proxy). - Mirror-network builds: add
--build-network hostat build time soRUNsteps can reach the PyPI/apt mirrors your host can see (off by default; not needed on public internet). - Outputs:
runs/<task>-<agent>-<model>-<ts>/{build.log,agent.log,verify.log,artifacts/,verifier/,run.json}, plus one line per task inruns/summary.jsonl.
The --agent oracle path doubles as the runner's own self-check: it invokes each task's solution/solve.sh, lands the reference implementation the same way an agent submission would (working tree, no commit), then runs normal candidate scoring — and should hit that task's reference score exactly.
Important Conventions
1. tests/ is released with the package but is NEVER baked into the image. It is mounted at /tests only at scoring time. Reason: hidden cases, strong baselines, and calibration anchors all live inside — baking it in would make them readable/editable while solving. solution/ is the same: reviewer-only, not in the image, not run during scoring.
2. Performance anchors are calibration constants — changing hardware requires re-calibration. The reward has the form min(1, ln(speedup/ref_speedup)/ln(ref_speedup)) (tie the ref_speedup and you get 0 — you must exceed it; see SCORING.md). ref_speedup is read-only at scoring time; the oracle is not re-run. 77 tasks have anchors; the calibration conditions are written in each task's tests/ref_speedup.caveat.md or the manifest's hardware_caveat field, with a copy-paste re-calibration command alongside. Calibration runs on two channels: GPU tasks on an NVIDIA H20, CPU tasks on the authors' CPU channel (Intel Sapphire Rapids) — each task records its own real calibration environment, so do not treat them as one unified setup.
# Patch form (most kfc / lh):
docker run --rm [--gpus all] -v "$PWD/tests:/tests:ro" -v "$PWD/solution:/patches:ro" \
-e KERNELBENCH_VERIFY_MODE=oracle -e KERNELBENCH_ORACLE_PATCH=/patches/oracle.patch \
<image> bash /tests/test.sh
# Single-file form (some tasks' reference is a variant of a whole file, not a patch):
-e KERNELBENCH_VERIFY_MODE=oracle -e KERNELBENCH_ORACLE_FILE=/patches/kernel_oracle.py
Self-attestation: noop (no change) should score ≈ the no-op value; negative must score 0. 83 tasks ship a reference patch/oracle and can use this path directly; only 2 tasks (kfc/wro-offload-layer-prefetch-ring-pipeline-loop16, kfc/wro-offload-policy-grid-search-loop16) do not, and their caveats note "anchor is not comparable across hardware — calibrate it yourself."
Note the anchor resolution chain: tests/ref_speedup.txt → in-image /opt/verifier-correctness-manifest.json → 1.0. The in-image copy deliberately omits the real anchor (it is readable by the solver), and ref_speedup <= 1 is a hard gate, so you must mount tests/ — otherwise it fails loudly with "anchor invalid" rather than emitting a wrong score. Also, tests/ref_speedup.txt is parsed with tr -dc '0-9.' — do not add any comments to it; any text containing digits or a decimal point will pollute the anchor value.
Reproducibility
For the kfc / lh subsets, the starting implementation is "an upstream library with a chunk excavated out." It is not cloned — the original image was assembled from a prebuilt tarball with no recorded upstream commit, so a clone cannot pin the scored bytes. Therefore environment/repo/ is restored from the original image and vendored, and it is self-attesting:
git apply --check -p1 solution/oracle.patchmust apply cleanly forward ontoenvironment/repo/and fail to apply in reverse — proving this tree is exactly the excavated baseline the reference patch was generated against.scripts/verify_package.pyruns this gate per task.
When several tasks in one family share an upstream tree, every family member's scope files in that tree are held in the excavated state (otherwise one task's image would contain another's answer); a build-time assertion checks this.
The vendored tree is upstream code byte-for-byte — the third-party URLs, sample configs, even upstream's own committed internal proxy hints that appear inside it are all upstream content and, per the self-attestation gate, must stay unchanged.
Package Verification
python3 scripts/verify_package.py # full self-check (85 tasks; archived delete_* tasks are auto-skipped)
python3 scripts/verify_package.py kfc lh # check only some subsets
The self-check is read-only and derives all paths from the script's own location, so it runs anywhere you clone it. It verifies:
required files present · task.toml parses · tests/test.sh present and, for performance tasks, the anchor resolves (no silent fallback to 1.0) ·
Dockerfile parses (heredoc pairing, no dangling continuations, all COPY sources in the build context and not excluded by .dockerignore,
every RUN shell body passes bash -n) · anchor and caveat consistent · excavated-tree self-attestation (oracle.patch must apply forward
and fail in reverse) · no __pycache__ / *.bak leftovers · the runnable triad (each task's pre_artifacts.sh
and solution/solve.sh exist, are executable, pass bash -n; solve.sh has a four-state CLI; task.toml is
schema_version="2.0"). tasks_index.json ships with the package; you do not need to rebuild it.
License
fai_bench's own work — task specs (instruction.md / task.toml), graders (tests/**), reference solutions (solution/**), the loop16 harness (environment/loop*/**), the runner and self-check (scripts/**), and the documentation — is licensed under the Apache License 2.0 (see LICENSE).
The vendored upstream code under environment/repo/ (nanoGPT, torchtitan, vLLM, llama.cpp, Megatron-LM, ColossalAI, flash-linear-attention, …) and the model weights / datasets fetched from public sources at build time (Qwen2.5, all-MiniLM-L6-v2, wikitext, …) each retain their original license and copyright and are not covered by this repository's Apache-2.0 grant — see NOTICE. The LICENSE / COPYING file inside each vendored tree is its authoritative license.
What it covers. GPU/CUDA kernel optimization, distributed training, inference & serving (vLLM), low-precision & quantization, communication/collectives, checkpointing & storage, MoE routing, attention & state-space kernels — 85 self-contained, Docker-reproducible tasks with offline graders and reference solutions.
Cite as:
@misc{faibench2026,
title = {$\Phi$-Bench: Can Large Language Models Engineer the Infrastructure That Powers Them?},
author = {Φ-Bench contributors},
year = {2026},
url = {http://llminfrabench.com/}
}
- Downloads last month
- 1,202