/ Модель

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

Лицензия
Apache 2.0
Базовая модель
CodeLlama-7B-KStack-clean
Опубликована
26 мая 2024

CodeLlama-7B-KStack-clean-GGUF

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

QuantFactory/CodeLlama-7B-KStack-clean-GGUF — квантизированная версия CodeLlama-7B-KStack-clean, созданная с использованием llama.cpp.

1 720скачиваний за 30 дней0лайковвеса обновлены8 июн 2024

Бенчмарки

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

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

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

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

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

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

Базовая модель CodeLlama-7B была дообучена JetBrains на 25 тысячах примеров из набора KStack-clean, содержащего преимущественно Kotlin-код, отобранный по образовательной ценности. Модель предназначена для генерации и дополнения программного кода, прежде всего на Kotlin, включая сценарии text generation и Fill-in-the-Middle с использованием специального формата PRE/SUF/MID.

Размер модели составляет 7 млрд параметров; формат GGUF предназначен для использования с совместимыми инструментами, включая llama.cpp. В README не указаны точные параметры контекстного окна, поддерживаемые языки помимо Kotlin и конкретные варианты квантизации. На Kotlin HumanEval модель показала Pass@1 37,89%, превысив результат исходной CodeLlama-7B в 26,89%. При этом её ответы могут быть неточными или нежелательными, особенно при отклонении от Kotlin-ориентированного формата и задач, поэтому перед применением требуется тестирование под конкретный сценарий. Лицензия — Apache-2.0.

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

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

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

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

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

Открыть на Hugging Face

CodeLlama-7B-KStack-clean-GGUF

This is quantized version of JetBrains/CodeLlama-7B-KStack-clean created using llama.cpp

Model description

This is a repository for the CodeLlama-7b model fine-tuned on the KStack-clean dataset with rule-based filtering, in the Hugging Face Transformers format. KStack-clean is a small subset of KStack, the largest collection of permissively licensed Kotlin code, automatically filtered to include files that have the highest "educational value for learning algorithms in Kotlin".

How to use

from transformers import AutoModelForCausalLM, AutoTokenizer

# Load pre-trained model and tokenizer
model_name = 'JetBrains/CodeLlama-7B-KStack-clean'
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name).to('cuda')

# Create and encode input
input_text = """\
This function takes an integer n and returns factorial of a number:
fun factorial(n: Int): Int {\
"""
input_ids = tokenizer.encode(
    input_text, return_tensors='pt'
).to('cuda')

# Generate
output = model.generate(
    input_ids, max_length=60, num_return_sequences=1, 
    pad_token_id=tokenizer.eos_token_id
)

# Decode output
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)

As with the base model, we can use FIM. To do this, the following format must be used:

'<PRE> ' + prefix + ' <SUF> ' + suffix + ' <MID>'

Training setup

The model was trained on one A100 GPU with following hyperparameters:

HyperparameterValue
warmup100 steps
max_lr5e-5
schedulerlinear
total_batch_size32 (~30K tokens per step)
num_epochs2

More details about fine-tuning can be found in the technical report (coming soon!).

Fine-tuning data

For tuning the model, we used 25K exmaples from the KStack-clean dataset, selected from the larger KStack dataset according to educational value for learning algorithms. In total, the dataset contains about 23M tokens.

Evaluation

For evaluation, we used the Kotlin HumanEval dataset, which contains all 161 tasks from HumanEval translated into Kotlin by human experts. You can find more details about the pre-processing necessary to obtain our results, including the code for running, on the datasets's page.

Here are the results of our evaluation:

Model nameKotlin HumanEval Pass Rate
CodeLlama-7B26.89
CodeLlama-7B-KStack-clean37.89

Ethical Considerations and Limitations

CodeLlama-7B-KStack-clean is a new technology that carries risks with use. The testing conducted to date has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, CodeLlama-7B-KStack-clean's potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. The model was fine-tuned on a specific data format (Kotlin tasks), and deviation from this format can also lead to inaccurate or undesirable responses to user queries. Therefore, before deploying any applications of CodeLlama-7B-KStack-clean, developers should perform safety testing and tuning tailored to their specific applications of the model.

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

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

GPU в ailist

llama.cpp

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

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

Ревизия весов
2e6ac58

0 моделей