Hanshi Sun

ByteDance (China) · Carnegie Mellon University
5 previous affiliations
9Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Hanshi Sun focuses on machine learning systems, specifically targeting the efficiency of large language model inference and long-context generation. His early work addressed benchmarking for medical anomaly detection before shifting toward system-level optimizations for autoregressive decoding. Currently, his research emphasizes memory management, key-value cache compression, and distributed tensor programming to accelerate foundation models.

Research Trajectory

His early research addressed computer vision and medical imaging. In 2023, he introduced BMAD: Benchmarks for Medical Anomaly Detection, establishing a comprehensive evaluation framework to overcome the lack of standardized metrics in the area of Non-Parametric Feature Retrieval for Anomaly Detection. This benchmark reorganized multiple datasets to facilitate the development of more robust and generalized anomaly detection methods for medical diagnosis.

Transitioning to machine learning systems, his focus shifted toward optimizing large language model (LLM) inference. In 2024, he developed Fast Best-of-N Decoding via Speculative Rejection, an inference-time alignment algorithm that early-stops unpromising responses based on partial reward scores. By achieving significant efficiency improvements, this approach allows single-GPU setups to match the alignment performance of larger clusters, contributing to the broader field of Dynamic Memory Aware Batching for High Throughput LLMs. That same year, he addressed the growing memory bottleneck of key-value (KV) caches in long-sequence generation with TriForce: Lossless Acceleration of Long Sequence Generation with Hierarchical Speculative Decoding. Recognizing that the auto-regressive nature of LLMs leads to low utilization of computational cores, he proposed a hierarchical approach that advanced the research direction of Hierarchical Speculative Decoding for Accelerated Inference without degrading generation quality.

Continuing to target memory constraints in 2025, he proposed ShadowKV: KV Cache in Shadows for High-Throughput Long-Context LLM Inference. This system offloads value caches to the CPU while retaining low-rank key projections on the GPU, enabling substantially larger batch sizes and higher throughput on hardware like the A100 GPU. This contribution aligns with ongoing efforts in the area of The Memory Bandwidth Bottleneck in Transformer Decoding. He also collaborated on HeadInfer: Memory-Efficient LLM Inference by Head-wise Offloading, which intelligently offloads individual attention heads' KV cache to CPU RAM to support extremely long contexts on consumer-grade hardware. Further extending this focus on the research direction of Scaling Inference Throughput via KV Cache Memory Efficiency, he participated in the development of R-KV: Redundancy-aware KV Cache Compression for Reasoning Models. This method identifies and evicts redundant tokens during generation, specifically managing the massive "Chain-of-Thought" outputs characteristic of reasoning models to achieve high memory savings and throughput boosts.

Most recently, his work has expanded into distributed systems and compiler optimizations. He contributed to DITRON: Distributed Multi-level Tiling Compiler for Parallel Tensor Programs, a hierarchical tile-level compiler introduced in 2026. By utilizing a three-level abstraction model—Core, Device, and Task—this system simplifies distributed tensor programming for LLMs, aiming to match or exceed the performance of expert-tuned libraries and save extensive computational resources in production environments.

Current Directions

Recent work investigates the intersection of memory management and distributed systems to support the next generation of large language models. The most recent papers in the evidence address the severe memory bottlenecks caused by KV caches during long-context and reasoning-heavy generation tasks. By exploring techniques such as redundancy-aware cache eviction, head-wise offloading, and hierarchical speculative decoding, this research seeks to maximize GPU utilization and throughput. Additionally, ongoing efforts involve compiler-level optimizations for parallel tensor programs, aiming to simplify distributed execution and improve the scalability of foundation models across complex hardware topologies.

Profile updated

See something wrong? Report a mistake