메모리 효율적인 행렬-벡터 곱셈을 위한 하이브리드 압축
Hybrid Compression for Memory-Efficient Matrix-Vector Multiplication
한국어 초록
반복적 머신러닝 알고리즘은 행렬-벡터 곱을 통해 대규모 실수 행렬에 반복적으로 접근하며, 이들의 성능은 연산 처리량이 아니라 메모리 대역폭에 의해 제한된다. 압축된 데이터에 대해 직접 계산을 지원하는 무손실 압축 기법은 이러한 워크로드에서 이동하는 데이터량과 메모리 사용량을 모두 줄인다. mm-RePair 프레임워크 [11]는 행렬의 Compressed Sparse Row/Value(CSRV) 표현에 RePair 문법 압축기를 적용하고 압축된 데이터에 대해 직접 행렬-벡터 곱셈을 수행하는 방식으로 이러한 접근을 따른다. 그러나 행렬이 조밀하거나 서로 다른 값이 많이 포함된 경우에는 그 효과가 떨어진다. 본 논문에서는 문법 압축과 엔트로피 압축을 결합한 mm-RePair 프레임워크용 하이브리드 전략을 제시한다. CSRV 시퀀스는 mm-RePair가 효과적으로 압축할 수 있는 항목으로 구성된 문법 압축 가능 성분과, 나머지 항목을 담으며 ans-fold 코더 [24]로 부호화되는 엔트로피 압축 가능 성분으로 분할된다. CSRV 표현에서 각 행의 항목을 정렬하고 델타 부호화하며 알파벳을 연속 범위로 재매핑하면 압축률이 더욱 향상된다. 단어 임베딩과 트랜스포머 은닉 상태를 포함한 실수형 머신러닝 행렬에 대한 실험 결과, 제안한 하이브리드 전략은 모든 입력에서 원래의 \mmRepair보다 더 간결하며 곱셈 시 최대 메모리 사용량을 줄이는 것으로 나타났고, 서로 다른 값이 많은 조밀 행렬에서 이득이 가장 컸으며 곱셈 시간은 경쟁력을 유지하였다. 또한 대부분의 행렬에서 \mmRepair의 열 재정렬 변형보다 우수하며, 두 방법을 결합하면 희소 행렬에서 더욱 간결해지지만 압축 시간이 훨씬 길어지는 대가가 따른다. 마지막으로, 제안한 전략은 원래의 \mmRepair와 마찬가지로 스레드 수에 따라 확장된다.
원문 초록
Iterative machine-learning algorithms repeatedly access large real-valued matrices through matrix-vector products, and their performance is limited by memory bandwidth rather than arithmetic throughput. Lossless compression schemes that support computation directly over the compressed data reduce both the data moved and the memory footprint of these workloads. The mm-RePair framework [11] follows this approach by applying the RePair grammar compressor to the Compressed Sparse Row/Value (CSRV) representation of a matrix and performing matrix-vector multiplications directly on the compressed data. Its effectiveness, however, degrades on matrices that are dense or contain many distinct values. In this paper we present a hybrid strategy for the mm-RePair framework that combines grammar and entropy compression. The CSRV sequence is partitioned into a grammar-compressible component, formed by the entries that mm-RePair can compress effectively, and an entropy-compressible component holding the remaining entries, which is encoded with the ans-fold coder [24]. Compression improves further by sorting and delta encoding the entries of each row in the CSRV representation, and by remapping the alphabet to a contiguous range. Experiments on real-valued machine-learning matrices, including word embeddings and transformer hidden states, show that our hybrid strategy is more compact than the original \mmRepair on every input and reduces the peak memory of multiplication, with the largest gains on dense matrices with many distinct values, at competitive multiplication times. It also outperforms the column-reordering variant of \mmRepair on most of the matrices, and combining the two is even more compact on the sparse ones, at the cost of a much longer compression time. Finally, our strategy scales with the number of threads as well as the original \mmRepair does.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
- arXiv:2611.18792v2제출 시각 미확인
- arXiv:2611.18792v1제출 시각 미확인
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.