언어 모델의 공백
Void in Language Models
May 20, 2025
저자: Mani Shemiranifar
cs.AI
초록
트랜스포머 기반 언어 모델(LMs)의 발전에도 불구하고, 한 가지 근본적인 질문은 여전히 대답되지 않은 채로 남아 있습니다: 추론 과정에서 모든 레이어가 활성화되는가? 우리는 이 질문을 탐구하기 위해 비훈련 가능하고 파라미터가 없는 적응형 계산 방법인 L2 적응형 계산(LAC)을 사용하여 비활성화된 레이어(이를 "Voids"라고 부름)를 탐지합니다. 우리는 LAC를 원래의 효율성 중심 응용에서 추론 중 활성화된 레이어를 추적하는 데 적응시켰습니다. 이 방법은 활성화의 L2-노름 변화를 모니터링하여 Voids를 식별합니다. 우리는 명령어 튜닝된 LMs에서 레이어 활성화를 두 단계로 분석합니다: 프롬프트 처리(PP) 단계에서는 입력 프롬프트의 각 토큰에 대해 활성화된 레이어를 추적하고, 응답 생성(RG) 단계에서는 생성된 각 토큰에 대해 활성화된 레이어를 추적합니다. 우리는 더 나아가 이 두 단계에서 서로 다른 레이어가 활성화됨을 보여줍니다. 우리의 방법의 효과를 입증하기 위해, Llama, Mistral, Qwen 패밀리의 세 가지 명령어 튜닝된 LMs를 MMLU, GPQA Diamond, BoolQ 세 가지 벤치마크에서 평가했습니다. 예를 들어, MMLU에서 제로샷 설정으로 Qwen2.5-7B-Instruct의 Voids를 건너뛰었을 때, 모델이 레이어의 30%만 사용하면서도 점수가 69.24에서 71.29로 향상되었습니다. 마찬가지로, GPQA Diamond에서 Mistral-7B-Instruct-v0.3은 PP와 RG 단계에서 레이어의 70%를 사용할 때 점수가 13.88에서 18.36으로 향상되었습니다. 이러한 결과는 추론 과정에서 모든 레이어가 동등하게 기여하지 않으며, 대부분의 레이어를 선택적으로 건너뛰는 것이 특정 작업에서 모델의 성능을 향상시킬 수 있음을 보여줍니다.
English
Despite advances in transformer-based language models (LMs), a fundamental
question remains largely unanswered: Are all layers activated during inference?
We investigate this question by detecting unactivated layers (which we refer to
as Voids) using a non-trainable and parameter-free adaptive computation method
called L2 Adaptive Computation (LAC). We adapt LAC from its original
efficiency-focused application to trace activated layers during inference. This
method monitors changes in the L2-norm of activations to identify voids. We
analyze layer activation in instruction-tuned LMs across two phases: Prompt
Processing (PP), where we trace activated layers for each token in the input
prompts, and Response Generation (RG), where we trace activated layers for each
generated token. We further demonstrate that distinct layers are activated
during these two phases. To show the effectiveness of our method, we evaluated
three distinct instruction-tuned LMs from the Llama, Mistral, and Qwen families
on three benchmarks: MMLU, GPQA Diamond, and BoolQ. For example, on MMLU with a
zero-shot setting, skipping voids in Qwen2.5-7B-Instruct resulted in an
improvement from 69.24 to 71.29 while the model uses only 30% of the layers.
Similarly, Mistral-7B-Instruct-v0.3 on GPQA Diamond improved from 13.88 to
18.36 when using 70% of the layers during both the PP and RG phases. These
results show that not all layers contribute equally during inference, and that
selectively skipping most of them can improve the performance of models on
certain tasks.Summary
AI-Generated Summary