Palu는 매 iteration마다 SVD를 적용하는 대신, projection weight를 SVD함으로서 보다 효과적인 압축 방식을 채택했다. 즉, 를 where 로 보고 low rank projection을 통해 압축을 진행하는 것이다.
이렇게 down-projection과 up-projection을 on-the-fly로 진행하며 메모리를 크게 감소시킨다.
Palu는 key, value linear layer를 분해함으로서 구현된다. 아래 식과 같이 이해할 수 있다. 이 때, Value 에서 reconstruction matrix를 output projection matrix로 fuse 할 수 있어 explicit reconstruction을 하지 않고도 simple하게 reconstruction을 가능케한다.
마찬가지로, key에서는 query layer에 reconstruction matrix를 fuse 할 수 있어 역시 간결한 계산이 가능하다.
positional embedding과의 compatibility를 위하여, custom GPU kernel을 완성했다. key construction, RoPE, Query-key multiplication을 하나의 fused operation으로 진행하여 off-chip memory footprint를 최소화 한다. ALiBI와 같은 key에 직접 적용되지 않는 Postiional embedding 은 커널을 필요로 하지 않으며, 더 많은 speed up을 가능케 한다!
.
.