/ Модель

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

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

invoker-13b

Генерация текстаТекст → текст

Invoker-13B — англоязычная модель на базе Llama 2 для диалога, выбора функций и подготовки ответов по результатам их вызова.

16скачиваний за 30 дней5лайковвеса обновлены24 сен 2023

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Invoker-13B — языковая модель из набора Invoker от Jeffrey Fong, дообученная на базе Llama 2 для диалога и работы с вызовами функций. Она выбирает, вызвать ли одну или несколько доступных функций или ответить пользователю напрямую, а после вызова может обобщить полученные результаты. Для передачи функций используется формат JSON, совместимый с OpenAI function calling.

Модель построена на плотной архитектуре Llama и содержит 12,9 млрд параметров. Она принимает текстовые диалоги и описания функций, выдаёт текстовые ответы или текст с аргументами для вызовов функций. Контекст обучения и нативная длина контекста составляют 4096 токенов; в README указано дообучение методом QLoRA. В карточке указана поддержка английского языка.

Invoker-13B подходит для ассистентов, которым нужно выбирать инструменты по запросу, выполнять многошаговые вызовы и формулировать ответ по результатам. Качество зависит от формата и описания переданных функций; карточка не приводит количественных оценок качества. В метаданных указан формат PyTorch. README заявляет Apache-2.0 для использованных датасетов, но не уточняет лицензию весов модели.

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

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

Ограничения

Контекст ограничен 4096 токенами, а качество выбора инструментов зависит от списка и описаний функций, переданных в предусмотренном формате. Лицензия весов в карточке не уточнена; Apache-2.0 указан для датасетов обучения.

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

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

Открыть на Hugging Face

Invoker-13B

Model Description

Invoker is a suite of large language models based on Llama-2 and is finetuned to plan between calling functions and providing responses directly. It behaves similar to OpenAI's function-calling models which intelligently chooses the best function to call among a list of functions provided to it and summarizes the function responses.

This model stands out for its ability to plan between function calls and returning model responses directly. The fine-tuning process was performed with a 4096 sequence length on an 2x A100 80GB machine.

For more details, refer to https://github.com/jeffrey-fong/Invoker

Model Usage

Prompt Format

The prompt to the model consists of a list of available of functions to call and the chat messages

You must provide the list of functions to the model. All functions passed in should be in the same JSON format as OpenAI function-calling. If no functions are to be passed to the model, provide None in the Available Functions Field.

Available Functions:
```json
<function1 name and description>
```
```json
<function2 name and description>
```

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. The assistant calls functions with appropriate input when necessary.
USER: <query>
ASSISTANT:

or

Available Functions:
None

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. The assistant calls functions with appropriate input when necessary.
USER: <query>
ASSISTANT:

Getting Started

To run inference with the model in full float16 precision, you need approximately 1xA100 40GB or equivalent.

from transformers import LlamaTokenizer, LlamaForCausalLM
import transformers
import torch

model = "jeffrey-fong/invoker-13b"

tokenizer = LlamaTokenizer.from_pretrained(model, use_fast=False)
model = LlamaForCausalLM.from_pretrained(model, torch_dtype=torch.float16, device_map="auto")
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.cuda()
output_ids = model.generate(input_ids=input_ids, max_new_tokens=512, do_sample=False, top_p=1.0, temperature=0.7)
raw_output = tokenizer.decode(output_ids[0], skip_special_tokens=True)
output = raw_output[len(prompt):]

Model Training

The model was trained using QLora which significantly reduces the computational resources required. Training was also accelerated using DeepSpeed Zero Stage 2 which provides fast data parallelism.

Training Data

We use a variety of sources when building our training dataset. All the datasets are carefully chosen to improve both the conversational and function-calling capability of the model.

ToolBench (0830 updated)

ToolBench is an open-source, large-scale and high quality instruction tuning SFT dataset to facilitate the training of LLMs with general tool-use capability. It consists of multi-turn conversations where the assistant, who is presented with several potential functions to call, will call one or multiple functions before returning its response to the user. We had undergone rigorous cleaning of the data where we

  • Removed all datapoints that do not end with the assistant returning a summarized response
  • Cleaned datapoints with unnecessary calls to the same function
  • Changed all function names and descriptions to not include the domain name, so the functions feels more generic

ShareGPT-34K

ShareGPT-34K is a filtered dataset containing high quality multi-turn conversations between a user and an assistant. Some of the assistant responses are generated from OpenAI's GPT-3.5-Turbo while some are from GPT-4.

OASST1

OASST1 is a human-generated and human-annotated assistant-style conversation corpus. We filtered out the conversations in English.

All the datasets used are under Apache-2.0 License. Therefore, this dataset will also be under the same license.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей