/ Модель

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

Контекст
1 024 000 токенов
Параметры
12,1 млрд
Размер весов
24,5 ГБ
Лицензия
Apache 2.0
Архитектура
mistral · dense
Базовая модель
German-RAG-NEMO-12B-CPT-HESSIAN-AI
Опубликована
2 дек 2024

German-RAG-NEMO-12B-SFT-HESSIAN-AI

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

Дообученная 12,1-миллиардная модель Mistral для ответов на вопросы, извлечения сведений и суммаризации по контексту в немецкоязычных RAG-сценариях.

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

German-RAG-NEMO-12B-SFT-HESSIAN-AI — авторегрессионная языковая модель на архитектуре Transformer семейства Mistral, разработанная командой Avemio AI при поддержке Hessian AI. Модель содержит 12,1 млрд параметров и дообучена методом SFT на примерах для генерации с дополнением извлечёнными данными (RAG); в метаданных базовой моделью указана avemio/German-RAG-NEMO-12B-CPT-HESSIAN-AI.

Модель предназначена для немецкоязычных бизнес-сценариев с RAG: ответов на вопросы по предоставленному контексту, извлечения релевантной информации и её суммаризации. Также карточка описывает примеры для рассуждений и вызова функций. Поддерживаются немецкий и английский языки; заявленная длина контекста — до 1 024 000 токенов. Модель доступна в формате safetensors по лицензии Apache 2.0.

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

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

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

Ограничения

Фактические ответы могут быть ошибочными и требуют проверки; модель без фильтрации может генерировать вредный или чувствительный контент и проявлять предвзятость.

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

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

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

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

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

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

Открыть на Hugging Face

German-RAG-NEMO-12B-SFT-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

Our German-RAG-MISTRAL-NEMO-SFT model are trained on this German-RAG-SFT dataset.

Model Details

The core models released in this batch are the following:

SizeTraining Tokens
German-RAG-NEMO-CPT507.47 million
German-RAG-NEMO-SFT2.03 billion
German-RAG-NEMO-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-NEMO-12B-SFT-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-Mistral-Nemo-Instruct-2407German-RAG-NEMO-SFTGerman-RAG-NEMO-ORPOGPT-3.5-TURBO
Average Language Quality85.8889.6189.191.86
OVERALL SCORES (weighted):
extraction_recall35.252.348.887.2
qa_multiple_references65.371.074.077.2
qa_without_time_difference71.585.685.683.1
qa_with_time_difference65.387.985.483.2
relevant_context71.369.165.589.5
summarizations73.881.680.386.9

Model Details

Data

For training data details, please see the German-RAG-SFT-Dataset documentation.

Description

The SFT tasks represent a focused approach to enhance model capabilities through specialized RAG examples. Most of these tasks were developed using synthetically enhanced data derived from the German Wikipedia, accessed through Cohere's prepared dataset on HuggingFace (licensed CC-BY-SA 4.0). This data was structured in a training knowledge graph where Question-Answer nodes were connected to both relevant and irrelevant Context nodes from the same Wikipedia page, creating a rich and challenging network of relationships for training. The only exceptions are the function calling dataset, which was derived and extended from Salesforce's XLAM Function calling dataset by including function call results and final answer generation, and the reasoning task which synthetic generation was inspired by the Paper from Tencent (“Scaling Synthetic Data Creation with 1,000,000,000 Personas”), to generate a diverse set of reasoning tasks across various domains. This comprehensive set of SFT tasks ensures the model develops robust capabilities across a wide range of practical applications while maintaining consistent output formats and clear communication patterns. Each task type has been carefully designed to address specific business needs while maintaining high standards of accuracy and reliability, making them valuable tools for organizations looking to enhance their information processing and knowledge management capabilities.

Task Instruction Format

The implementation of these SFT tasks follows a carefully structured format designed for consistency and clarity. Each task begins with comprehensive system instructions often wrapped in XML tags that meta-define expected inputs, outputs, constraints, and example interactions. This standardization enables clear communication between the model and users while ensuring reliable results. The context information utilized in these tasks is provided in a standardized JSON structure, including unique identifiers, source text, timestamps where relevant, and task-specific metadata. This format was specifically chosen to allow seamless integration with retrieved data from RAG systems, eliminating the need for additional formatting steps in production environments. Source references are handled through a consistent system of numerical indices for context references, JSON-formatted citation markers, and clear time-difference notifications when temporal aspects are relevant. This systematic approach to referencing ensures traceability and reliability in the model's responses. The implementation of these tasks within RAG systems can significantly improve organizational efficiency by reducing manual processing time, ensuring consistency in information handling, improving accuracy in data extraction and analysis, and enabling faster decision-making through better information access.

Architecture

ParameterGerman-RAG-NEMO-SFT
d_model5120
num heads32
num layers40
MLP ratio2.8
LayerNorm typeRMSNorm
pos embeddingsRoPE
attention variantStandard Multi-Head Self Attention
biasesnone
block typesequential
activationSiLU
sequence length1024000
weight typingbfloat16

Hyperparameters

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

Environmental Impact

German-RAG-NEMO-SFT, running on NVIDIA A100 with 40 GPUs for 9 days, has an approximate power consumption as follows:

It's important to note that the actual power consumption may vary depending on the specific workload and operational conditions. For accurate power consumption measurements, using dedicated power monitoring tools is recommended.

ModelGPU TypePower Consumption From GPUs
German-RAG-NEMO-SFTA100 (Hessian AI supercomputer)0.02592 MWh

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-NEMO-SFT 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…

Класс архитектуры
MistralForCausalLM
Ревизия весов
33db3e3

0 моделей