/ Модель

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

Контекст
131 072 токена
Параметры
3,7 млрд
Размер весов
7,6 ГБ
Лицензия
MIT
Архитектура
llama · dense
Опубликована
3 дек 2024

German-RAG-PHI-3.5-MINI-4B-ORPO-HESSIAN-AI

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

Немецко- и англоязычная языковая модель Avemio AI, дообученная методом ORPO для ответов на вопросы и генерации по найденным документам.

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

German-RAG-PHI-3.5-MINI-4B-ORPO-HESSIAN-AI — авторегрессионная языковая модель на архитектуре Transformer, разработанная командой Avemio AI при поддержке Hessian AI. Это дообученная версия немецко- и англоязычной модели German-RAG-PHI-3.5-MINI-4B-SFT-HESSIAN-AI, настроенная методом ORPO для сценариев генерации с дополнением найденной информацией.

Модель предназначена для ответов на вопросы по контексту и документам, извлечения релевантной информации, суммаризации и рассуждений на немецком и английском языках. В карточке указаны 3,7 млрд параметров и контекст до 131 072 токенов. По приведённым в README оценкам, она справляется с отдельными задачами извлечения и рассуждений, однако результаты зависят от задачи и набора данных.

Модель доступна в формате safetensors. Метаданные указывают лицензию MIT; README указывает Apache 2.0, поэтому лицензию следует сверить с условиями репозитория перед использованием. Ответы могут содержать фактические ошибки и предвзятость, а модель без фильтрации способна генерировать вредный или чувствительный контент.

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

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

Ограничения

Модель может выдавать неверные факты и предвзятый контент; ответы следует проверять. Без дополнительной фильтрации она может генерировать вредный или чувствительный контент; README и метаданные указывают разные лицензии, поэтому условия нужно уточнить в репозитории.

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

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

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

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

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

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

Открыть на Hugging Face

German-RAG-PHI-3.5-MINI-4B-ORPO-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-PHI-ORPO model are trained on this German-RAG-ORPO dataset.

Model Details

The core models released in this batch are the following:

SizeTraining Tokens
German-RAG-Phi-CPT507.47 million
German-RAG-Phi-SFT2.03 billion
German-RAG-Phi-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-PHI-3.5-MINI-4B-ORPO-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.

German-RAG-LLM-EASY-BENCHMARK EVAL

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-Phi-3.5-Mini-4BGerman-RAG-PHI-SFTGerman-RAG-PHI-ORPOGerman-RAG-PHI-MERGEDGPT-3.5-TURBO
Average_language_quality75.1178.8878.1385.4191.86
OVERALL SCORES (weighted):
extraction_recall18.037.532.061.887.2
qa_multiple_references65.870.674.884.877.2
qa_without_time_difference71.288.087.388.083.1
qa_with_time_difference64.689.386.989.183.2
relevant_context72.372.869.184.489.5
summarizations74.683.281.184.986.9

German-RAG-LLM-HARD-BENCHMARK EVAL

MetricVanila-PHI-4b-InstructGerman-RAG-PHI-ORPOGPT-3.5-TURBOGPT-4oGPT-4o-mini
OVERALL SCORES (weighted):
hard_reasoning_de42.842.237.962.958.4
hard_reasoning_en50.854.048.361.762.9

Model Details

Data

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

The ORPO Tasks Dataset represents a specialized collection for fine-tuning language models with a focus on RAG-specific capabilities.

The subsets can be for this training step are derived from 3 different sources:

  • SauerkrautLM Preference Datasets:
    • SauerkrautLM-Fermented-GER-DPO: is a specialized dataset designed for training language models in function calling irrelevance detection using Preference Optimization. The dataset consists of 2,000 carefully evaluated instruction-response pairs, specifically curated to help models recognize situations where function calls are unnecessary and direct responses are more appropriate.
    • SauerkrautLM-Fermented-Irrelevance-GER-DPO: is a high-quality German instruction-response dataset specifically designed for Preference Optimization training. The dataset consists of 3,305 instruction-response pairs. Rather than being merged from existing German datasets, it was carefully created through a sophisticated augmentation process, transforming curated English instructions and responses into culturally adapted German content. Each pair includes comprehensive quality metrics and rejected responses for Preference training.
  • Hard Reasoning DE & EN: Synthetic generation inspired by Tencent's (“Scaling Synthetic Data Creation with 1,000,000,000 Personas”).
  • Multi-Turn-QA: Developed by Avemio AG, this dataset builds upon and enhances the German Wikipedia dump provided by Cohere (wikipedia-22-12-de-embeddings), expanding it with synthetic examples and structured tasks to create a robust training resource.

Data Subsets

SubsetExamples per Task
SauerkrautLM-Fermented-GER-DPO3.31k
SauerkrautLM-Fermented-Irrelevance-GER-DPO2k
hard-reasoning-de3.19k
hard-reasoning-en1.97k
multi-turn-qa3.2k

Source Data: SauerkrautLM

SauerkrautLM-Fermented-GER-DPO

SauerkrautLM-Fermented-Irrelevance-GER-DPO

Source Data: Hard-Reasoning DE & EN

  • Base: (proj-Persona/PersonaHub)
  • Enhancement: Synthetic data generation by Avemio AG
  • Quality: Automatic validation and curation of examples by Open Source LLM's

Methodology: Reasoning-DE & Reasoning-EN

  • Providing Persona Descriptions and rewriting in a similar style with a different focus area and name in german/english language
  • Generating Simple Logical Problems out of Persona-specific Views & Language.
  • Generating Approaches, Thinking-Steps & Solutions separately verified by Llama-3.1-405B-Instruct
  • Quality assurance and validation

Source Data: Multi-Turn-QA

Methodology: Multi-Turn-QA

  1. Extraction of base content from German Wikipedia
  2. Enhancement through synthetic example generation
  3. Structure addition for specific task types
  4. Quality assurance and validation

Architecture

ParameterGerman-RAG-PHI-ORPO
d_model3072
num heads32
num layers32
MLP ratio2.66
LayerNorm typeRMSNorm
pos embeddingsRoPE
attention variantStandard Multi-Head Self Attention with sliding-window of 2047
biasesnone
block typesequential
activationSiLU
sequence length131072
weight tyingbfloat16

Hyperparameters

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

Environmental Impact

German-RAG-PHI-ORPO, running on NVIDIA A100 with 80 GPUs for 2 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-PHI-ORPOA100 (Hessian AI supercomputer)0.00921 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-PHI-ORPO 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
Ревизия весов
5125af5

0 моделей