/ Модель

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

Контекст
4 096 токенов
Параметры
12,9 млрд
Размер весов
26 ГБ
Лицензия
OpenRAIL++
Архитектура
llama · dense
Опубликована
1 авг 2023

CodeUp-Llama-2-13b-chat-hf

Генерация текстаТекст → текст5 профессий

Дообученная на инструкциях по программированию чат-модель Llama 2 для генерации кода по текстовым запросам.

73скачиваний за 30 дней33лайкавеса обновлены6 окт 2023

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

CodeUp-Llama-2-13b-chat-hf — чат-модель для генерации кода, созданная на базе Llama 2 авторами проекта CodeUp. Её дообучили следовать инструкциям по задачам программирования на основе набора примерно из 19 тысяч отфильтрованных примеров генерации кода. В README описан акцент на мультиязычной генерации кода, однако правила фильтрации данных ориентированы на Python, поэтому охват других языков программирования может быть неодинаковым.

Модель построена на плотной архитектуре LlamaForCausalLM и содержит 12,9 млрд параметров. Она принимает текстовые инструкции и выдаёт текст, в том числе программный код; максимальный контекст составляет 4096 токенов. Репозиторий содержит веса PyTorch, лицензия — OpenRAIL++.

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

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

  • генерация кода по описанию задачи
  • написание функций по текстовой инструкции
  • изменение SQL-запроса по заданным требованиям
  • получение примеров кода для программных задач

Ограничения

Данные для обучения преимущественно отфильтрованы в пользу Python, поэтому качество для других языков программирования может различаться. Сгенерированный код следует проверять и тестировать; сравнительные оценки качества в README не приведены.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

HKUST CodeUp

CodeUp: A Multilingual Code Generation Llama2 Model with Parameter-Efficient Instruction-Tuning on a Single RTX 3090

Description

In recent years, large language models (LLMs) have shown exceptional capabilities in a wide range of applications due to their fantastic emergence ability. To align with human preference, instruction-tuning and reinforcement learning from human feedback (RLHF) are proposed for Chat-based LLMs (e.g., ChatGPT, GPT-4). However, these LLMs (except for Codex) primarily focus on the general domain and are not specifically designed for the code domain. Although Codex provides an alternative choice, it is a closed-source model developed by OpenAI. Hence, it is imperative to develop open-source instruction-following LLMs for the code domain. However, the large-scale number of LLMs' parameters ($\ge$7B) and training datasets require a vast amount of computational resources, which significantly impedes the development of training and inference on consumer hardware.

To handle these challenges, in this project, we adopt the latest powerful foundation model Llama 2 and construct high-quality instruction-following data for code generation tasks, and propose an instruction-following multilingual code generation Llama2 model. Meanwhile, to make it fit an academic budget and consumer hardware (e.g., a single RTX 3090) based on Alpaca-LoRA, we equip CodeUp with the advanced parameter-efficient fine-tuning (PEFT) methods (e.g., LoRA) which enable efficient adaptation of pre-trained language models (PLMs, also known as foundation model) to various downstream applications without fine-tuning the entire model's parameters. The overall training recipe is as follows.

Training Framework

NL2Code Data Release

Recently, it has attracted significant attention to exploiting much larger and more powerful LLMs (e.g., ChatGPT, GPT-4) to self-generate instruction-following data by delicate prompt design. However, many approaches primarily focus on the general domain and lack code-specific domain considerations. To this end, Code Alpaca follows the previous Self-Instruct paper [3] and Stanford Alpaca repo with some code-related modifications to conduct 20K instruction-following data data/code_alpaca_20k.json for code generation tasks. This JSON file following alpaca_data.json format is a list of dictionaries; each dictionary contains the following fields:

  • instruction: str, describes the task the model should perform. Each of the 20K instructions is unique.
  • input: str, optional context or input for the task. For example, when the instruction is "Amend the following SQL query to select distinct elements", the input is the SQL query. Around 40% of the examples have an input.
  • output: str, the answer to the instruction as generated by text-davinci-003.

High-quality Data Filter

However, after carefully checking the LLMs-self-generated data, we observe three critical problems that may hinder LLMs' instruction learning due to ambiguous and irrelevant noise. That is

  1. When instruction doesn't specify the programming language (PL) of implementation, the output appears with diverse options, e.g., Python, C++, and JavaScript.
  2. It is ambiguous to identify which programming language output is implemented by.
  3. Both instruction and output are irrelevant to the code-specific domain.

Hence, we filter the ambiguous and irrelevant data by rigorous design to obtain high-quality instruction data. Specifically, to solve 1) we set Python as the default PL of implementation and use Guesslang package to detect the PL of a given source code in output. If the Python is detected, this prompt is retained. Otherwise, it will be filtered. 2) and 3) In these cases, we delete these prompts. After that, about 5K low-quality instruction data is filtered. To supplement the high-quality instruction data, we further integrate the data/new_codealpaca.json data (about 4.5K) under the above filter rules.

This way, we gain the 19K high-quality instruction data of code generation. The following is the instruction number distribution of each PL with Radar visualization before and after filtering.

PL Data Filtering)

Training & Inference

Detailed instructions can be found at https://github.com/juyongjiang/CodeUp.

Citation

If you use the data or code in this repo, please cite the repo.

@misc{codeup,
  author = {Juyong Jiang and Sunghun Kim},
  title = {CodeUp: A Multilingual Code Generation Llama2 Model with Parameter-Efficient Instruction-Tuning},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/juyongjiang/CodeUp}},
}

Naturally, you should also cite the original LLaMA V1 [1] & V2 paper [2], and the Self-Instruct paper [3], and the LoRA paper [4], and the Stanford Alpaca repo, and Alpaca-LoRA repo, and Code Alpaca repo, and PEFT.

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

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

GPU в ailist

Универсальный рантайм

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
a578f82

0 моделей