llm-agents long-context quantization nvfp4 prefilling agentic-inference efficiency bf16
Abstract
LLM agents have recently emerged as a powerful paradigm for solving complex tasks through planning, tool use, memory retrieval, and multi-step interaction. However, these agentic workflows often introduce substantial input-side overhead, making the compute-intensive prefilling stage a key bottleneck in long-context, multi-turn inference. In this work, we propose Mix-Quant, a simple and effective phase-aware quantization framework for fast agentic inference. We first investigate FP4 quantization in agentic LLM workflows and observe that quantizing the entire inference process can incur significant performance degradation. In contrast, the prefilling stage exhibits substantial quantization redundancy and can therefore be quantized with minimal accuracy loss, despite being the dominant source of computation. Based on this insight, we apply high-throughput NVFP4 quantization to the prefilling phase while preserving BF16 precision for decoding. By decoupling prefilling acceleration from decoding quality, Mix-Quant combines phase-aware algorithmic quantization with hardware-efficient NVFP4 execution to alleviate the inference bottleneck in LLM agents. Extensive experiments across long-context and agentic benchmarks demonstrate that Mix-Quant largely preserves task performance while delivering significant efficiency improvements, achieving up to a 3x speedup during prefilling.
한국어 요약
📋 한 줄 요약
**[LLM 추론 효율화 / 양자화]** 에이전트 LLM 워크플로우의 prefilling은 공격적으로 양자화하고 decoding은 BF16으로 유지하는 phase-aware 양자화 프레임워크 Mix-Quant 제안.
🎯 핵심 기여도
- 에이전트 워크플로우가 multi-turn long-context로 인해 compute-intensive prefilling이 지배적 병목임을 진단.
- 전체 추론을 FP4 양자화하면 성능이 크게 떨어지나, prefilling 단계는 양자화 중복성이 커서 작은 정확도 손실로 양자화 가능하다는 핵심 관찰.
- 고처리량 NVFP4 양자화를 prefilling에만 적용하고 decoding은 BF16으로 유지하는 phase-aware 양자화 Mix-Quant 제안.
- prefilling 가속과 decoding 품질을 분리해, 알고리즘적 phase-aware 양자화 + 하드웨어 효율적 NVFP4 실행 결합으로 long-context·에이전트 벤치마크에서 최대 3배 prefilling 가속 달성.
💡 핵심 아이디어
LLM 에이전트는 prefilling이 연산 비중을 지배하지만 동시에 더 양자화에 견고하므로, "비싼 단계는 공격적으로 양자화하고 민감한 단계는 보존"하는 단계별 차등 양자화로 효율-품질 트레이드오프를 깨뜨릴 수 있다.
🔬 기술적 접근법
- **모델/방법론**: phase-aware 양자화 프레임워크 Mix-Quant, NVFP4 prefilling × BF16 decoding 결합.
- **핵심 기법**: prefilling 단계의 양자화 중복성 측정 분석, NVFP4 하드웨어 효율적 커널 활용, decoding 정밀도 보존으로 long-output 품질 유지.
📊 주요 결과
- prefilling 단계 최대 3× 가속.
- long-context·에이전트 벤치마크 전반에서 태스크 성능 보존.
- 전체 FP4 대비 prefilling-only 양자화가 정확도 손실 최소화.
💭 의의 및 한계
**의의**: 에이전트 LLM의 실제 병목(prefilling)을 직접 겨냥하는 phase-aware 추론 가속 패러다임의 실증, NVFP4 시대의 실무적 처방 제공. **한계**: 평가가 NVFP4 가능한 최신 하드웨어에 종속, decoding이 길어지는 도메인에서는 가속 이득이 제한될 수 있음.
🚀 실용적 활용
- 멀티에이전트 시스템 서빙 비용 절감.
- long-context 회의 요약·문서 분석 워크플로우 가속.
- NVFP4 지원 GPU 환경의 표준 LLM 추론 최적화 레시피.