프로필

설정

불러오는 중…

← 홈

도움말·문의

자주 묻는 질문

어떤 기능에 로그인이 필요한가요?

공개 논문의 해설과 논문 정보, 모델 구조, 관련 논문, 용어는 로그인 없이 볼 수 있습니다. 논문 올리기, 내 보관함, 읽기 기록, 논문 평가, 관심 분야 추천, 메일과 알림은 로그인해야 쓸 수 있습니다.

PDF 파일로도 올릴 수 있나요?

논문은 arXiv나 DOI 링크로 올리고, 해설은 모두에게 공개됩니다. 출처와 이용 조건이 확인되지 않아 해설을 공개할 수 없는 논문은 올릴 수 없습니다. PDF 파일 올리기와 나만 보기는 구독 회원만 쓸 수 있고, 파일로 올린 논문은 나만 보기로만 저장합니다. 제목으로 공식 정보를 찾는 검색은 버튼을 누를 때만 합니다.

그림과 AI 해설은 정확한가요?

그림은 논문 원본만 쓰고 이용 허락이 확인된 것만 보여 줍니다. 해설은 AI가 쓴 글이라 틀릴 수 있습니다. 중요한 주장과 수치, 그림의 맥락은 원문 근거로 확인해 주세요.

저작권 문제를 알리고 싶어요.

이용 조건과 원문 출처는 논문 정보 탭에 있습니다. 문제가 있으면 ‘문의하기’에서 ‘논문 내용·그림·저작권’을 골라 논문 링크와 문제가 되는 부분, 권리를 확인할 수 있는 근거를 보내 주세요. 접수만으로 권리가 확정되거나 바로 삭제되지는 않습니다. 검토 결과는 ‘내 문의’에서 볼 수 있습니다.

비밀번호를 잊었어요.

이메일로 가입했다면 로그인 창의 비밀번호 찾기에서 인증한 이메일로 다시 설정할 수 있습니다. Google, 네이버, 카카오로 가입했다면 그 서비스에서 비밀번호를 바꿔 주세요.

문의할 때 무엇을 적어야 하나요?

어느 화면에서 무엇을 하다 생긴 문제인지 논문 링크와 함께 적어 주세요. 비밀번호, API 키, 인증 코드, 전화번호 같은 개인정보는 적지 마세요. 문의와 답변은 Refivu에 저장되고 ‘내 문의’에서 볼 수 있습니다.

회원탈퇴는 어떻게 하나요?

설정의 내 계정에서 회원탈퇴를 누르세요. 지워지는 내용을 확인하고 본인 확인을 마치면 탈퇴됩니다. 다른 요청은 ‘문의하기’에서 ‘계정’을 골라 남겨 주세요.

논문 해설

LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale

LLM.int8(): 대규모 Transformer를 위한 8-bit 행렬 곱셈

  • 연구 문제 대규모 트랜스포머의 피드포워드와 어텐션 투영 행렬곱을 8-bit로 바꾸면 메모리는 줄지만, 6.7B 이상에서 나타나는 큰 크기 outlier 특징 때문에 성능이 무너지는 문제가 있습니다.
  • 연구 방법 벡터 단위 양자화로 행과 열마다 스케일을 나누고, 크기 6.0 이상인 outlier 특징 차원만 16-bit로 계산하는 혼합 정밀도 분해를 결합합니다.
  • 주요 결과 C4 perplexity에서 13B 모델의 LLM.int8()(vector-wise + decomp)은 12.45로 32-bit 기준선 12.45와 같지만, Int8 absmax vector-wise는 16.48로 기준선보다 높습니다. OPT 제로샷 평가에서도 LLM.int8()은 125M부터 175B까지 16-bit 수준을 유지한다고 보고합니다.

대규모 모델에서 8-bit 양자화가 무너지는 지점

대규모 트랜스포머의 추론 메모리는 피드포워드와 어텐션 투영 레이어의 가중치가 대부분을 차지합니다. 6.7B 이상 트랜스포머에서 이 레이어와 행렬곱은 소비되는 파라미터의 95%와 전체 연산의 65-85%를 담당하므로, 이 부분을 낮은 비트로 바꾸는 것이 메모리 문제의 핵심이 됩니다. 기존 8-bit 양자화 방법은 메모리를 줄이지만 성능을 떨어뜨리며, 주로 350M 파라미터 이하 모델에서만 연구되었습니다.

이 연구가 겨냥하는 어려움은 규모가 커질 때 나타나는 체계적인 큰 크기 특징입니다. 약 6.7B 파라미터부터 hidden state의 특정 특징 차원에 매우 큰 값이 나타나고, 이 값이 모든 트랜스포머 레이어로 퍼져 양자화 정밀도를 무너뜨립니다. 텐서 전체에 하나의 스케일링 상수를 쓰면 이런 큰 값 하나가 나머지 값들의 표현 정밀도를 떨어뜨립니다.

이 문제를 풀기 위해 두 부분으로 나눈 양자화 절차가 제안됩니다. 첫째는 행렬곱을 독립적인 내적의 연속으로 보고 더 많은 스케일링 상수를 쓰는 벡터 단위 양자화이며, 둘째는 큰 크기 outlier 특징 차원만 16-bit로 따로 계산하는 혼합 정밀도 분해입니다. 두 방법을 합친 LLM.int8()의 연구 범위는 추론 시점의 Int8 행렬곱이며, 적용 대상은 피드포워드와 어텐션 투영 레이어입니다.

행과 열에 스케일을 두는 벡터 단위 양자화

벡터 단위 양자화는 행렬곱을 독립적인 내적의 연속으로 봅니다. 입력 hidden state X의 각 행에는 하나의 스케일링 상수 \(c_x \in \mathbb{R}^s\)를, 가중치 W의 각 열에는 하나의 상수 \(c_w \in \mathbb{R}^o\)를 둡니다. 따라서 스케일링 상수는 텐서 전체의 하나가 아니라 내적 단위에 대응하는 수만큼 늘어납니다.

각 값은 절댓값 최댓값을 기준으로 Int8 범위에 맞춰집니다. 한 텐서에 대한 absmax 양자화는 다음과 같이 쓰입니다. \[ X^{i8} = \left\lfloor 127 \cdot \frac{X^{f16}}{\max_{ij}\left|X^{f16}_{ij}\right|} \right\rceil \] 여기서 ⌊ ⌉는 가장 가까운 정수로 반올림하는 기호입니다. 벡터 단위에서는 최댓값을 행 또는 열 단위로 계산하므로, 한 행의 큰 값이 다른 행의 스케일을 바꾸지 않습니다.

Int8 행렬곱의 결과는 Int32로 계산된 뒤 스케일링 상수의 외적으로 되돌아갑니다. 역양자화 식은 다음과 같습니다. \[ C^{f16} \approx \frac{1}{c_x^{f16} \otimes c_w^{f16}} \cdot C^{i32} \] 따라서 실제 흐름은 16-bit 입력에서 행과 열의 상수를 구하고, 값을 양자화한 뒤 Int8 행렬곱을 수행하고, 외적 상수로 되돌리는 순서입니다. 이 방법은 outlier 차원을 따로 처리하지 않으므로, 큰 크기 특징이 있는 열은 다음 절의 분해와 결합되어야 합니다.

outlier 차원을 16-bit로 분리하는 혼합 정밀도 분해

벡터 단위 양자화만으로는 큰 값이 있는 열을 처리하기 어렵습니다. 이 방법은 outlier 특징이 거의 모든 시퀀스 위치에서 같은 특징 차원에 나타난다는 관찰에 기대어, 해당 차원들만 따로 떼어냅니다. 분리되는 차원 집합 O는 크기가 임계값 α 이상인 값을 하나라도 가진 특징 차원으로 정의되며, α = 6.0이 성능 저하를 거의 없애는 값으로 보고됩니다.

분해된 행렬곱은 다음과 같이 쓰입니다. \[ C^{f16} \approx \sum_{h \in O} X^{h}_{f16} W^{h}_{f16} + S_{f16} \cdot \sum_{h \notin O} X^{h}_{i8} W^{h}_{i8} \] O에 속한 차원은 16-bit로 곱해 더합니다. O에 속하지 않는 나머지 차원은 Int8 행렬곱을 수행한 뒤 역정규화 항 \(S_{f16}\)으로 되돌립니다. 두 결과를 더해 최종 16-bit 출력을 만듭니다.

Figure 2: Schematic of LLM.int8(). Given 16-bit floating-point inputs Xf 16 and weights Wf 16, the
features and weights are decomposed into sub-matrices of larg…

Figure 2 : Schematic of LLM.int8(). Given 16-bit floating-point inputs Xf 16 and weights Wf 16, the features and weights are decomposed into sub-matrices of large magnitude features and other values. The outlier feature matrices are multiplied in 16-bit. All other values are multiplied in 8-bit. We perform 8-bit vector-wise multiplication by scaling by row and column-wise absolute maximum of Cx and Cw and then quantizing the outputs to Int8. The Int32 matrix multiplication outputs Outi32 are dequantization by the outer product of the normalization constants Cx⊗ Cw. Finally, both outlier and regular outputs are accumulated in 16-bit floating point outputs.

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.

분해 비용은 작게 유지됩니다. 13B 이하 트랜스포머에서는 |O| ≤ 7이므로 분해에 따른 추가 메모리는 약 0.1%입니다. 전체 값의 99.9% 이상이 8-bit로 곱해지므로 메모리 절감의 대부분은 유지됩니다. 벡터 단위 양자화와 이 분해를 결합한 방법이 LLM.int8()입니다.

C4 perplexity에서 규모에 따른 실패와 회복

언어 모델링 검증은 C4 검증 데이터의 perplexity로 측정하며, 125M부터 13B 파라미터까지의 사전 학습된 모델을 사용합니다. 이 설정은 양자화 기준선을 비교하기 위한 것이고, 핵심은 한 모델의 결과보다 모델 규모에 따른 추세입니다.

Table 1의 13B 열을 보면 32-bit Float 기준선은 12.45입니다. Int8 absmax vector-wise는 16.48이며, perplexity는 낮을수록 좋으므로 이 값은 기준선보다 열화된 결과입니다. Int8 zeropoint vector-wise는 13.47입니다. 같은 13B 열에서 Absmax LLM.int8()(vector-wise + decomp)과 Zeropoint LLM.int8()(vector-wise + decomp)은 모두 12.45로, 기준선과 같은 값을 보입니다.

Table 1: C4 validation perplexities of quantization methods for different transformer sizes ranging
from 125M to 13B parameters. We see that absmax, row-wise,…

Table 1 : C4 validation perplexities of quantization methods for different transformer sizes ranging from 125M to 13B parameters. We see that absmax, row-wise, zeropoint, and vector-wise quantization leads to significant performance degradation as we scale, particularly at the 13B mark where 8-bit 13B perplexity is worse than 8-bit 6.7B perplexity. If we use LLM.int8(), we recover full perplexity as we scale. Zeropoint quantization shows an advantage due to asymmetric quantization but is no longer advantageous when used with mixed-precision decomposition.

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

분해를 쓰지 않은 방법들은 규모가 커질수록 무너집니다. absmax 행의 13B 값 19.08은 6.7B의 14.59보다 높습니다. zeropoint vector-wise의 13B 값 13.47도 6.7B의 13.38보다 높아, 6.7B를 넘어서는 실패가 나타납니다. zeropoint는 작은 규모에서 비대칭 분포를 잘 다루지만, 분해를 함께 쓰면 그 이점이 사라지는 것으로 표에 나타납니다.

OPT 모델 제로샷 정확도의 규모별 추세

perplexity와 별도로 OPT 모델은 EleutherAI language model evaluation harness로 제로샷 정확도를 평가합니다. Figure 1은 WinoGrande, HellaSwag, PIQA, LAMBADA 네 데이터셋의 평균 정확도를 125M부터 175B까지 보여 줍니다. 비교 대상은 16-bit 기준선, 8-bit 기준선으로 쓰인 Absmax 벡터 단위 양자화, 그리고 LLM.int8()입니다.

Figure 1에서 LLM.int8()은 125M부터 175B까지 16-bit 수준을 유지하는 것으로 제시됩니다. 반면 Absmax 벡터 단위 기준선은 6.7B 부근의 outlier 출현 이후 규모가 커질수록 떨어져 무작위 수준의 성능으로 퇴화합니다. 이 결과는 네 데이터셋의 평균을 하나의 곡선으로 묶은 것이며, 데이터셋별 수치는 본문에 개별 표로 제시되지 않습니다.

Figure 1: OPT model mean zeroshot accuracy for
WinoGrande, HellaSwag, PIQA, and LAMBADA
datasets. Shown is the 16-bit baseline, the most
precise previous 8-bit…

Figure 1 : OPT model mean zeroshot accuracy for WinoGrande, HellaSwag, PIQA, and LAMBADA datasets. Shown is the 16-bit baseline, the most precise previous 8-bit quantization method as a baseline, and our new 8-bit quantization method, LLM.int8(). We can see once systematic outliers occur at a scale of 6.7B parameters, regular quan- tization methods fail, while LLM.int8() maintains 16-bit accuracy.

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

큰 크기 특징이 나타나는 규모와 perplexity 기준

outlier 특징을 찾기 위해 세 가지 조건이 설정됩니다. 특징 차원의 크기가 6.0 이상이어야 하고, 같은 차원이 최소 25%의 레이어에 영향을 주어야 하며, 최소 6%의 시퀀스 차원에 나타나야 합니다. 이 분석은 어텐션 투영과 피드포워드 확장 레이어를 대상으로 하며, 이 기준은 가장 작은 125M 모델에서 한 개의 outlier만 찾도록 정해졌습니다.

분석 결과 6.7B 부근에서 위상 전이가 나타납니다. 영향을 받는 레이어의 비율은 65%에서 100%로 증가하고, 영향을 받는 시퀀스 차원의 비율은 35%에서 75%로 증가합니다. 모델 파라미터 수를 축으로 하면 이 변화는 급격하게 보입니다. 반면 C4 perplexity를 축으로 하면 perplexity가 낮아지는 것에 따라 지수적으로 완만하게 나타납니다. 저자들은 이 결과를 출현이 단순한 규모보다 perplexity와 관련된다는 해석으로 연결합니다.

Figure 3: Percentage of layers and all sequence dimensions affected by large magnitude outlier
features across the transformer by (a) model size or (b) C4 perp…

Figure 3 : Percentage of layers and all sequence dimensions affected by large magnitude outlier features across the transformer by (a) model size or (b) C4 perplexity. Lines are B-spline interpolations of 4 and 9 linear segments for (a) and (b). Once the phase shift occurs, outliers are present in all layers and in about 75% of all sequence dimensions. While (a) suggest a sudden phase shift in parameter size, (b) suggests a gradual exponential phase shift as perplexity decreases. The stark shift in (a) co-occurs with the sudden degradation of performance in quantization methods.

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

Figure 4는 두 가지를 더 보여 줍니다. 가장 큰 outlier의 중앙값 크기는 모든 레이어에 나타난 뒤 빠르게 커집니다. outlier 특징 차원의 개수는 모든 분석 모델에서 perplexity가 낮아질수록 엄격히 단조 증가하며, 모델 크기와의 관계는 단조롭지 않습니다.

Figure 4: The median magnitude of the largest outlier feature in (a) indicates a sudden shift in outlier
size. This appears to be the prime reason why quantiza…

Figure 4 : The median magnitude of the largest outlier feature in (a) indicates a sudden shift in outlier size. This appears to be the prime reason why quantization methods fail after emergence. While the number of outlier feature dimensions is only roughly proportional to model size, (b) shows that the number of outliers is strictly monotonic with respect to perplexity across all models analyzed. Lines are B-spline interpolations of 9 linear segments.

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

outlier 차원 제거의 영향

이 절제 실험은 outlier 차원이 실제로 중요한지를 확인합니다. outlier 차원을 0으로 설정한 뒤 어텐션 투영 레이어에 넣고, 얻은 top-1 softmax 확률을 정규 softmax 확률과 비교합니다. 각 레이어는 독립적으로 처리해 앞 레이어의 오류가 누적되지 않게 하며, outlier를 제거한 hidden state를 전파한 perplexity도 함께 측정합니다. 대조군으로는 같은 수의 무작위 비outlier 특징 차원을 제거합니다.

6.7B 파라미터, 시퀀스 길이 2048의 트랜스포머에서 전체 모델에는 약 150k개의 outlier 특징이 나타나지만 이들은 6개의 hidden 차원에 집중됩니다. outlier를 제거하면 평균 top-1 softmax 확률은 약 40%에서 약 20%로 줄고, validation perplexity는 600-1000% 열화합니다. 같은 실험에서 무작위 7개 차원을 제거하면 top-1 확률은 0.02-0.3%만 줄고 perplexity는 약 0.1% 증가합니다.

표 4의 6.7B 행은 같은 제거 비교에서 top-1 softmax 확률을 outlier가 있을 때 35%, 없을 때 13%로 보고하며, 본문의 약 40%와 약 20%와는 값이 다릅니다. 두 값 모두 outlier를 제거하면 확률이 낮아진다는 방향은 같습니다.

Table 4: Summary statistics of outliers with a magnitude of at least 6 that occur in at least 25% of
all layers and at least 6% of all sequence dimensions. We…

Table 4 : Summary statistics of outliers with a magnitude of at least 6 that occur in at least 25% of all layers and at least 6% of all sequence dimensions. We can see that the lower the C4 validation perplexity, the more outliers are present. Outliers are usually one-sided, and their quartiles with maximum range show that the outlier magnitude is 3-20x larger than the largest magnitude of other feature dimensions, which usually have a range of [-3.5, 3.5]. With increasing scale, outliers become more and more common in all layers of the transformer, and they occur in almost all sequence dimensions. A phase transition occurs at 6.7B parameters when the same outlier occurs in all layers in the same feature dimension for about 75% of all sequence dimensions (SDim). Despite only making up about 0.1% of all features, the outliers are essential for large softmax probabilities. The mean top-1 softmax probability shrinks by about 20% if outliers are removed. Because the outliers have mostly asymmetric distributions across the sequence dimension s, these outlier dimensions disrupt symmetric absmax quantization and favor asymmetric zeropoint quantization. This explains the results in our validation perplexity analysis. These observations appear to be universal as they occur for models trained in different software frameworks (fairseq, OpenAI, Tensorflow-mesh), and they occur in different inference frameworks (fairseq, Hugging Face Transformers). These outliers also appear robust to slight variations of the transformer architecture (rotary embeddings, embedding norm, residual scaling, different initializations).

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.

비대칭 분포와 absmax, zeropoint의 차이

행 단위와 벡터 단위 양자화는 hidden state의 시퀀스 차원인 행마다 스케일을 정합니다. 반면 outlier는 특징 차원인 열에 나타납니다. 그래서 두 방식은 outlier를 효과적으로 다루지 못하며, 규모가 커지면 absmax 방식이 빠르게 실패합니다.

outlier 대부분은 엄격하게 비대칭이어서 한쪽 부호만 가집니다. zeropoint 양자화는 이런 분포를 전체 [-127, 127] 범위에 맞출 수 있으므로 Table 1에서 강한 성능을 보입니다. 그러나 13B에서는 누적된 양자화 오차와 outlier 크기의 빠른 증가 때문에 zeropoint도 실패합니다.

혼합 정밀도 분해를 쓰면 남은 분해 특징은 대칭이 되어 zeropoint의 이점이 사라집니다. 그래도 벡터 단위는 행 단위보다 여전히 나으며, 저자들은 이를 가중치의 더 높은 양자화 정밀도가 완전한 예측 성능을 위해 필요하다는 해석으로 연결합니다. 또한 저자들은 outlier가 16-bit 부동소수점 학습도 불안정하게 만들 수 있다고 가설을 제시합니다. 크기 60 정도의 값을 가진 벡터와 곱할 때 16-bit 최댓값 65535를 쉽게 넘을 수 있다는 설명입니다.

메모리 절감과 실행 속도의 조건

메모리 측면에서 16-bit로 계산되는 차원은 약 0.1%뿐이므로 대부분의 가중치는 8-bit로 남습니다. 저자들은 BLOOM-176B의 메모리 사용량이 1.96배 줄어든다고 보고하며, 이는 16-bit 대비 약 50% 절감에 해당한다고 설명합니다. 표 2는 GPU 메모리 기준으로 8-bit와 16-bit에서 실행할 수 있는 최대 모델을 정리합니다. 예를 들어 8x RTX 3090 24 GB 구성은 8-bit에서 OPT-175B/BLOOM을, 16-bit에서는 OPT-66B를 실행 대상으로 제시합니다.

Table 2: Different hardware setups and which methods can be run in 16-bit vs. 8-bit precision. We
can see that our 8-bit method makes many models accessible th…

Table 2 : Different hardware setups and which methods can be run in 16-bit vs. 8-bit precision. We can see that our 8-bit method makes many models accessible that were not accessible before, in particular, OPT-175B/BLOOM.

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

속도는 메모리와 다른 조건에서 측정됩니다. Table 5는 GPT-3 크기별 첫 hidden layer의 feed-forward 행렬곱을 16-bit 기준선과 비교합니다. 모델 차원 12288에서 LLM.int8()(vector-wise+decomp)은 1.81x이고, 양자화와 역양자화 오버헤드를 빼고 Int8 행렬곱만 본 Int8 without overhead는 2.29x입니다. 모델 차원 2560에서는 양자화 오버헤드를 포함한 네 행이 모두 1.0x보다 낮습니다.

본문은 175B 모델에 해당하는 큰 행렬곱에서 LLM.int8()이 약 두 배 빠르다고 적습니다. Table 5의 모델 차원 12288 열은 같은 방식의 LLM.int8() 값을 1.81x로 보여 주므로, 두 표현은 서로 다른 값을 가리키는 것으로 함께 읽어야 합니다.

BLOOM-176B의 end-to-end 추론에서 Table 6은 batch size 1 기준으로 bfloat16 기준선이 8xA100 80GB에서 239, LLM.int8()이 8xA100 80GB에서 253, 4xA100 80GB에서 246, 3xA100 80GB에서 247을 보고합니다. 이 값은 토큰당 생성 속도의 밀리초 값이며, 통신 오버헤드가 큰 분산 추론이라서 차이가 작게 나타난다고 저자들은 설명합니다.

적용 범위와 남은 질문

첫째, 분석은 Int8 데이터 타입에 한정되며 8-bit 부동소수점(FP8)은 연구하지 않았습니다. 현재 GPU와 TPU가 이 데이터 타입을 지원하지 않기 때문입니다. 저자들은 Int8에서 얻은 많은 통찰이 FP8에도 직접 옮겨질 것이라고 믿습니다.

둘째, 모델 규모는 175B까지로 제한됩니다. 175B 모델은 성능 저하 없이 양자화되었지만, 더 큰 규모에서는 추가적인 창발 특성이 현재 방법을 방해할 수 있습니다.

셋째, 어텐션 함수에는 Int8 곱셈을 쓰지 않았습니다. 어텐션 함수는 파라미터를 갖지 않아 메모리 절감의 필수 대상이 아니었고, 어텐션까지 Int8로 바꾸려는 초기 탐색에서는 추가 양자화 방법이 필요하다는 결과가 나왔다고 보고됩니다.

넷째, 이 결과는 추론 중심입니다. 부록 E의 초기 학습 실험에서 어텐션까지 8-bit로 바꾼 설정은 성능을 크게 떨어뜨렸습니다. 표 7의 209M 모델에서 어텐션을 8-bit로 둔 행은 2% 분해에서 perplexity 24.33을 보이며, 8-bit가 없는 기준 행의 16.74보다 높습니다.

Table 7: Initial results on small and large-scale language modeling. Doing attention in 8-bit severely
degrades performance and performance cannot fully recove…

Table 7 : Initial results on small and large-scale language modeling. Doing attention in 8-bit severely degrades performance and performance cannot fully recovered with mixed-precision decomposition. While small-scale language models is close to baseline performance for both 8-bit FFN and 8-bit linear projects in the attention layers performance degrades at the large scale.

원문 · CC BY 4.0 · Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale · 원문 그림 인용 · 원본 PDF 19쪽에서 그림 영역을 추출했습니다.

논문 정보

저자
Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer
학회·저널
arXiv · 프리프린트
최초 공개일
2022년 8월 15일
등록일
2026년 10월 20일
수정일
2022년 11월 10일
버전
v2
arXiv
2208.07339
분류
cs.LG · cs.AI
원문 이용 조건
CC BY 4.0
제공 범위
논문 정보, 해설, 허용된 원문 그림

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

초록

Large language models have been widely adopted but require significant GPU memory for inference. We develop a procedure for Int8 matrix multiplication for feed-forward and attention projection layers in transformers, which cut the memory needed for inference by half while retaining full precision performance. With our method, a 175B parameter 16/32-bit checkpoint can be loaded, converted to Int8, and used immediately without performance degradation. This is made possible by understanding and working around properties of highly systematic emergent features in transformer language models that dominate attention and transformer predictive performance. To cope with these features, we develop a two-part quantization procedure, LLM.int8(). We first use vector-wise quantization with separate normalization constants for each inner product in the matrix multiplication, to quantize most of the features. However, for the emergent outliers, we also include a new mixed-precision decomposition scheme, which isolates the outlier feature dimensions into a 16-bit matrix multiplication while still more than 99.9% of values are multiplied in 8-bit. Using LLM.int8(), we show empirically it is possible to perform inference in LLMs with up to 175B parameters without any performance degradation. This result makes such models much more accessible, for example making it possible to use OPT-175B/BLOOM on a single server with consumer GPUs. We open-source our software.

원문 인용

Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer (2022). LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale. arXiv:2208.07339v2. https://arxiv.org/abs/2208.07339v2

BibTeX
@misc{dettmers2022int8,
  title = {{LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale}},
  author = {Tim Dettmers and Mike Lewis and Younes Belkada and Luke Zettlemoyer},
  year = {2022},
  eprint = {2208.07339},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.07339v2}
}

관련 논문 보기다른 논문 둘러보기

논문 미리 보기
계정 보안

Google 계정 연결

Google 계정을 연결하면 그 계정으로도 로그인할 수 있습니다.

Refivu

회원탈퇴

Refivu
Refivu

회원가입