## BART-Ca fine-tuned on the CaSum dataset for summarization

## Table of Contents
<details>
<summary>Click to expand</summary>

- [Model description](#model-description)
- [Intended uses and limitations](#intended-use)
- [How to use](#how-to-use)
- [Limitations and bias](#limitations-and-bias)
- [Training](#training)
  - [Training data](#training-data)
  - [Training procedure](#training-procedure)
    - [Tokenization](#tokenization)
    - [Hyperparameters](#hyperparameters)
- [Evaluation](#evaluation)
   - [Variable and metrics](#variable-and-metrics)
   - [Evaluation results](#evaluation-results)
- [Additional information](#additional-information)
  - [Author](#author)
  - [Contact information](#contact-information)
  - [Copyright](#copyright)
  - [Licensing information](#licensing-information)
  - [Funding](#funding)
  - [Citing information](#citing-information)
  - [Disclaimer](#disclaimer)
</details>

## Model description

The [BART-ca](https://huggingface.co/projecte-aina/bart-base-ca) model has been fine-tuned on summarization with the [CaSum](https://huggingface.co/datasets/projecte-aina/casum) dataset that has been created along with the model. We also evaluate on an out-of-distribution dataset, [VilaSum](https://huggingface.co/datasets/projecte-aina/vilasum).

The model has been fine-tuned on news articles and is expected to work best with that type of text.

## Intended uses and limitations
You can use this model for text summarization. 

## How to use

Here is how to use this model with the [pipeline API](https://huggingface.co/transformers/main_classes/pipelines.html):

```python
from transformers import pipeline
summarizer = pipeline("summarization", model="projecte-aina/bart-base-ca-casum")
ARTICLE = """"El projecte AINA generarà els recursos digitals i lingüístics necessaris per facilitar el desenvolupament d’aplicacions basades en la intel·ligència artificial i les tecnologies de la llengua, com ara els assistents de veu, els traductors automàtics o els agents conversacionals en català. L’objectiu últim és que la ciutadania pugui participar en català en el món digital al mateix nivell que els parlants d’una llengua global, com ara l’anglès, i evitar així l’extinció digital de la llengua. El primer recurs generat és el corpus del català per entrenar els algoritmes d’intel·ligència artificial (IA), el més gran creat fins al moment, amb 1.770 milions de metadades associades a paraules. El proper pas serà generar els models de la llengua, models de la parla i models de traducció utilitzant xarxes neuronals multicapa, perquè les empreses que creen aplicacions basades en intel·ligència artificial (IA), com ara assistents de veu, traductors automàtics, agents conversacionals, etc., puguin fer-ho fàcilment en català."""
print(summarizer(ARTICLE, max_length=130, min_length=30, do_sample=False))
>>> [{'summary_text': 'El projecte AINA generarà els recursos digitals i lingüístics necessaris per al desenvolupament d’aplicacions basades en la intel·ligència artificial en català’'}]
```

## Limitations and bias
At the time of submission, no measures have been taken to estimate the bias 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

### Training data

As training data, we used the [CaSum](https://huggingface.co/datasets/projecte-aina/casum) dataset extracted from a newswire corpus crawled from the [Catalan News Agency](https://www.acn.cat/).

### Training procedure

#### Tokenization

The training corpus has been tokenized using a byte version of [Byte-Pair Encoding (BPE)](https://github.com/openai/gpt-2) with a vocabulary size of 51,200 tokens. 

#### Hyperparameters

The fine-tuning hyperparameters were taken from the fairseq's [Fine-tuning BART on CNN-Dailymail summarization task](https://github.com/facebookresearch/fairseq/blob/main/examples/bart/README.summarization.md) example.

## Evaluation

### Variable and metrics

We use Rouge-1 and Rouge-L for evaluation on two different test sets: the [CaSum](https://huggingface.co/datasets/projecte-aina/casum) test set and an out of distribution test set, [VilaSum](https://huggingface.co/datasets/projecte-aina/vilasum).

### Evaluation results

Below the evaluation results on the summarization task compared with the multilingual mBERT and the Catalan [NASCA](https://huggingface.co/ELiRF/NASCA) with two different testsets: [CaSum](https://huggingface.co/datasets/projecte-aina/casum) and [VilaSum](https://huggingface.co/datasets/projecte-aina/vilasum).

|Test set  | Model  | Rouge-1  |  Rouge-L  |
| ------------|:-------------:| -----:|:------|
|CaSum | BART-Ca  |  41.39  |  36.14  |
| | NASCA  |  24.42  |  19.89  |
| | mBART  |  **43.95**  |  **38.11**  |
|VilaSum  | BART-Ca  |  **35.04**  |  **29.70**  |
| | NASCA  |  23.18 |  19.09 |
| | mBART  |  33.17  |  27.52  |


## Additional information

### Author
Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@bsc.es)

### Contact information
For further information, send an email to aina@bsc.es

### Copyright
Copyright (c) 2022 Text Mining Unit at Barcelona Supercomputing Center 

### Licensing information
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)

### Funding
This work was funded by MT4All CEF project and the [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](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina).

### Citation information

If you use any of these resources (datasets or models) in your work, please cite our latest preprint:

```bibtex
@misc{degibert2022sequencetosequence,
      title={Sequence-to-Sequence Resources for Catalan}, 
      author={Ona de Gibert and Ksenia Kharitonova and Blanca Calvo Figueras and Jordi Armengol-Estapé and Maite Melero},
      year={2022},
      eprint={2202.06871},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
```

### Disclaimer

<details>
<summary>Click to expand</summary>

The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.

When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their 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 models (BSC – Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties of these models.

{"language": "ca", "license": "mit", "tags": ["summarization"], "datasets": ["projecte-aina/casum"], "widget": [{"text": "El projecte AINA generar\u00e0 els recursos digitals i ling\u00fc\u00edstics necessaris per facilitar el desenvolupament d\u2019aplicacions basades en la intel\u00b7lig\u00e8ncia artificial i les tecnologies de la llengua, com ara els assistents de veu, els traductors autom\u00e0tics o els agents conversacionals en catal\u00e0. L\u2019objectiu \u00faltim \u00e9s que la ciutadania pugui participar en catal\u00e0 en el m\u00f3n digital al mateix nivell que els parlants d\u2019una llengua global, com ara l\u2019angl\u00e8s, i evitar aix\u00ed l\u2019extinci\u00f3 digital de la llengua. El primer recurs generat \u00e9s el corpus del catal\u00e0 per entrenar els algoritmes d\u2019intel\u00b7lig\u00e8ncia artificial (IA), el m\u00e9s gran creat fins al moment, amb 1.770 milions de metadades associades a paraules. El proper pas ser\u00e0 generar els models de la llengua, models de la parla i models de traducci\u00f3 utilitzant xarxes neuronals multicapa, perqu\u00e8 les empreses que creen aplicacions basades en intel\u00b7lig\u00e8ncia artificial (IA), com ara assistents de veu, traductors autom\u00e0tics, agents conversacionals, etc., puguin fer-ho f\u00e0cilment en catal\u00e0."}, {"text": "El Govern vol que el catal\u00e0 tamb\u00e9 sigui una llengua \u00fatil per a la tecnologia i per comunciar-se amb les m\u00e0quines. Per aix\u00f2, el projecte AINA, impulsat pel Departament de la Vicepresid\u00e8ncia, Pol\u00edtiques Digitals i Territori en col\u00b7laboraci\u00f3 amb el Barcelona Supercomputing Center (BSC), llan\u00e7ar\u00e0 el 17 de febrer una campanya de captaci\u00f3 de veus per generar el primer corpus o \"diccionari\" de veu del catal\u00e0 amb l'objectiu de fer que la tecnologia parli i entengui el catal\u00e0 i la ciutadania s'hi pugui relacionar amb aquesta llengua. Per a l'executiu, aquest projecte \u00e9s d'una \"import\u00e0ncia cabdal\", com ha detallat el vicepresident, Jordi Puigner\u00f3, tamb\u00e9 per refor\u00e7ar la llengua catalana a Internet. El pressupost que s'hi destinar\u00e0 aquest any \u00e9s de tres milions d'euros. Per aix\u00f2, amb el lema \"La nostra llengua \u00e9s la teva veu\", convida la ciutadania de totes les variants dialectals del catal\u00e0 ha compartir la seva veu mitjan\u00e7ant la lectura d'uns textos. La fita que s'ha marcat AINA per aquest any \u00e9s la creaci\u00f3 de la primera versi\u00f3 d'aquest diccionari de veus en catal\u00e0, amb \"com m\u00e9s hores de veu i com m\u00e9s diverses millor\". El Govern confia en una bona resposta a la campanya, que arrencar\u00e0 a partir de dem\u00e0, i que es desplegar\u00e0 per tot el territori de parla catalana, per comptar amb diverses variants dialectals. No hi ha limitaci\u00f3 d'edat per a qui vulgui participar, i \u00e9s important que la gent que participi es registri per obtenir m\u00e9s informaci\u00f3 sobre genere, edat i distribuci\u00f3 geogr\u00e0fica. Ara com ara hi ha 1.000 hores de veu i el repte \u00e9s aconseguir arribar a les 2.000 (amb transcripci\u00f3) aquest any. El vicepresident i conseller de Pol\u00edtiques Digitals, Jordi Puigner\u00f3, ha recordat que fa un any es va donar el tret de sortida al projecte AINA, una aposta per a l'\u00fas del catal\u00e0 en l'\u00e0mbit tecnol\u00f2gic. El projecte implica un impuls del catal\u00e0 en les eines digitals i per \"conquerir nous territoris\", que passen per noves plataformes i nous dispositius. Tamb\u00e9 \u00e9s un projecte per \"garantir drets\". \"Els catalanes tenim dret a poder relacionar-nos en catal\u00e0 amb les maquines i evitar haver de canviar de llengua a l'hora de parlar amb les maquines\", ha remarcat Puigner\u00f3. Un altre objectiu d'aquest projecte passa per \"generar talent digital\" i un ecosistema en l'\u00e0mbit de la intel\u00b7lig\u00e8ncia artificial. \"Ens toca ser un pa\u00eds digital\", ha insistit Puigner\u00f3. I per qu\u00e8 AINA? \"La filla de la Norma, que porta el nom de la seva \u00e0via, Aina Moll, la primera directora de pol\u00edtica ling\u00fc\u00edstica de la Generalitat\", ha explicat el vicepresident. Per tot plegat, aquest dimecres arrenca la campanya de captaci\u00f3 de veus. \"Volem socialitzar AINA cap a la ciutadania i que molta gent vulgui ser la seva parella ling\u00fc\u00edstica i pugui aprendre el catal\u00e0\", ha dit Puigner\u00f3, que ha demanat que aquesta sigui una tasca de tots. El projecte, a dia d'avui, ja coneix la sintaxis del catal\u00e0. En aquesta nova fase, a partir de dem\u00e0, tamb\u00e9 ha de con\u00e8ixer el l\u00e8xic i la sem\u00e0ntica, i tota la part oral de la llengua catalana. \"Si ja tenim la columna vertebral i l'esquelet, ara hem de construir la seva musculatura\", ha apuntat el vicepresident. La campanya es far\u00e0 a trav\u00e9s d'una web que permetr\u00e0 que qualsevol persona pugui ensenyar a AINA a aprendre catal\u00e0. I com es pot fer? \u00c9s senzill. A partir que arrenqui la campanya, qui estigui interessat en col\u00b7laborar haur\u00e0 d'entrar a www.projecteaina.cat i anar a l'espai corresponent. Un cop all\u00e0, haur\u00e0 de destinar una estona a llegir frases que li proposar\u00e0 la plataforma i podr\u00e0 validar tamb\u00e9 frases d'altres persones."}]}
transformers pytorch bart text2text-generation summarization ca dataset:projecte-aina/casum arxiv:2202.06871 license:mit autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #bart #text2text-generation #summarization #ca #dataset-projecte-aina/casum #arxiv-2202.06871 #license-mit #autotrain_compatible #endpoints_compatible #region-us 

BART-Ca fine-tuned on the CaSum dataset for summarization
---------------------------------------------------------


Table of Contents
-----------------



Click to expand
* Model description
* Intended uses and limitations
* How to use
* Limitations and bias
* Training
	+ Training data
	+ Training procedure
		- Tokenization
		- Hyperparameters
* Evaluation
	+ Variable and metrics
	+ Evaluation results
* Additional information
	+ Author
	+ Contact information
	+ Copyright
	+ Licensing information
	+ Funding
	+ Citing information
	+ Disclaimer



Model description
-----------------


The BART-ca model has been fine-tuned on summarization with the CaSum dataset that has been created along with the model. We also evaluate on an out-of-distribution dataset, VilaSum.


The model has been fine-tuned on news articles and is expected to work best with that type of text.


Intended uses and limitations
-----------------------------


You can use this model for text summarization.


How to use
----------


Here is how to use this model with the pipeline API:


Limitations and bias
--------------------


At the time of submission, no measures have been taken to estimate the bias 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
--------


### Training data


As training data, we used the CaSum dataset extracted from a newswire corpus crawled from the Catalan News Agency.


### Training procedure


#### Tokenization


The training corpus has been tokenized using a byte version of Byte-Pair Encoding (BPE) with a vocabulary size of 51,200 tokens.


#### Hyperparameters


The fine-tuning hyperparameters were taken from the fairseq's Fine-tuning BART on CNN-Dailymail summarization task example.


Evaluation
----------


### Variable and metrics


We use Rouge-1 and Rouge-L for evaluation on two different test sets: the CaSum test set and an out of distribution test set, VilaSum.


### Evaluation results


Below the evaluation results on the summarization task compared with the multilingual mBERT and the Catalan NASCA with two different testsets: CaSum and VilaSum.



Additional information
----------------------


### Author


Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@URL)


### Contact information


For further information, send an email to aina@URL


### Copyright


Copyright (c) 2022 Text Mining Unit at Barcelona Supercomputing Center


### Licensing information


Apache License, Version 2.0


### Funding


This work was funded by MT4All CEF project and the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya within the framework of Projecte AINA.


information


If you use any of these resources (datasets or models) in your work, please cite our latest preprint:


### Disclaimer



Click to expand
The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.


When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their 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 models (BSC – Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties of these models.



### Training data


As training data, we used the CaSum dataset extracted from a newswire corpus crawled from the Catalan News Agency. ### Training procedure #### Tokenization


The training corpus has been tokenized using a byte version of Byte-Pair Encoding (BPE) with a vocabulary size of 51,200 tokens. #### Hyperparameters


The fine-tuning hyperparameters were taken from the fairseq's Fine-tuning BART on CNN-Dailymail summarization task example.


Evaluation
---------- ### Variable and metrics


We use Rouge-1 and Rouge-L for evaluation on two different test sets: the CaSum test set and an out of distribution test set, VilaSum. ### Evaluation results


Below the evaluation results on the summarization task compared with the multilingual mBERT and the Catalan NASCA with two different testsets: CaSum and VilaSum.



Additional information
---------------------- ### Author


Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@URL) ### Contact information


For further information, send an email to aina@URL ### Copyright


Copyright (c) 2022 Text Mining Unit at Barcelona Supercomputing Center ### Licensing information


Apache License, Version 2.0 ### Funding


This work was funded by MT4All CEF project and the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya within the framework of Projecte AINA.


information


If you use any of these resources (datasets or models) in your work, please cite our latest preprint: ### Disclaimer



Click to expand
The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.


When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their 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 models (BSC – Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties of these models.
TAGS
#transformers #pytorch #bart #text2text-generation #summarization #ca #dataset-projecte-aina/casum #arxiv-2202.06871 #license-mit #autotrain_compatible #endpoints_compatible #region-us 
 ### Training data


As training data, we used the CaSum dataset extracted from a newswire corpus crawled from the Catalan News Agency. ### Training procedure #### Tokenization


The training corpus has been tokenized using a byte version of Byte-Pair Encoding (BPE) with a vocabulary size of 51,200 tokens. #### Hyperparameters


The fine-tuning hyperparameters were taken from the fairseq's Fine-tuning BART on CNN-Dailymail summarization task example.


Evaluation
---------- ### Variable and metrics


We use Rouge-1 and Rouge-L for evaluation on two different test sets: the CaSum test set and an out of distribution test set, VilaSum. ### Evaluation results


Below the evaluation results on the summarization task compared with the multilingual mBERT and the Catalan NASCA with two different testsets: CaSum and VilaSum.



Additional information
---------------------- ### Author


Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@URL) ### Contact information


For further information, send an email to aina@URL ### Copyright


Copyright (c) 2022 Text Mining Unit at Barcelona Supercomputing Center ### Licensing information


Apache License, Version 2.0 ### Funding


This work was funded by MT4All CEF project and the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya within the framework of Projecte AINA.


information


If you use any of these resources (datasets or models) in your work, please cite our latest preprint: ### Disclaimer



Click to expand
The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.


When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their 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 models (BSC – Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties of these models.
passage: TAGS
#transformers #pytorch #bart #text2text-generation #summarization #ca #dataset-projecte-aina/casum #arxiv-2202.06871 #license-mit #autotrain_compatible #endpoints_compatible #region-us 
### Training data


As training data, we used the CaSum dataset extracted from a newswire corpus crawled from the Catalan News Agency.### Training procedure#### Tokenization


The training corpus has been tokenized using a byte version of Byte-Pair Encoding (BPE) with a vocabulary size of 51,200 tokens.#### Hyperparameters


The fine-tuning hyperparameters were taken from the fairseq's Fine-tuning BART on CNN-Dailymail summarization task example.


Evaluation
----------### Variable and metrics


We use Rouge-1 and Rouge-L for evaluation on two different test sets: the CaSum test set and an out of distribution test set, VilaSum.### Evaluation results


Below the evaluation results on the summarization task compared with the multilingual mBERT and the Catalan NASCA with two different testsets: CaSum and VilaSum.



Additional information
----------------------### Author


Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@URL)### Contact information


For further information, send an email to aina@URL### Copyright


Copyright (c) 2022 Text Mining Unit at Barcelona Supercomputing Center### Licensing information


Apache License, Version 2.0### Funding


This work was funded by MT4All CEF project and the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya within the framework of Projecte AINA.


information


If you use any of these resources (datasets or models) in your work, please cite our latest preprint: