메뉴
HN
Hacker News 35일 전

900KB 트랜스포머로 100MB CSV 파일 7MB로 압축하기

IMP
6/10
핵심 요약

특정 파일의 패턴을 완벽하게 외우도록 오버피팅(Overfitting)된 900KB 크기의 트랜스포머 모델과 산술 부호화(Arithmetic coding)를 결합해 개별 파일을 압축하는 실험 결과가 공유되었습니다. 이 방식을 통해 반복적인 패턴이 많은 100MB 크기의 뉴욕 택시 CSV 데이터를 약 7MB 수준까지 극한으로 압축할 수 있었으며, AI를 활용한 새로운 데이터 압축 기법의 가능성을 보여줍니다.

번역된 본문

오버피팅된 트랜스포머(transformer)와 산술 부호화(arithmetic coding)를 결합하여 개별 파일을 압축하는 실험을 진행했습니다.

일반적인 모델처럼 범용성을 갖도록 훈련시키는 대신, 900KB 크기의 트랜스포머가 단일 파일을 완벽하게 암기하고 다음 바이트(byte)를 예측하도록 학습시켰습니다. 그런 다음 이 예측 데이터를 산술 부호화기에 입력하여 압축된 결과물을 생성합니다.

100MB 크기의 NYC 택시 CSV 파일은 약 7MB(~0.5 bits/byte)로 압축되었습니다. enwik9 데이터의 100MB 분량은 약 21MB(1.68 bits/byte)로 압축되었습니다.

현재로서는 속도가 꽤 느린 편입니다. AMD 7800XT 환경에서 훈련에 약 2030분이 소요되며, 압축 및 압축 해제 각각에 약 45분씩 걸립니다.

저장소(repo)를 확인해 보세요 - https://github.com/samyak112/pym-particles

원문 보기
원문 보기 (영어)
I built an experiment that uses an overfitted transformer and arithmetic coding to compress individual files.<p>Instead of training the model to generalize, I train a 900KB transformer to memorize a single file and predict the next byte. Those predictions are fed into an arithmetic coder to produce the compressed output.<p>On a 100MB NYC taxi CSV, it compresses to about 7MB (~0.5 bits&#x2F;byte). On a 100MB slice of enwik9, it compresses to about 21MB (~1.68 bits&#x2F;byte).<p>It&#x27;s pretty slow right now (roughly 20–30 minutes of training and 45 minutes each for compression and decompression on my AMD 7800XT).<p>Checkout the repo - <a href="https:&#x2F;&#x2F;github.com&#x2F;samyak112&#x2F;pym-particles" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;samyak112&#x2F;pym-particles</a>