/ Модель

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

Контекст
8 192 токена
Параметры
2,5 млрд
Размер весов
10 ГБ
Лицензия
Apache 2.0
Архитектура
gemma · dense
Опубликована
5 июн 2024

Plume256k

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

Plume256k — обученная с нуля на параллельных данных языковая модель BSC для перевода предложений между каталонским и семью другими европейскими языками.

29скачиваний за 30 дней6лайковвеса обновлены4 окт 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Plume256k — языковая модель для машинного перевода, разработанная подразделением Language Technologies Unit Барселонского суперкомпьютерного центра (BSC). Модель обучена с нуля только на параллельных данных с каталонским языком в качестве центрального и предназначена для перевода предложений. Она основана на плотной архитектуре Gemma, имеет 2,5 млрд параметров и словарь размером 256 тысяч токенов; контекст составляет 8192 токена.

Модель поддерживает испанский, французский, итальянский, португальский, галисийский, немецкий, английский и баскский языки. Она обучена для 16 контролируемых направлений перевода с каталонским языком и, по данным карточки, способна переводить ещё в 56 направлениях без прямого обучения. Опубликованные оценки приводятся на наборах FLORES-200 и NTREX.

Модель распространяется по лицензии Apache 2.0. Авторы предупреждают о возможных смещениях и нежелательных искажениях, поскольку обучающие данные собирались из веб-источников; оценка токсичности не проводилась. Карточка описывает перевод предложений, поэтому пригодность для длинных документов отдельно не заявлена.

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

  • Перевод предложений с каталонского на испанский и обратно
  • Перевод между каталонским и французским, итальянским или португальским
  • Перевод между каталонским и галисийским, немецким, английским или баскским
  • Эксперименты с контролируемым и zero-shot машинным переводом
  • Оценка качества перевода на наборах FLORES-200 и NTREX

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Plume256k

This is the model card of Plume (Parallel Language Model) with a vocabulary size of 256k.

Table of Contents

Summary

Plume is the first LLM trained for Neural Machine Translation with only parallel Catalan-Centric data from scratch. It is a language model with the same architecture as Gemma 2B. The model is trained for general translation tasks at sentence level. For more information about training, architecture and interpretability of the model check out the paper; "Investigating the translation capabilities of Large Language Models trained on parallel data only". The preprint is available on arXiv.

  • Developed by: The Language Technologies Unit from Barcelona Supercomputing Center (BSC).
  • Languages: Spanish, French, Italian, Portuguese, Galician, German, English, and Basque.
  • License: Apache License, Version 2.0

Model Description

In recent years, Large Language Models (LLMs) have demonstrated exceptional proficiency across a broad spectrum of Natural Language Processing (NLP) tasks, including Machine Translation. However, previous methodologies predominantly relied on iterative processes such as instruction fine-tuning or continual pre-training, leaving unexplored the challenges of training LLMs solely on parallel data. In this work, we introduce Plume (Parallel Language Model), a collection of three 2B LLMs featuring varying vocabulary sizes (32k, 128k, and 256k) trained exclusively on Catalan-centric parallel examples. These models perform comparable to previous encoder-decoder architectures on 16 supervised translation directions and 56 zero-shot ones.

For more details regarding the model architecture, the dataset and model interpretability take a look at the paper.

Intended Uses and Limitations

The model is proficient in 16 supervised translation directions that include Catalan and is capable of translating in other 56 zero-shot directions as well.

At the time of submission, no measures have been taken to estimate the bias and added toxicity embedded in the model. However, we are aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.

Run the model

from transformers import AutoTokenizer, AutoModelForCausalLM

# language codes: spa_Latn (Spanish), cat_Latn (Catalan), eng_Latn (English), ita_Latn (Italian), 
# eus_Latn (Basque), deu_Latn (German), por_Latn (Portuguese), glg_Latn (Galician), fra_Latn (French)

model_id = "projecte-aina/Plume256k"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

src_lang_code = 'spa_Latn'
tgt_lang_code = 'cat_Latn'
sentence = 'Ayer se fue, tomó sus cosas y se puso a navegar.'
prompt = '<s> [{}] {} \n[{}]'.format(src_lang_code, sentence, tgt_lang_code)
input_ids = tokenizer(prompt, return_tensors='pt').input_ids
output_ids = model.generate( input_ids, max_length=200, num_beams=5 )
input_length = input_ids.shape[1]
generated_text = tokenizer.decode(output_ids[0, input_length: ], skip_special_tokens=True).strip()
# Ahir se'n va anar, va agafar les seves coses i es va posar a navegar.

Training

For training, the learning rate is warmed up from 1e-7 to a maximum of 3e-4 over the first 2000 steps. We apply a weight decay of 0.1 and a gradient clipping of 1.0. During training, we set an effective batch size of 81,920 tokens per gradient step distributed over 40 NVIDIA H100-64GB GPUs. We use DeepSpeed with full float32 training. We show in the next table the training hyperparameters:

Hyper-ParameterValue
Batch size40
Number of Epochs1
OptimizerAdam
Adam-β₁0.9
Adam-β₂0.999
Adam-ε1e-08
Learning rate3e-04
LR SchedulerLinear
Warmup Steps2000

More training details are specified in the paper. Code for training the model and running other experiments can be found in our GitHub repository.

Evaluation

Below are the evaluation results on Flores-200 and NTREX for supervised MT directions. For more details about model evaluation check out the paper.

ModelFLORES BLEUFLORES COMETNTREX BLEUNTREX COMET
NLLB-1.3B31.020.8629.680.85
NLLB-600M29.240.8528.370.84
Bilinguals BSC31.930.8629.770.84
Plume 32k30.440.8628.460.84
Plume 128k30.810.8628.780.84
Plume 256k30.720.8628.870.84

Citation

@misc{gilabert2024investigating,
      title={Investigating the translation capabilities of Large Language Models trained on parallel data only}, 
      author={Javier García Gilabert and Carlos Escolano and Aleix Sant Savall and Francesca De Luca Fornaciari and Audrey Mash and Xixian Liao and Maite Melero},
      year={2024},
      eprint={2406.09140},
      archivePrefix={arXiv}
}

Additional information

Author

The Language Technologies Unit from Barcelona Supercomputing Center.

Contact

Feel free to write us at with any questions you may have to {javier.garcia1, carlos.escolano, aleix.santsavall, francesca.delucafornaciari, audrey.mash, xixian.liao, maite.melero}@bsc.es

Copyright

Copyright(c) 2023 by Language Technologies Unit, Barcelona Supercomputing Center.

License

Apache License, Version 2.0

Funding

This work has been promoted and financed by the Government of Catalonia through the Aina project, by the Ministerio para la Transformación Digital y de la Función Pública and Plan de Recuperación, Transformación y Resiliencia - Funded by EU – NextGenerationEU within the framework of the project ILENIA with reference 2022/TL22/00215337, as well as by DeepR3 (TED2021-130295B-C32) founded by MCIN/AEI/10.13039/501100011033 and European Union NextGeneration EU/PRTR.

Disclaimer

The model published in this repository is intended for a generalist purpose and is available to third parties under a permissive Apache License, Version 2.0.

Be aware that the model may have biases and/or any other undesirable distortions.

When third parties deploy or provide systems and/or services to other parties using this model (or any system based on it) or become users of the model, they should note that it is their responsibility to mitigate the risks arising from its use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.

In no event shall the owner and creator of the model (Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей