Skip to main content
QUICK REVIEW

[논문 리뷰] Quad Length Codes for Lossless Compression of e4m3

Aditya Agrawal, Albert Magyar|arXiv (Cornell University)|2026. 02. 19.
Algorithms and Data CompressionComputer Science인용 수 0
한 줄 요약

Quad Length Codes를 도입합니다. 3비트 면적 프리픽스와 256-entry LUT를 사용하여 e4m3 데이터를 Huffman 코드보다 더 빠르고 단순한 디코딩으로 효율적으로 압축하는 4-length 하이브리드 코딩 체계입니다.

ABSTRACT

Training and serving Large Language Models (LLMs) relies heavily on parallelization and collective operations, which are frequently bottlenecked by network bandwidth. Lossless compression using e.g., Huffman codes can alleviate the issue, however, Huffman codes suffer from slow, bit-sequential decoding and high hardware complexity due to deep tree traversals. Universal codes e.g., Exponential-Golomb codes are faster to decode but do not exploit the symbol frequency distributions. To address these limitations, this paper introduces Quad Length Codes, a hybrid approach designed to balance compression efficiency with decoding speed. The coding scheme uses 3 prefix bits to divide the 256 symbols into 8 areas. Each area has a different code length and encodes a different number of symbols. The scheme uses a Look Up Table with 256 entries, significantly simplifying the hardware implementation compared to Huffman trees. The coding scheme can be adapted for different distributions. For the e4m3 data type, the scheme achieves a compressibility of 13.9% in comparison to 15.9% achieved by Huffman codes, but it significantly speeds up the decoding and simplifies the hardware complexity.

연구 동기 및 목표

  • 무손실 데이터 압축으로 LLM 학습/서빙의 네트워크 트래픽 감소를 목표로 한다.
  • 비비트 순차 디코딩을 가능하게 하면서 심볼 빈도 분포를 활용한다.
  • 소형 LUT 기반 인코더/디코더를 갖춘 하드웨어 친화적 코딩 체계를 제공한다.

제안 방법

  • e4m3 텐서의 심볼 분포를 분석한다(FFN1/FFN2 활성화, 가중치, 그래디언트).
  • 3 프리픽스 비트를 사용해 256 심볼을 8 영역으로 분할하여 4가지 코드 길이(6, 7, 8, 11 비트)를 얻도록 Quad Length Codes를 설계한다.
  • 확률이 높은 순으로 입력 심볼을 짧은 코드에 매핑하는 256-entry 인코더 LUT를 구현한다.
  • 코드 길이와 오프셋을 선택하기 위해 영역 코드를 사용하는 256-entry 디코더 LUT를 구현한다.
  • Gemma/유사 데이터 분포에 대해 Huffman 코딩과의 압축성 및 하드웨어 복잡성을 비교한다.
Figure 1: Sorted Probability Mass Function (PMF) of FFN1 activation.
Figure 1: Sorted Probability Mass Function (PMF) of FFN1 activation.

실험 결과

연구 질문

  • RQ1고정된 네 길이(쿼드) 코드 체계가 단순한 하드웨어와 비 비트 순차 디코딩을 가능하게 하면서 Huffman과 유사한 압축에 접근할 수 있는가?
  • RQ2영역 크기를 조정하는 것이 서로 다른 e4m3 분포(활성화, 그래디언트 등)에서 압축에 어떤 영향을 미치는가?
  • RQ3제안된 체계의 압축률과 디코딩 속도/복잡도 간의 트레이드오프는 무엇인가?
  • RQ4쿼드-길이 접근 방식이 텐서 유형(활성화, 가중치, 그래디언트) 및 데이터 분포에 걸쳐 이식 가능한가?

주요 결과

  • FFN1 활성화의 경우 Huffman은 15.9%의 압축성을 보이고; Quad Length Codes는 13.9%를 달성합니다(2.0% 낮음).
  • Quad Length 체계는 8 영역에 걸쳐 4가지 코드 길이(6, 7, 8, 11 비트)를 사용하여 256-entry LUT 인코더/디코더를 가능하게 한다.
  • 다른 심볼 빈도로 FFN2 활성 분포를 적용한 경우, 조정된 4길이 체계로 19.0%의 압축성을 얻어 원래 8-영역 표 1 설계의 16.7%보다 낫다.
  • 초기 쿼드 체계는 깊은 Huffman 트리 대비 하드웨어/디코드 복잡성을 줄이지만 압축 효율성은 다소 손실(주요 케이스에서 약 2pp).
  • 인코더는 확률에 따라 정렬된 256-entry LUT를 구축하고; 디코딩은 3비트 영역 프리픽스를 사용해 코드 길이와 오프셋을 결정하며 심볼 복구를 위한 256-entry LUT를 사용한다.
Figure 2: Huffman code lengths for each symbol.
Figure 2: Huffman code lengths for each symbol.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.