/ Модель

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

Контекст
8 192 токена
Параметры
7,5 млрд
Размер весов
32,1 ГБ
Лицензия
Llama 3
Архитектура
llama · dense
Опубликована
25 июн 2024

Llama-3-8B-RAG-v1

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

Дообученная Glaive модель Llama 3 для генерации ответов на основе найденных документов в RAG-сценариях.

31скачиваний за 30 дней16лайковвеса обновлены25 июн 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Llama-3-8B-RAG-v1 — языковая модель Glaive, дообученная на наборе Glaive-RAG-v1 для задач генерации с использованием поиска по документам (RAG). Это плотная авторегрессионная модель семейства Llama 3 с 7,5 млрд параметров, рассчитанная на генерацию текста и диалоговый режим. Контекст модели составляет до 8192 токенов; в карточке указан английский язык.

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Llama-3-8B-RAG-v1

This model is a fine-tuned version of Llama-3-8B for Retrieval-Augmented Generation (RAG) tasks on the Glaive-RAG-v1 dataset.

Model Details

  • Developed by: Glaive
  • Model type: Llama-3 finetuned for RAG tasks

How to Get Started with the Model

Use the code below to get started with the model:

NOTE: Try to use the same system prompt and document formatting as the example provided below, this is the same format that was used to finetune the model.

from transformers import AutoTokenizer, pipeline

model_name = "glaiveai/Llama-3-8B-RAG-v1"
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Example user query
user_query = """Document:0

Title: Financial Compliance and Company Statements

Text: This document provides a detailed overview of the financial compliance measures and statements issued by corporations. It discusses various aspects of financial reporting, the importance of accurate financial disclosures, and the role of chief executive officers in certifying financial documents. The document elaborates on the legal frameworks that govern corporate financial disclosures, including the Securities Exchange Act of 1934, which mandates that public companies must provide periodic reports detailing their financial status. These reports are crucial for investors, regulators, and other stakeholders who rely on them to make informed decisions. The document also highlights the penalties for non-compliance with financial reporting requirements, which can include fines and criminal charges for executives who misreport financial information.

Document:1

Title: Certification of Financial Reports by CEO of Black Knight, Inc.

Text: Pursuant to 18 U.S.C. §1350, the Chief Executive Officer of Black Knight, Inc., a corporation registered in Delaware, has officially certified the periodic financial report containing the company's financial statements. The certification confirms that these reports comply fully with the requirements of Section 13(a) or 15(d) of the Securities Exchange Act of 1934. The CEO, Anthony M. Jabbour, asserts that the information contained within these reports fairly presents, in all material respects, the financial condition and results of operations of Black Knight, Inc. The certification is part of the official documents filed with the Securities and Exchange Commission and serves as a testament to the accuracy and fairness of the financial disclosures made by the company. This certification is crucial as it assures stakeholders of the reliability of the financial statements provided by Black Knight, Inc.

Answer Mode: Grounded

Question: How does the CEO of Black Knight, Inc. ensure compliance with the Securities Exchange Act of 1934, and what are the implications of the certification provided?"""

# Prepare chat template
chat = [
   {"role": "system", "content": "You are a conversational AI assistant that is provided a list of documents and a user query to answer based on information from the documents. The user also provides an answer mode which can be 'Grounded' or 'Mixed'. For answer mode Grounded only respond with exact facts from documents, for answer mode Mixed answer using facts from documents and your own knowledge. Cite all facts from the documents using <co: doc_id></co> tags."},
   {"role": "user", "content": user_query}
]

prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)

# Set up pipeline and generate response
pipe = pipeline('text-generation', model=model_name, tokenizer=model_name, device=0)
output = pipe(
    prompt, 
    max_length=1000, 
    num_return_sequences=1, 
    top_k=50, 
    top_p=0.95, 
    temperature=0.5, 
    do_sample=True, 
    return_full_text=False
)

print(output[0]['generated_text'])

Output of above code block

Cited Documents: 1
Answer: <co:1>The CEO of Black Knight, Inc., Anthony M. Jabbour, ensures compliance with the Securities Exchange Act of 1934 by certifying that the periodic financial report and financial statements comply fully with the requirements of Section 13(a) or 15(d) of the Act. This certification confirms that the information in the reports fairly presents, in all material respects, the financial condition and results of operations of Black Knight, Inc.</co> This certification is crucial as it assures stakeholders of the reliability of the financial statements provided by the company, thereby maintaining investor confidence and adherence to legal financial reporting standards.
In this output:

The model cites Document 1 as the source of its information.
It provides a grounded answer based on the content of Document 1, as requested in the "Answer Mode: Grounded" instruction.
The answer explains how the CEO ensures compliance and the implications of the certification.
The citation is marked with <co:1></co> tags, indicating that this information comes directly from Document 1.

Answer mode and citations

The model can be instructed to answer only using grounded information from the documents, or to combine it's internal knowledge as well by using Answer Mode: Grounded/Mixed in the user prompt.

Citations are generated at the beginning of each answer, and also present within the text in <co: doc_id> blocks.

Future work

We are working on the following improvements for the next version of the dataset:

  • Multi turn data
  • Diverse document sources

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей