/ Модель

Характеристики

Контекст
514 токенов
Параметры
454 млн
Лицензия
Apache 2.0
Архитектура
roberta · dense
Опубликована
3 июл 2023

lever-gsm8k-codex

Классификация текстаТекст → label3 профессии
112скачиваний за 30 дней0лайковвеса обновлены5 июл 2023

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

LEVER — классификатор на базе RoBERTa-large, который проверяет и ранжирует программы Codex для решения математических задач GSM8K.

LEVER для Codex на GSM8K — модель классификации текста, разработанная Yale University и Meta AI и опубликованная Ansong Ni. Она основана на RoBERTa-large и обучена на результатах code-davinci-002 для GSM8K; в метаданных указано 454,1 млн параметров и контекст длиной 514 токенов.

Модель оценивает, верна ли сгенерированная программа, используя условие задачи на естественном языке, саму программу и результаты её выполнения. Оценки верификатора объединяются с вероятностями генерации CodeLM и используются для ранжирования кандидатов. Основной сценарий — отбор программ, сгенерированных Codex для задач GSM8K; модель также изучалась для выходов других генераторов на этом наборе данных.

Это вспомогательная модель для конвейера генерации и проверки программ, не предназначенная для самостоятельного использования. В README сообщается, что добавление LEVER повысило точность выполнения на GSM8K с 67,2% до 84,5% на тесте. Модель распространяется по лицензии Apache-2.0. Среди ограничений указаны возможные вредные стереотипы в предсказаниях; для применения требуется генератор программ и результаты их выполнения.

Сценарии применения

  • оценка правильности программ, сгенерированных для задач GSM8K
  • ранжирование кандидатов Python-программ по результатам выполнения
  • отбор решений математических задач, сгенерированных Codex
  • перепроверка программных решений с помощью верификатора

Ограничения

Модель не предназначена для самостоятельного использования: ей нужны сгенерированные программы и результаты их выполнения. README отмечает, что предсказания могут содержать вредные стереотипы.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

LEVER (for Codex on GSM8K)

This is one of the models produced by the paper "LEVER: Learning to Verify Language-to-Code Generation with Execution".

Authors: Ansong Ni, Srini Iyer, Dragomir Radev, Ves Stoyanov, Wen-tau Yih, Sida I. Wang*, Xi Victoria Lin*

Note: This specific model is for Codex on the GSM8K dataset, for the models pretrained on other datasets, please see:

Model Image

Model Details

Model Description

The advent of pre-trained code language models (Code LLMs) has led to significant progress in language-to-code generation. State-of-the-art approaches in this area combine CodeLM decoding with sample pruning and reranking using test cases or heuristics based on the execution results. However, it is challenging to obtain test cases for many real-world language-to-code applications, and heuristics cannot well capture the semantic features of the execution results, such as data type and value range, which often indicates the correctness of the program. In this work, we propose LEVER, a simple approach to improve language-to-code generation by learning to verify the generated programs with their execution results. Specifically, we train verifiers to determine whether a program sampled from the CodeLM is correct or not based on the natural language input, the program itself and its execution results. The sampled programs are reranked by combining the verification score with the CodeLM generation probability, and marginalizing over programs with the same execution results. On four datasets across the domains of table QA, math QA and basic Python programming, LEVER consistently improves over the base CodeLMs (4.6% to 10.9% with code-davinci-002) and achieves new state-of-the-art results on all of them.

  • Developed by: Yale University and Meta AI

  • Shared by: Ansong Ni

  • Model type: Text Classification

  • Language(s) (NLP): More information needed

  • License: Apache-2.0

  • Parent Model: RoBERTa-large

  • Resources for more information:

Uses

Direct Use

This model is not intended to be directly used. LEVER is used to verify and rerank the programs generated by code LLMs (e.g., Codex). We recommend checking out our Github Repo for more details.

Downstream Use

LEVER is learned to verify and rerank the programs sampled from code LLMs for different tasks. More specifically, for lever-gsm8k-codex, it was trained on the outputs of code-davinci-002 on the GSM8K dataset. It can be used to rerank the SQL programs generated by Codex out-of-box. Moreover, it may also be applied to other model's outputs on the GSM8K dataset, as studied in the Original Paper.

Out-of-Scope Use

The model should not be used to intentionally create hostile or alienating environments for people.

Bias, Risks, and Limitations

Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

Training Details

Training Data

The model is trained with the outputs from code-davinci-002 model on the GSM8K dataset.

Training Procedure

20 program samples are drawn from the Codex model on the training examples of the GSM8K dataset, those programs are later executed to obtain the execution information. And for each example and its program sample, the natural language description and execution information are also part of the inputs that used to train the RoBERTa-based model to predict "yes" or "no" as the verification labels.

Preprocessing

Please follow the instructions in the Github Repo to reproduce the results.

Speeds, Sizes, Times

More information needed

Evaluation

Testing Data, Factors & Metrics

Testing Data

Dev and test set of the GSM8K dataset.

Factors

More information needed

Metrics

Execution accuracy (i.e., pass@1)

Results

GSM8K Math Reasoning via Python Code Generation

Exec. Acc. (Dev)Exec. Acc. (Test)
Codex68.167.2
Codex+LEVER84.184.5

Model Examination

More information needed

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: More information needed
  • Hours used: More information needed
  • Cloud Provider: More information needed
  • Compute Region: More information needed
  • Carbon Emitted: More information needed

Technical Specifications [optional]

Model Architecture and Objective

lever-gsm8k-codex is based on RoBERTa-large.

Compute Infrastructure

More information needed

Hardware

More information needed

Software

More information needed.

Citation

BibTeX:

@inproceedings{ni2023lever,
  title={Lever: Learning to verify language-to-code generation with execution},
  author={Ni, Ansong and Iyer, Srini and Radev, Dragomir and Stoyanov, Ves and Yih, Wen-tau and Wang, Sida I and Lin, Xi Victoria},
  booktitle={Proceedings of the 40th International Conference on Machine Learning (ICML'23)},
  year={2023}
}

Glossary [optional]

More information needed

More Information [optional]

More information needed

Model Card Author and Contact

Ansong Ni, contact info on personal website

How to Get Started with the Model

This model is not intended to be directly used, please follow the instructions in the Github Repo.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
RobertaForSequenceClassification
Ревизия весов
1bf62f5

0 моделей