컴파일러를 위한 대규모 언어 모델의 우선순위 샘플링
Priority Sampling of Large Language Models for Compilers
February 28, 2024
저자: Dejan Grubisic, Chris Cummins, Volker Seeker, Hugh Leather
cs.AI
초록
대형 언어 모델은 코드 생성 및 최적화에 있어 큰 잠재력을 보여줍니다. 널리 사용되는 샘플링 방법 중 하나인 Nucleus Sampling은 생성의 다양성을 증가시키지만, 낮은 온도에서는 반복된 샘플을, 높은 온도에서는 일관성 없는 샘플을 생성하는 경우가 많습니다. 또한, 온도 계수는 각 작업에 맞게 조정해야 하므로 사용성이 제한됩니다. 본 논문에서는 Priority Sampling이라는 간단하고 결정론적인 샘플링 기법을 제안합니다. 이 기법은 모델의 신뢰도에 따라 정렬된 고유한 샘플을 생성하며, 각 새로운 샘플은 확장된 탐색 트리에서 가장 높은 확률을 가진 미확장 토큰을 확장합니다. 또한, Priority Sampling은 정규 표현식을 기반으로 한 생성을 지원하여 제어 가능하고 구조화된 탐색 과정을 제공합니다. Priority Sampling은 샘플 수에 관계없이 Nucleus Sampling을 능가하며, 원본 모델의 성능을 -Oz 대비 2.87%에서 5%까지 향상시킵니다. 더 나아가, 단 30개의 샘플만으로도 원본 모델의 훈련을 위한 레이블 생성에 사용된 자동 튜너를 능가하는 성능을 보여줍니다.
English
Large language models show great potential in generating and optimizing code.
Widely used sampling methods such as Nucleus Sampling increase the diversity of
generation but often produce repeated samples for low temperatures and
incoherent samples for high temperatures. Furthermore, the temperature
coefficient has to be tuned for each task, limiting its usability. We present
Priority Sampling, a simple and deterministic sampling technique that produces
unique samples ordered by the model's confidence. Each new sample expands the
unexpanded token with the highest probability in the augmented search tree.
Additionally, Priority Sampling supports generation based on regular expression
that provides a controllable and structured exploration process. Priority
Sampling outperforms Nucleus Sampling for any number of samples, boosting the
performance of the original model from 2.87% to 5% improvement over -Oz.
Moreover, it outperforms the autotuner used for the generation of labels for
the training of the original model in just 30 samples.