Priority Sampling of Large Language Models for Compilers

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Grubisic, Dejan, Cummins, Chris, Seeker, Volker, Leather, Hugh
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913247625478144
author Grubisic, Dejan
Cummins, Chris
Seeker, Volker
Leather, Hugh
author_facet Grubisic, Dejan
Cummins, Chris
Seeker, Volker
Leather, Hugh
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2402_18734
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Priority Sampling of Large Language Models for Compilers
Grubisic, Dejan
Cummins, Chris
Seeker, Volker
Leather, Hugh
Machine Learning
Computation and Language
Performance
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.
title Priority Sampling of Large Language Models for Compilers
topic Machine Learning
Computation and Language
Performance
url https://arxiv.org/abs/2402.18734