/ Модель

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

Лицензия
Своя лицензия
Базовая модель
Teuken-7B-base-v0.4
Библиотека
transformers
Опубликована
27 ноя 2024

Teuken-7B-instruct-research-v0.4-GGUF

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

QuantFactory/Teuken-7B-instruct-research-v0.4-GGUF — квантизированная версия инструкционно дообученной языковой модели Teuken-7B-instruct-research-v0.4, созданная QuantFactory с использованием llama.cpp.

505скачиваний за 30 дней2лайкавеса обновлены27 ноя 2024

Бенчмарки

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

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

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

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

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

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

Исходную модель разработали Fraunhofer, Forschungszentrum Jülich, TU Dresden и DFKI в рамках проекта OpenGPT-X при финансировании Федерального министерства экономики и защиты климата Германии. Модель основана на decoder-only Transformer и содержит около 7 млрд параметров; базовая модель предварительно обучалась на 4 трлн токенов из общедоступных источников с отсечкой данных в сентябре 2023 года.

Модель предназначена прежде всего для генерации текста и мультиязычных задач, включая исследовательское использование на 24 языках ЕС: болгарском, чешском, датском, немецком, греческом, английском, испанском, эстонском, финском, французском, ирландском, хорватском, венгерском, итальянском, литовском, латышском, мальтийском, нидерландском, польском, португальском, румынском, словацком, словенском и шведском. Инструкционная настройка ориентирована на более стабильные результаты в этих языках и ответы, в большей степени отражающие европейский контекст. Для работы необходимо использовать предусмотренный prompt template или chat template токенизатора.

К сильным сторонам относятся широкое покрытие европейских языков и формат GGUF, подходящий для запуска через llama.cpp и совместимые инструменты. Ограничения включают возможные предвзятость, галлюцинации, а также генерацию токсичного, оскорбительного или вредного содержания. Модель не предназначена для математических и программных задач. В README указана лицензия «other», но конкретные условия лицензирования не приведены.

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

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

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

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

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

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

Открыть на Hugging Face

QuantFactory Banner

QuantFactory/Teuken-7B-instruct-research-v0.4-GGUF

This is quantized version of openGPT-X/Teuken-7B-instruct-research-v0.4 created using llama.cpp

Original Model Card

Model Card for Teuken-7B-instruct-research-v0.4

Teuken-7B-instruct-research-v0.4 is an instruction-tuned 7B parameter multilingual large language model (LLM) pre-trained with 4T tokens within the research project OpenGPT-X. The base model Teuken-7B-base-v0.4 is available on request 📧 contact@opengpt-x.de.

Model Description

  • Developed by: Fraunhofer, Forschungszentrum Jülich, TU Dresden, DFKI
  • Funded by: German Federal Ministry of Economics and Climate Protection (BMWK) in the context of the OpenGPT-X project
  • Model type: Transformer based decoder-only model
  • Language(s) (NLP): bg, cs, da, de, el, en, es, et, fi, fr, ga, hr, hu, it, lt, lv, mt, nl, pl, pt, ro, sk, sl, sv
  • Shared by: OpenGPT-X

Uses

Teuken-7B-instruct-research-v0.4 focuses on covering all 24 EU languages and therefore renders more stable results across these languages and better reflects European values in its answers than English-centric models. It is therefore specialized for use in multilingual tasks. Since the underlying base model is trained on all 24 EU languages, Teuken-7B-instruct-research-v0.4 is also intended for research use in these 24 languages.

Disclaimer Toxic Content:

This Large Language Model (LLM) may generate content that is inappropriate, offensive, or harmful. While the dataset has been heavily filtered to minimize such outputs, the model may still produce text that is biased or toxic due to the large scale and diverse nature of the data.

Out-of-Scope Use

The model is not intended for use in math and coding tasks.

Bias, Risks, and Limitations

Teuken-7B-instruct-research-v0.4 is an instruction-tuned version of Teuken-7B-base-v0.4 (base model is available on request 📧 contact@opengpt-x.de) that is not completely free from biases and hallucinations.

How to Get Started with the Model

Usage

The model requires transformers, sentencepiece, and the torch library. After installation, here's an example of how to use the model:

As this model is a fine-tuned model, it must be used with the provided prompt template. Using the model without the prompt template is not intended and is not recommended. The prompt template is defined as follows:

user="Hi!"
lang_code = "DE"
system_messages={
            "EN": "A chat between a human and an artificial intelligence assistant."
            " The assistant gives helpful and polite answers to the human's questions.",
            "DE": "Ein Gespräch zwischen einem Menschen und einem Assistenten mit künstlicher Intelligenz."
            " Der Assistent gibt hilfreiche und höfliche Antworten auf die Fragen des Menschen.",
        }
 
prompt = f"System: {system_messages[lang_code]}\nUser: {user}\nAssistant:"

The prompt template is also directly integrated in the Tokenizer and can be used as follows:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer


device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

model_name = "openGPT-X/Teuken-7B-instruct-research-v0.4"
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
)
model = model.to(device).eval()
tokenizer = AutoTokenizer.from_pretrained(
    model_name,
    use_fast=False,
    trust_remote_code=True,
)

messages = [{"role": "User", "content": "Hallo"}]
prompt_ids = tokenizer.apply_chat_template(messages, chat_template="DE", tokenize=True, add_generation_prompt=True, return_tensors="pt")
prediction = model.generate(
    prompt_ids.to(model.device),
    max_length=512,
    do_sample=True,
    top_k=50,
    top_p=0.95,
    temperature=0.7,
    num_return_sequences=1,
)
prediction_text = tokenizer.decode(prediction[0].tolist())
print(prediction_text)

This example demonstrates how to load the model and tokenizer, prepare input, generate text, and print the result.

Training Details

Pre-Training Data

Teuken-7B-instruct-research-v0.4 was pre-trained on 4 trillion tokens of data from publicly available sources. The pretraining data has a cutoff of September 2023. More information is available in our preprint "Data Processing for the OpenGPT-X Model Family".

Instruction-Tuning Data

For the dataset composition, we used a selection of English and German datasets from which we sampled our final dataset with equal distribution between German and English, as shown in the following tables.

English

  • We only included a subsample of the OpenOrca dataset.
  • For the LMSYS-Chat dataset, we selected only the high-quality criteria in LMSYS-Chat-1M: A Large-Scale Real-World LLM Conversation Dataset, i.e., if the model answer stems from any of "GPT-3.5-turbo", "GPT-4", "Claude-1", "Claude-instant-1" or "Claude-2" and is English.
  • To select instruction-tuning examples based on their quality, We calculated the reward scores of all English examples utilizing Starling-RM-7B-alpha (Apache-2.0 license)

For English data, we did the following steps for sample selection:

  1. Add all multi-turn examples
  2. Add entire code_alpaca dataset subset
  3. Add entire lmsys_chat_1m_high_quality_train_en dataset subset
  4. For the remaining dataset subsets (open_orca, evol_instruct_143k, evol_instruct_70k, sharegpt_v3, ultrachat_200k, bactrianx_EN), we add the samples with the highest reward scores so that each dataset subset contributes an equal amount of high-quality examples
DatasetSample Count
anon8231489123/ShareGPT_Vicuna_unfiltered37.6K
MBZUAI/Bactrian-X26.9K
Open-Orca/OpenOrca26.9K
WizardLM/WizardLM_evol_instruct_70k26.9K
WizardLM/WizardLM_evol_instruct_V2_196k26.8K
sahil2801/CodeAlpaca-20k12.1K
lmsys/lmsys-chat-1m11.2K
HuggingFaceH4/ultrachat_200k7.0K
total175,5K

German

For German data we include the complete data sets from the given table:

DatasetSample Count
MBZUAI/Bactrian-X DE63.7K
FreedomIntelligence/evol-instruct-deutsch55.9K
FreedomIntelligence/alpaca-gpt4-deutsch47.5K
FreedomIntelligence/sharegpt-deutsch5.8K
LeoLM/German_Songs943
LeoLM/German_Poems378
bjoernp/ultrachat_de909
total175,13K

Training Procedure

Instruction fined tuned version of Teuken-7B-base-v0.4.

More information regarding the pre-training are available in our model preprint "Teuken-7B-Base & Teuken-7B-Instruct: Towards European LLMs".

Training Hyperparameters

  • Training regime: bf16 mixed precision

Evaluation

Results on multilingual benchmarks for 21 European languages with instruction-tuned models

ModelAvg.EU21-ARCEU21-HeSwEU21-TQAEU21-MMLU
Meta-Llama-3.1-8B-Instruct.563.563.579.532.576
Mistral-7B-Instruct-v0.3.527.530.538.548.491
Salamandra-7B-Instruct.543.595.637.482.459
Aya-23-8B.485.475.535.476.455
Occiglot-7B-eu5-Instruct.475.484.519.471.428
Pharia-1-LLM-7B-C-A.417.396.438.469.366
Bloomz-7B1.358.316.354.461.302
Teuken-7B-instruct-research-v0.4.543.581.624.543.425

More information regarding the quality of our translated benchmarks are available in our Evaluation preprint "Towards Multilingual LLM Evaluation for European Languages". More evaluation results regarding Teuken-7B-instruct-research-v0.4 are available in our model preprint "Teuken-7B-Base & Teuken-7B-Instruct: Towards European LLMs".

The model was evaluated in 21 languages on ARC, GSM8K, HellaSwag, TruthfulQA, Translation and MMLU. Results can also be seen in the European LLM Leaderboard.

Technical Specifications

Model Architecture and Objective

Hyper-ParameterValue
Training ObjectiveCLM
Activation FunctionSwiGLU
Seq Length4096
Position EmbeddingsRotary
Num Layers32
Hidden Size4096
FFN Hidden Size13440
Num Attention Heads32
Head Dim128
Group Query Attentionyes
Num Query Groups2
NormalizationRMSNorm
Learning rate3e-4
Min learning rate3e-5
Disable bias in linearyes
Hidden dropout0.0
Attention dropout0.0
OptimizerAdamW
Beta10.9
Beta20.95
Data-typebf16
Recompute-activationsyes
Distributed-optimizersyes

Compute Infrastructure

We trained our models on JUWELS Booster which consists of 936 compute nodes, each equipped with 4 NVIDIA A100 GPUs. The GPUs are hosted by AMD EPYC Rome CPUs. The compute nodes are connected with HDR-200 InfiniBand in a DragonFly+ topology.

Hardware

The configuration of JUWELS Booster compute nodes is the following:

CPU: AMD EPYC 7402 processor; 2 sockets, 24 cores per socket, SMT-2 (total: 2×24×2 = 96 threads) in NPS-4 1 configuration

Memory: 512 GB DDR4-3200 RAM (of which at least 20 GB is taken by the system software stack, including the file system); 256 GB per socket; 8 memory channels per socket (2 channels per NUMA domain)

GPU: 4 × NVIDIA A100 Tensor Core GPU with 40 GB; connected via NVLink3 to each other

Network: 4 × Mellanox HDR200 InfiniBand ConnectX 6 (200 Gbit/s each), HCA

Periphery: CPU, GPU, and network adapter are connected via 2 PCIe Gen 4 switches with 16 PCIe lanes going to each device (CPU socket: 2×16 lanes). PCIe switches are configured in synthetic mode.

Software

Megatron-LM

BibTeX:

If you find our model useful in your research, please consider citing our preprint:


@misc{ali2024teuken7bbaseteuken7binstructeuropean,
      title={Teuken-7B-Base & Teuken-7B-Instruct: Towards European LLMs}, 
      author={Mehdi Ali and Michael Fromm and Klaudia Thellmann and Jan Ebert and Alexander Arno Weber and Richard Rutmann and Charvi Jain and Max Lübbering and Daniel Steinigen and Johannes Leveling and Katrin Klug and Jasper Schulze Buschhoff and Lena Jurkschat and Hammam Abdelwahab and Benny Jörg Stein and Karl-Heinz Sylla and Pavel Denisov and Nicolo' Brandizzi and Qasid Saleem and Anirban Bhowmick and Lennard Helmer and Chelsea John and Pedro Ortiz Suarez and Malte Ostendorff and Alex Jude and Lalith Manjunath and Samuel Weinbach and Carolin Penke and Oleg Filatov and Shima Asaadi and Fabio Barth and Rafet Sifa and Fabian Küch and Andreas Herten and René Jäkel and Georg Rehm and Stefan Kesselheim and Joachim Köhler and Nicolas Flores-Herr},
      year={2024},
      eprint={2410.03730},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2410.03730}, 
}

Team

Data Team

Anirban Bhowmick (IAIS), Nicolo Brandizzi (IAIS), Lennard Helmer (IAIS), Benny Jörg Stein (IAIS), Karl-Heinz Sylla (IAIS), Pavel Denisov (IAIS), Qasid Saleem (IAIS), Johannes Leveling (IAIS), Hammam Abdelwahab (IAIS), Luzian Hahn (IIS), Farzad Naderi (IIS), Md Saiful Islam (IIS), Alexander Schwirjow (IIS), Pedro Ortiz Suarez (ex. DFKI), Malte Ostendorff (ex. DFKI)

Model-Training Team

Core contributors

Mehdi Ali (IAIS), Michael Fromm (IAIS), Jan Ebert (FZJ), Chelsea John (FZJ), Lena Jurkschat (TUD), Alexander Weber (IAIS)

Contributors:

Richard Rutmann (IAIS), Daniel Steinigen (IAIS), Lalith Manjunath (TUD), Carolin Penke (FZJ)

Evaluation Team

Core contributors

Klaudia Thellmann (TUD), Alex Jude (IAIS), Jasper Buschhoff (IAIS)

Contributors:

Shima Assadi (IIS), Fabio Barth (DFKI)

Management

Joachim Köhler (IAIS), Nicolas Flores-Herr (IAIS), Stefan Kesselheim (FZJ), Andreas Herten (FZJ), Georg Rehm (DFKI), René Jäkel (TUD), Fabian Küch (IIS), Nicole Hildebrandt (IAIS), Ines Wendler (IAIS)

We believe that collaboration is key to overcome the aforementioned limitations and thereby strengthening the European GenAI landscape. Because of this, the team invites researchers, developers, and AI enthusiasts to join and engage through various platforms. A Discord server has been created for community collaboration, offering a space for discussions on technical details, ideas, and direct interaction with developers. Additionally, resources like research publications and a European LLM Leaderboard provide insights into Teuken-7B’s performance and technical aspects. The OpenGPT-X team encourages ongoing engagement and collaboration as the project evolves. Key links: Discord: OpenGPT-X Discord server Research Papers: OpenGPT-X News Research Papers LLM Leaderboard: European LLM Leaderboard LLM Leaderboard

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

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

GPU в ailist

llama.cpp

Нельзя запустить

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
af15136

0 моделей