/ Модель

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

Контекст
131 072 токена
Параметры
7,5 млрд
Размер весов
16,1 ГБ
Лицензия
Llama 3.1
Архитектура
llama · dense
Базовая модель
German-RAG-LLAMA-3.1-8B-SFT-HESSIAN-AI
Опубликована
6 дек 2024

German-RAG-LLAMA-3.1-8B-MERGED-HESSIAN-AI

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

Объединённая модель Llama 3.1 на 7,5 млрд параметров для ответов на вопросы, извлечения сведений и суммаризации в немецкоязычных RAG-системах.

16скачиваний за 30 дней0лайковвеса обновлены7 фев 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

German-RAG-LLAMA-3.1-8B-MERGED-HESSIAN-AI — авторегрессионная языковая модель на архитектуре Transformer, разработанная командой Avemio AI при поддержке Hessian AI. Это объединённая модель семейства Llama 3.1 объёмом 7,5 млрд параметров, предназначенная для немецкоязычных RAG-систем и задач ответов на вопросы по предоставленному контексту. Она также подходит для извлечения релевантных сведений и краткого пересказа источников; в карточке заявлена поддержка немецкого и английского языков. Нативная длина контекста — 131 072 токена.

Модель распространяется в формате safetensors и поддерживает чатовый режим. Метаданные Hugging Face указывают лицензию llama3.1, тогда как README заявляет Apache 2.0; лицензионные условия следует уточнить перед использованием. В оценке объединённая версия показала более низкий результат извлечения, чем варианты SFT и ORPO из той же серии. Ответы могут содержать фактические ошибки, а без фильтрации модель может генерировать вредный или чувствительный контент.

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

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

Ограничения

Модель может выдавать фактически неверные ответы и без фильтрации способна генерировать вредный или чувствительный контент. В оценке объединённая версия показала более низкий результат извлечения, чем варианты SFT и ORPO этой серии.

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

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

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

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

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

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

Открыть на Hugging Face

German-RAG-LLAMA-3.1-8B-MERGED-HESSIAN-AI

German-RAG (German Retrieval Augmented Generation) models are designed for the German-speaking market, enabling innovation and AI solutions to drive German research collaboration in business-focused Generative AI by 2025

Model Details

The core models released in this batch are the following:

SizeTraining Tokens
German-RAG-LLAMA-CPT507.47 million
German-RAG-LLAMA-SFT2.03 billion
German-RAG-LLAMA-ORPO2.0577 billion

Model Description

  • Developed by: Avemio AI Team
  • Supported by: Hessian AI
  • Model type: a Transformer style autoregressive language model.
  • Language(s) (NLP): German, English
  • License: The code and model are released under Apache 2.0.
  • Contact: German-RAG@avemio.digital

Model Sources

Uses

Inference

Quickly get inference running with the following required installation: Now, proceed as usual with HuggingFace:

from transformers import AutoModelForCausalLM, AutoTokenizer
 
model_name = "avemio/German-RAG-LLAMA-3.1-8B-MERGED-HESSIAN-AI"
 
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
im_end_token_id = tokenizer.convert_tokens_to_ids('<|im_end|>')
im_start_token_id = tokenizer.convert_tokens_to_ids('<|im_start|>')
 
messages = [
    {"role": "system", "content": "Folge den Anweisungen des Benutzers. Bevor du deine finale Antwort gibst, schildere deine Überlegungen zur Lösung des Problems."},
    {"role": "user", "content": "Ferdinand steht vor der Herausforderung, eine faire Besuchsregelung für seine drei Kinder zu finden, die den Bedürfnissen jedes einzelnen Kindes gerecht wird. Jedes Kind hat unterschiedliche Vorlieben und Bedürfnisse, die in den Besuchsplan integriert werden müssen. Er muss sicherstellen, dass die Regelung sowohl den Interessen der Kinder als auch den rechtlichen Vorgaben entspricht. Ferdinand hat eine Woche Zeit, um einen Vorschlag zu erarbeiten, den er mit seinem Anwalt besprechen kann."}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=False
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
 
generated_ids = model.generate(
    **model_inputs,
    max_length=2024,
    temperature=0.01,
    do_sample=False,
    #bos_token_id=im_start_token_id,
    eos_token_id=im_end_token_id,
    pad_token_id=tokenizer.eos_token_id,
    repetition_penalty=1.1,
    num_return_sequences=1,
    top_k=40,
    top_p=0.95,
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
 
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
 

Fine-tuning

We are providing a comprehensive Google Colab notebook to guide users through the process of fine-tuning our model, complete with detailed instructions, essential dependencies, and configurable settings. Colab-Notebook.

Evaluation

The evaluation was performed using seven subsets, focusing on extraction recall, question answering (QA) with multiple references, and time difference reasoning. Relevant context and summarization were treated as distinct subsets, each playing a crucial role in the evaluation process. For relevant context, the model's ability to identify and extract pertinent information from the source material was assessed. In contrast, the summarization subset evaluated the model's capability to generate concise and accurate summaries based on the relevant context.

Four evaluation metrics were employed across all subsets: language quality, overall correctness, instruction following, and an overall score.

  • Language quality: This metric focused on the overall linguistic quality of the outputs, considering factors such as grammar, fluency, and clarity.
  • Overall correctness: The accuracy and correctness of the content were evaluated under this metric.
  • Instruction following: This metric assessed the model's ability to follow specific instructions provided for each task.
  • Overall score: This metric combined the results from the previous three metrics, offering a comprehensive evaluation of the model's capabilities across all subsets.
MetricVanila-llama-3.1-8B-InstructGerman-RAG-LLAMA-SFTGerman-RAG-LLAMA-ORPOGerman-RAG-LLAMA-MERGEDGPT-3.5-TURBO
Average Language Quality87.7888.9388.9386.9387.58
OVERALL SCORES (weighted):
extraction_recall66.173.266.361.866.9
qa_multiple_references74.791.590.984.890.3
qa_without_time_difference83.590.791.488.089.9
qa_with_time_difference86.791.491.889.190.6
relevant_context87.990.389.684.488.5
summarizations88.690.782.784.987.7

Hard Benchmark Eval

MetricVanila-llama-3.1-8B-Instruct[German-RAG-LLAMA-ORPOGPT-3.5-TURBOGPT-4oGPT-4o-mini
OVERALL SCORES (weighted):
hard_reasoning_de39.142.537.962.958.4
hard_reasoning_en54.955.648.361.762.9

Merge Details

This model was merged using the SLERP merge method.

Models Merged

The following models were included in the merge:

Configuration

The following YAML configuration was used to produce this model:

slices:
  - sources:
      - model: avemio/German-RAG-LLAMA-3.1-8B-SFT-HESSIAN-AI
        layer_range: [0, 32]
      - model: avemio/German-RAG-LLAMA-3.1-8B-ORPO-HESSIAN-AI
        layer_range: [0, 32]
merge_method: slerp
base_model: avemio/German-RAG-LLAMA-3.1-8B-ORPO-HESSIAN-AI
parameters:
  t:
    - filter: self_attn
      value: [0, 0.5, 0.3, 0.7, 1]
    - filter: mlp
      value: [1, 0.5, 0.7, 0.3, 0]
    - value: 0.5
dtype: bfloat16

Architecture

ParameterGerman-RAG-LLAMA-MERGED
d_model3072
num heads32
num layers32
MLP ratio3.5
LayerNorm typeRMSNorm
pos embeddingsRoPE
attention variantStandard Multi-Head Self Attention
biasesnone
block typesequential
activationSiLU
sequence length131072
weight typingbfloat16

Hyperparameters

ParameterGerman-RAG-LLAMA-MERGED
warmup steps50
peak LR5.0E-07
weight decay0.1
LR schedulelinear
gradient reduce dtypeFP32
optimizer state dtypeFP32

Bias, Risks, and Limitations

Like any base language model or fine-tuned model without safety filtering, it is relatively easy for a user to prompt these models to generate harmful and generally sensitive content. Such content can also be produced unintentionally, especially in the case of bias, so we recommend users consider the risks of applications of this technology.

Otherwise, many facts from German-RAG-LLAMA-MERGED or any LLM will often not be true, so they should be checked.

The German-RAG AI Team

Marcel Rosiak Soumya Paul Siavash Mollaebrahim Zain ul Haq

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей