/ Модель

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

Лицензия
Apache 2.0
Базовая модель
EuroLLM-9B
Библиотека
transformers
Опубликована
22 ноя 2024

EuroLLM-9B-Instruct

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

Многоязычная модель на 9 млрд параметров для диалогов, выполнения инструкций, генерации текста и машинного перевода.

13 100скачиваний за 30 дней225лайковвеса обновлены9 дек 2024

Бенчмарки

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

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

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

  • LEXam-Benchmark/LEXam

    score · выше — лучше

    Результат

    23,31

    mcq_4_choices 23,31open_question 22,95
    Hugging Face Leaderboards

    Публичная таблицаревизия не подтверждена

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

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

EuroLLM-9B-Instruct — многоязычная языковая модель с 9 млрд параметров, разработанная Unbabel, Instituto Superior Técnico, Instituto de Telecomunicações, University of Edinburgh и партнёрами. Она создана на базе EuroLLM-9B и дополнительно настроена на выполнение инструкций с использованием EuroBlocks, набора данных для следования общим инструкциям и машинного перевода. Модель использует плотную архитектуру Transformer с grouped-query attention, RMSNorm, SwiGLU и RoPE; длина последовательности при обучении составляет 4096 токенов.

Модель предназначена для генерации текста, диалогов, выполнения инструкций и перевода между языками. Она обучена для работы с языками ЕС и рядом дополнительных языков, включая русский, арабский, китайский, японский, корейский и хинди. Репозиторий содержит веса в формате Safetensors и использует библиотеку Transformers. Лицензия — Apache 2.0.

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for EuroLLM-9B-Instruct

This is the model card for EuroLLM-9B-Instruct. You can also check the pre-trained version: EuroLLM-9B.

  • Developed by: Unbabel, Instituto Superior Técnico, Instituto de Telecomunicações, University of Edinburgh, Aveni, University of Paris-Saclay, University of Amsterdam, Naver Labs, Sorbonne Université.
  • Funded by: European Union.
  • Model type: A 9B parameter multilingual transfomer LLM.
  • Language(s) (NLP): Bulgarian, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Irish, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish, Swedish, Arabic, Catalan, Chinese, Galician, Hindi, Japanese, Korean, Norwegian, Russian, Turkish, and Ukrainian.
  • License: Apache License 2.0.

Model Details

The EuroLLM project has the goal of creating a suite of LLMs capable of understanding and generating text in all European Union languages as well as some additional relevant languages. EuroLLM-9B is a 9B parameter model trained on 4 trillion tokens divided across the considered languages and several data sources: Web data, parallel data (en-xx and xx-en), and high-quality datasets. EuroLLM-9B-Instruct was further instruction tuned on EuroBlocks, an instruction tuning dataset with focus on general instruction-following and machine translation.

Model Description

EuroLLM uses a standard, dense Transformer architecture:

  • We use grouped query attention (GQA) with 8 key-value heads, since it has been shown to increase speed at inference time while maintaining downstream performance.
  • We perform pre-layer normalization, since it improves the training stability, and use the RMSNorm, which is faster.
  • We use the SwiGLU activation function, since it has been shown to lead to good results on downstream tasks.
  • We use rotary positional embeddings (RoPE) in every layer, since these have been shown to lead to good performances while allowing the extension of the context length.

For pre-training, we use 400 Nvidia H100 GPUs of the Marenostrum 5 supercomputer, training the model with a constant batch size of 2,800 sequences, which corresponds to approximately 12 million tokens, using the Adam optimizer, and BF16 precision. Here is a summary of the model hyper-parameters:

Sequence Length4,096
Number of Layers42
Embedding Size4,096
FFN Hidden Size12,288
Number of Heads32
Number of KV Heads (GQA)8
Activation FunctionSwiGLU
Position EncodingsRoPE (\Theta=10,000)
Layer NormRMSNorm
Tied EmbeddingsNo
Embedding Parameters0.524B
LM Head Parameters0.524B
Non-embedding Parameters8.105B
Total Parameters9.154B

Run the model

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "utter-project/EuroLLM-9B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

messages = [
    {
        "role": "system",
        "content": "You are EuroLLM --- an AI assistant specialized in European languages that provides safe, educational and helpful answers.",
    },
    {
        "role": "user", "content": "What is the capital of Portugal? How would you describe it?"
    },
    ]

inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=1024)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Results

EU Languages

image/png Table 1: Comparison of open-weight LLMs on multilingual benchmarks. The borda count corresponds to the average ranking of the models (see (Colombo et al., 2022)). For Arc-challenge, Hellaswag, and MMLU we are using Okapi datasets (Lai et al., 2023) which include 11 languages. For MMLU-Pro and MUSR we translate the English version with Tower (Alves et al., 2024) to 6 EU languages.
* As there are no public versions of the pre-trained models, we evaluated them using the post-trained versions.

The results in Table 1 highlight EuroLLM-9B's superior performance on multilingual tasks compared to other European-developed models (as shown by the Borda count of 1.0), as well as its strong competitiveness with non-European models, achieving results comparable to Gemma-2-9B and outperforming the rest on most benchmarks.

English

image/png

Table 2: Comparison of open-weight LLMs on English general benchmarks.
* As there are no public versions of the pre-trained models, we evaluated them using the post-trained versions.

The results in Table 2 demonstrate EuroLLM's strong performance on English tasks, surpassing most European-developed models and matching the performance of Mistral-7B (obtaining the same Borda count).

Bias, Risks, and Limitations

EuroLLM-9B has not been aligned to human preferences, so the model may generate problematic outputs (e.g., hallucinations, harmful content, or false statements).

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

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

GPU в ailist

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

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

Доступ к модели ограничен автором; у платформы нет доступа к весам.

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

0 моделей