/ Модель

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

Опубликована
15 дек 2023

FLOR-6.3B

Генерация текстаТекст → текст

FLOR-6.3B — языковая модель на основе BLOOM, адаптированная для генерации текста на каталанском, испанском и английском языках.

10скачиваний за 30 дней33лайкавеса обновлены27 фев 2025

Бенчмарки

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

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

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

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

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

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

FLOR-6.3B — причинная трансформерная языковая модель на 6,3 млрд параметров, разработанная подразделением Language Technologies Unit Барселонского суперкомпьютерного центра в рамках проекта AINA. Модель создана на основе BLOOM-7.1B: словарь и слой эмбеддингов адаптировали для каталанского, испанского и английского, после чего продолжили предобучение на 140 млрд токенов этих языков.

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

Модель снята с активной поддержки и объявлена устаревшей. Авторы не оценивали встроенные предвзятость и токсичность; данные собраны из веб-источников и могут содержать нежелательные смещения. Лицензия — Apache License 2.0.

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

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

Ограничения

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

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

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

Открыть на Hugging Face

FLOR-6.3B

⚠️NOTICE⚠️: This model has been deprecated and is no longer actively maintained or supported. To access the latest models with enhanced features, better performance, and ongoing support, please visit https://huggingface.co/BSC-LT

Table of Contents

Model description

FLOR-6.3B is a 6.3B-parameter transformer-based causal language model for Catalan, Spanish, and English. It is the result of a language adaptation technique performed on BLOOM-7.1B, which involves modifying the model's vocabulary and embedding layer, and continuously pre-training the model with 140B tokens in our target languages.

For more details, take a look at this blogpost about the project.

Intended uses and limitations

The FLOR-6.3B model is ready-to-use only for causal language modeling. It can perform text-generation tasks and be fine-tuned for specific scenarios.

How to use

import torch
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM

input_text = "Sovint em trobo pensant en tot allò que"

model_id  = "projecte-aina/FLOR-6.3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
generator = pipeline(
    "text-generation",
    model=model_id,
    tokenizer=tokenizer,
    torch_dtype=torch.bfloat16,
    trust_remote_code=True,
    device_map="auto",
)
generation = generator(
    input_text,
    do_sample=True,
    top_k=10,
    eos_token_id=tokenizer.eos_token_id,
)

print(f"Result: {generation[0]['generated_text']}")

Limitations and bias

At the time of submission, no measures have been taken to estimate the bias and toxicity embedded in the model. However, we are well 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.

Training

Language adaptation and training

The language adaptation technique used to create FLOR-6.3B requires the vocabulary of the source model to be adapted before continuing its pre-training with data in the target languages. Specifically, we proceeded as follows:

  1. We trained our own BPE tokenizer for Catalan, Spanish, and English, and replaced the original BLOOM tokenizer and vocabulary with it. This procedure implied a downsizing of the original BLOOM's embedding layer and, therefore, a model compression from 7.1B parameters to 6.3B.
  2. The embeddings corresponding to tokens that are present in both the original and the target vocabulary (matching tokens) were used for initialization.
  3. The embeddings from tokens not present in BLOOM's original vocabulary were initialized as the average of all embeddings.
  4. The model was initialized with the weights from BLOOM-7.1B, and with our adapted tokenizer (step 1) and embeddings (steps 2-3).
  5. The model was then trained on a corpus that contains a mixture of Catalan, Spanish, and English data.

Training data

The training corpus is composed of 140B tokens gathered from web crawlings and public domain data. Most of the sources in Catalan have been obtained from the CATalog 1.0 dataset, filtered with a minimum threshold of 0.6 and oversampling some of the sources it integrates to different extents.

DatasetLanguageWords (per-epoch)EpochsTotal Tokens
mc4ca5,861.79M1.513,452.81M
MaCoCuca1,658.89M25,076.21M
CaWacca1,286.83M2.54,922.14M
oscar-2301ca1,784.57M1.754,778.17M
RacoCatala Articlesca358.57M42,194.42M
RacoCatala Forumsca1,301.12M11,990.71M
Tesis (TDX)ca323.60M41,980.46M
oscar-2201ca1,155.35M11,767.69M
Wikipediaca266.69M41,632.17M
Nació Digitalca216.27M41,323.59M
colossal-oscar-05-06-23ca207.59M41,270.43M
colossal-oscar-03-04-23ca195.43M41,196.01M
colossal-oscar-2022-27ca195.03M41,193.59M
Crawling popularsca683.25M11,045.38M
El Mónca85.27M4521.85M
ACNca81.25M4497.22M
DOGVca76.48M4468.05M
DOGCca70.51M4431.51M
Vilawebca46.90M4287.04M
hpltca160.27M1245.21M
Les Corts Valencianesca26.88M4164.53M
IB3ca15.82M496.82M
BOUAca13.42M482.13M
Parlamentca10.09M461.77M
Aquí Berguedàca8.23M450.34M
Wikimediaca3.90M423.88M
Gutenbergca1.29M47.87M
OSCAR 23.01es53,244.56M0.30323,070.34M
colossal_oscar_05-06-23es5,548.27M17,934.02M
colossal_oscar_03-04-23es5,090.46M17,279.36M
All_bio_corporaes954.85M22,730.88M
Wikipediaes777.49M22,223.63M
BOEes1,031.28M11,474.73M
Tesis (TDX)es268.66M2768.37M
Eurlexes459.19M1656.64M
CSICes156.76M2448.33M
BORMEes63.23M190.42M
colossal_oscar_05-06-23en51,615.35M0.2521,162.30M
colossal_oscar_03-04-23en49,454.01M0.1411,354.64M
Wikipediaen2,116.53M26,942.23M
Gutenbergen3,513.82M15,762.66M
Eurlexen438.92M1719.83M
legal-mc4en417.97M1685.47M

Languages

The training data has the same amount of Catalan, Spanish, and English texts. The table below shows the final language distribution:

LanguagePercentage
Catalan (CA)33.39%
Spanish (ES)33.32%
English (EN)33.29%

Framework

The training was conducted in 16 Cerebras' CS-2 systems using the cs-2.0.2 release of their software.

Evaluation

FLOR-6.3B has been evaluated in a 5-shot setting, using EleutherAI's LM Evaluation Harness. The evaluation benchmark includes tasks in Catalan, Spanish, and English, with particular emphasis on Catalan datasets.

The tasks were chosen to cover several evaluation areas in order to provide a comprehensive overview of the model's capabilities. The baselines used to compare our results are multilingual and English open-source 7B models and smaller models of the FLOR family of models: TBC.

Our implementation of EleutherAI's LM Evaluation Harness can be found here.

The following is a list of evaluation areas and their respective datasets:

Results

DatasetLang.TaskFLOR-6.3BBLOOM-7.1B
TecacaNatural Language Inference49.79🔥46.91
XNLIcaNatural Language Inference51.70🔥49.20
XNLIesNatural Language Inference50.28🔥47.62
XNLIenNatural Language Inference52.55🔥51.96
BelebelecaReading Comprehension48.98🔥48.57
BelebeleesReading Comprehension48.1648.16
BelebeleenReading Comprehension49.8050.20🔥
CatalanQAcaQuestion Answering71.80🔥69.54
CoQCatcaQuestion Answering65.96🔥58.49
XQuADcaQuestion Answering59.0160.94🔥
XQuADesQuestion Answering63.80🔥61.76
XQuADenQuestion Answering70.02🔥69.76
COPAcaQuestion Answering78.00🔥72.60
COPAenQuestion Answering81.00🔥79.00
XStoryClozeesQuestion Answering69.82🔥66.45
XStoryClozeenQuestion Answering74.45🔥70.81
ParafrasejacaParaphrase Identification62.88🔥60.27
PAWS-XcaParaphrase Identification59.70🔥59.35
PAWS-XesParaphrase Identification57.7058.65🔥
PAWS-XenParaphrase Identification59.6562.85🔥
FLoResca->esMachine Translation24.98🔥24.21
FLoReses->caMachine Translation25.24🔥23.19
FLoResca->enMachine Translation42.89🔥40.93
FLoResen->caMachine Translation39.29🔥34.30
FLoReses->enMachine Translation28.61🔥27.48
FLoResen->esMachine Translation25.35🔥23.72

Note: The metrics are F1-score for question-answering tasks, BLEU for translation, and accuracy for the rest.

Additional information

Author

The Language Technologies Unit from Barcelona Supercomputing Center.

Contact

For further information, please send an email to langtech@bsc.es.

Copyright

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

License

Apache License, Version 2.0

Funding

This work was funded by [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of Projecte AINA.

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

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

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

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

Ревизия весов
9cbc0b5

0 моделей