/ Модель

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

Лицензия
Apache 2.0
Базовая модель
granite-8b-code-base-4k
Библиотека
transformers
Опубликована
7 сен 2024

granite-8b-code-instruct-4k-GGUF

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

QuantFactory/granite-8b-code-instruct-4k-GGUF — квантованная версия Granite-8B-Code-Instruct-4K, разработанная IBM Research и преобразованная в формат GGUF с использованием llama.cpp.

978скачиваний за 30 дней2лайкавеса обновлены7 сен 2024

Бенчмарки

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

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

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

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

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

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

Модель содержит около 8 млрд параметров и дообучена на базе Granite-8B-Code-Base-4K на наборах данных с разрешительными лицензиями для улучшения следования инструкциям, логического рассуждения и решения задач, связанных с программированием.

Модель предназначена для генерации, объяснения и исправления кода, а также для создания программных ассистентов. В карточке приведены результаты HumanEvalPack для Python, JavaScript, Java, Go, C++, и Rust; показатели pass@1 различаются в зависимости от языка и типа задачи. Контекстное окно составляет 4K токенов. Модель относится к текстовым генеративным моделям и не предназначена для обработки изображений или других мультимодальных данных.

Ключевые преимущества — специализация на задачах программирования, поддержка нескольких языков программирования, улучшенное следование инструкциям и возможность локального запуска благодаря квантованию. Ограничения включают ограниченный контекст в 4K токенов, зависимость качества от языка и задачи, а также необходимость проверять сгенерированный код перед использованием; заявленные результаты бенчмарков не отмечены как верифицированные. Модель распространяется по лицензии Apache 2.0.

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

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

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

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

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

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

Открыть на Hugging Face

QuantFactory/granite-8b-code-instruct-4k-GGUF

This is quantized version of ibm-granite/granite-8b-code-instruct-4k created using llama.cpp

Original Model Card

image/png

Granite-8B-Code-Instruct-4K

Model Summary

Granite-8B-Code-Instruct-4K is a 8B parameter model fine tuned from Granite-8B-Code-Base-4K on a combination of permissively licensed instruction data to enhance instruction following capabilities including logical reasoning and problem-solving skills.

Usage

Intended use

The model is designed to respond to coding related instructions and can be used to build coding assistants.

Generation

This is a simple example of how to use Granite-8B-Code-Instruct-4K model.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # or "cpu"
model_path = "ibm-granite/granite-8b-code-instruct-4k"
tokenizer = AutoTokenizer.from_pretrained(model_path)
# drop device_map if running on CPU
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
# change input text as desired
chat = [
    { "role": "user", "content": "Write a code to find the maximum value in a list of numbers." },
]
chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
# tokenize the text
input_tokens = tokenizer(chat, return_tensors="pt")
# transfer tokenized inputs to the device
for i in input_tokens:
    input_tokens[i] = input_tokens[i].to(device)
# generate output tokens
output = model.generate(**input_tokens, max_new_tokens=100)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# loop over the batch to print, in this example the batch size is 1
for i in output:
    print(i)

Training Data

Granite Code Instruct models are trained on the following types of data.

  • Code Commits Datasets: we sourced code commits data from the CommitPackFT dataset, a filtered version of the full CommitPack dataset. From CommitPackFT dataset, we only consider data for 92 programming languages. Our inclusion criteria boils down to selecting programming languages common across CommitPackFT and the 116 languages that we considered to pretrain the code-base model (Granite-8B-Code-Base).
  • Math Datasets: We consider two high-quality math datasets, MathInstruct and MetaMathQA. Due to license issues, we filtered out GSM8K-RFT and Camel-Math from MathInstruct dataset.
  • Code Instruction Datasets: We use Glaive-Code-Assistant-v3, Glaive-Function-Calling-v2, NL2SQL11 and a small collection of synthetic API calling datasets.
  • Language Instruction Datasets: We include high-quality datasets such as HelpSteer and an open license-filtered version of Platypus. We also include a collection of hardcoded prompts to ensure our model generates correct outputs given inquiries about its name or developers.

Infrastructure

We train the Granite Code models using two of IBM's super computing clusters, namely Vela and Blue Vela, both outfitted with NVIDIA A100 and H100 GPUs respectively. These clusters provide a scalable and efficient infrastructure for training our models over thousands of GPUs.

Ethical Considerations and Limitations

Granite code instruct models are primarily finetuned using instruction-response pairs across a specific set of programming languages. Thus, their performance may be limited with out-of-domain programming languages. In this situation, it is beneficial providing few-shot examples to steer the model's output. Moreover, developers should perform safety testing and target-specific tuning before deploying these models on critical applications. The model also inherits ethical considerations and limitations from its base model. For more information, please refer to Granite-8B-Code-Base-4K model card.

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

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

GPU в ailist

llama.cpp

Нельзя запустить

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
133ed75

0 моделей