Decoder-only Transformers compute attention over the KV cache of preceding tokens. Keys and Values are typically represented with the same dimensionality, regardless of their distance from the prediction target. In natural language, however, the next word is most strongly influenced by the immediately preceding tokens. We hypothesize that local and distant tokens impose asymmetric demands on representational capacity: local tokens are more critical for predicting immediate outputs and thus require richer representations, whereas distant tokens primarily serve as long-range memory, for which lower-dimensional representations may suffice. We formalize this idea as Distance-Adaptive Representation (DAR), which preserves full-dimensional representations within a local context window while assigning reduced-dimensional representations (e.g. 1/2 or 1/4 of the original dimensionality) to tokens beyond that window. Across multiple pretraining scales (70M to 410M parameters), as well as continued supervised fine-tuning on a 1B-scale model, this approach closely matches the performance of full-dimensional baselines. In contrast, uniformly reducing dimensionality across all token positions leads to worse performance. These results challenge the common assumption that key and value dimensionality should be uniform across token positions. We further develop an efficient realization of DAR that achieves model quality comparable to the MLA baseline while reducing the average KV-cache size by 68.8\% at 8K context and achieving up to a $1.9\times$ decoding speedup at 128K context on the evaluated models. Our findings suggest a new direction for designing attention architectures that allocate representational capacity according to token distance to reduce KV-cache during inference.
우리는 트랜스포머 피드포워드 블록 아키텍처 설계의 각 구성요소가 초기화 시 깊이에 걸쳐 얼마나 많은 랭크가 남아 있는지를 어떻게 결정하는지 조사한다. 크기를 제어하는 것으로 오래 이해되어 온 스킵 연결(skip connection)과 정규화를, 네트워크를 표현력 있게 만드는 행렬 곱과 비선형 활성화 함수가 랭크를 감소시키기도 하므로, 깊이에 걸쳐 그래디언트 랭크를 보존하는 메커니즘으로 재해석한다. 스킵 연결은 분기(branch)와 스킵의 상대적 스케일에 의해 제어되며, 랭크 붕괴와 앙상블과 유사한 동작 사이의 트레이드오프를 이룬다는 것을 보인다. 스킵 연결은 그래디언트를 랭크가 손실되는 잔차(residual) 분기 주위로 우회시키며, 층들이 합성(compose)하도록 유도하는 긴 그래디언트 경로를 따라가게 하지는 않는다. 정규화 층의 배치는 깊이에 걸쳐 분기 대 스킵 비율을 설정함으로써 동일한 트레이드오프를 제어하며, 특히 Post-Norm에서는 랭크가 붕괴하지만 Pre-Norm에서는 정체되는 이유를 포함하여 정규화 배치 및 깊이 스케일링(depth scaling) 문헌의 상당 부분을 통합한다. 너비를 확장하고 축소하는 이중 행렬 구조와 같은 아키텍처의 다른 측면들은 표현 또는 분기 야코비안 랭크를 보존하기 위해 추가 매개변수를 사용한다. 두 번째 행렬은 단일 행렬과 중심화되지 않은(un centered) 활성화 함수를 사용할 때 블록을 거치며 커질 일관된 평균 스파이크(coherent mean spike)를 탈상관(decorrelate)시켜, 잔차 표현이 붕괴되는 것을 방지한다. 두 행렬 사이의 너비 확장은 분기 야코비안을 full rank로 유지한다. 이 확장된 공간에서 랭크를 감소시키는 활성화 함수를 적용해도 원래 공간을 span할 충분한 방향이 남으며, 이때의 너비는 Marchenko-Pastur 법칙을 따른다. 입력-출력 야코비안의 초기화 랭크는 CIFAR-10에서 어떤 네트워크가 학습되는지를 예측한다. 종합하면, 우리는 깊은 네트워크의 아키텍처 설계를 랭크 붕괴, 앙상블과 유사한 동작, 매개변수 수 사이의 내재적 트레이드오프를 탐색하는 것으로 재구성한다.
트랜스포머 기반 언어 모델을 구조별 분류 체계로 정리하고, 2023년 이후 인스트럭션 튜닝·RLHF·RAG·MoE 등 주요 변화와 의료·금융·법률 등 분야별 활용을 검토한다. 아키텍처·연산·에너지 비용, 정렬(alignment), 데이터 출처, 벤치마크 한계를 비교해 배포 관점의 비판적 평가와 향후 연구 과제를 제시한다.
모델 크기, 특히 깊이와 너비의 스케일링은 트랜스포머 기반 언어 모델에서 상당한 진전을 이끌었습니다. 그러나 대부분의 아키텍처는 서로 다른 층이 잠재적으로 고유한 계산 역할을 수행함에도 불구하고, 모든 층에 걸쳐 일정한 너비를 유지하며 고정된 매개변수 및 연산 예산을 균등하게 할당합니다. 본 연구에서는 X자형(×-shaped) 트랜스포머 아키텍처를 제안하여 네트워크 깊이에 따른 비균일 용량 할당을 실증적으로 조사합니다. 이 설계는 매개변수가 없는 잔차 크기 조정 메커니즘을 활용하여 중간 층은 좁히고 초기 및 후기 층은 넓게 유지합니다. 2억 개에서 20억 개 매개변수(밀집) 및 30억 개 매개변수(전문가 혼합, MoE)에 이르는 디코더 전용 언어 모델 전반에서, 우리의 트랜스포머는 언어 모델링 손실 측면에서 매개변수 수가 일치하는 균일한 기준 모델들을 일관되게 능가합니다. 평균 층 너비를 줄임으로써 이 아키텍처는 전체적으로 더 적은 FLOPs를 필요로 하며(손실이 일치하도록 피팅된 스케일링 곡선 하에서 22% 감소), 더 작은 KV 캐시 메모리 및 I/O 비용(15% 감소)을 요구합니다. 분석 결과, 이 병목 구조는 잔차 스트림에서 질적으로 다른 표현을 만들어냄을 보여줍니다. 전체적으로, 우리의 결과는 비균일 너비 할당이 언어 모델의 더 자원 최적의 스케일링을 이끌어낼 수 있음을 입증합니다.