## m2m100 fine-tuned on Softcatalà's parallel Catalan-German dataset for machine translation

## 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)
- [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)
  - [Licensing information](#licensing-information)
  - [Funding](#funding)
  - [Disclaimer](#disclaimer)

</details>

## Model description

This model was obtained by fine-tuning the [m2m100_418M](https://huggingface.co/facebook/m2m100_418M) model on a De-Ca machine translation task with the [Softcatalà Catalan-German parallel corpus](https://github.com/Softcatala/parallel-catalan-corpus/tree/master/deu-cat) dataset, with sentences deduplicated and filtered by the [GEnCaTa quality filter](https://huggingface.co/projecte-aina/mbert-base-gencata). We also evaluate it on a general-domain multilingual testset [Flores-200](https://github.com/facebookresearch/flores) and [WMT13](https://www.statmt.org/wmt13/).

## Intended uses and limitations

You can use this model for machine translation from German to Catalan.

## How to use

```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("projecte-aina/2m100-418M-ft-de-ca")

model = AutoModelForSeq2SeqLM.from_pretrained("projecte-aina/2m100-418M-ft-de-ca")
```

## Training

### Training data

As a data for fine-tuning we used the [Softcatalà Catalan-German parallel corpus](https://github.com/Softcatala/parallel-catalan-corpus/tree/master/deu-cat) dataset, with sentences deduplicated and filtered by the [GEnCaTa quality filter](https://huggingface.co/projecte-aina/mbert-base-gencata).

### Training procedure

#### Tokenization

The original [m2m100_418M](https://huggingface.co/facebook/m2m100_418M) model's sentencepiece tokenizer was used.

#### Hyperparameters

The model was trained for 2 epochs with the default parameters and \\(LR = 2\mathrm{e}{-5}\\).

## Evaluation

### Variable and metrics

We use the BLEU score for evaluation on test sets: [Flores-200](https://github.com/facebookresearch/flores) and [WMT13](https://www.statmt.org/wmt13/).

### Evaluation results

Below are the evaluation results on the machine translation from German to Catalan compared with the original m2m100 on a testset: [Flores-200](https://github.com/facebookresearch/flores).

|Test set  | Model  | BLEU  | TER | METEOR | chrF
| ------------|-------------| -----| -----| -----| -----|
|Flores-200 | m2m100  | 26.6 | 63.1 | 54.0 | 53.5 |
| | m2m100-418M-ft-de-ca  |  **28.5**  |  **60.7** | **55.9** | **55.9** |
|WMT13 | m2m100  | 21.8 | 72.8 | 48.0 | 53.5 |
| | m2m100-418M-ft-de-ca  |  **22.9**  |  **71.0** | **49.5** | **54.1** |

## Additional information

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

### Funding
This work was funded by 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
```
@article{garriga2022catalan,
  title={A Catalan-German machine translation system based on the M2M-100 multilingual model},
  author={Garriga Riba, Pol},
  year={2022},
  url={https://repositori.upf.edu/bitstream/handle/10230/54301/GarrigaRiba_2022.pdf?sequence=1&isAllowed=y}
}
```

### 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", "de", "multilingual"], "license": "cc-by-4.0", "datasets": ["Softcatala/parallel-catalan-corpus/deu-cat"], "metrics": ["bleu", "meteor", "chrf", "ter"], "model-index": [{"name": "m2m100_418M_ft_de_ca", "results": [{"task": {"type": "translation"}, "dataset": {"name": "Flores", "type": "flores"}, "metrics": [{"type": "bleu", "value": 28.5, "name": "BLEU"}, {"type": "ter", "value": 60.7, "name": "TER"}, {"type": "meteor", "value": 55.9, "name": "METEOR"}, {"type": "chrf", "value": 55.9, "name": "chrF"}]}, {"task": {"type": "translation"}, "dataset": {"name": "WMT13", "type": "wmt/wmt13"}, "metrics": [{"type": "bleu", "value": 22.9, "name": "BLEU"}, {"type": "ter", "value": 71.0, "name": "TER"}, {"type": "meteor", "value": 49.5, "name": "METEOR"}, {"type": "chrf", "value": 54.1, "name": "chrF"}]}]}]}
transformers pytorch m2m_100 text2text-generation ca de multilingual license:cc-by-4.0 model-index autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #pytorch #m2m_100 #text2text-generation #ca #de #multilingual #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #has_space #region-us 

m2m100 fine-tuned on Softcatalà's parallel Catalan-German dataset for machine translation
-----------------------------------------------------------------------------------------


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



Click to expand
* Model description
* Intended uses and limitations
* How to Use
* Training
	+ Training data
	+ Training procedure
		- Tokenization
		- Hyperparameters
* Evaluation
	+ Variable and metrics
	+ Evaluation results
* Additional information
	+ Licensing information
	+ Funding
	+ Disclaimer



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


This model was obtained by fine-tuning the m2m100\_418M model on a De-Ca machine translation task with the Softcatalà Catalan-German parallel corpus dataset, with sentences deduplicated and filtered by the GEnCaTa quality filter. We also evaluate it on a general-domain multilingual testset Flores-200 and WMT13.


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


You can use this model for machine translation from German to Catalan.


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


Training
--------


### Training data


As a data for fine-tuning we used the Softcatalà Catalan-German parallel corpus dataset, with sentences deduplicated and filtered by the GEnCaTa quality filter.


### Training procedure


#### Tokenization


The original m2m100\_418M model's sentencepiece tokenizer was used.


#### Hyperparameters


The model was trained for 2 epochs with the default parameters and \(LR = 2\mathrm{e}{-5}\).


Evaluation
----------


### Variable and metrics


We use the BLEU score for evaluation on test sets: Flores-200 and WMT13.


### Evaluation results


Below are the evaluation results on the machine translation from German to Catalan compared with the original m2m100 on a testset: Flores-200.



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


### Licensing information


Apache License, Version 2.0


### Funding


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


### 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 a data for fine-tuning we used the Softcatalà Catalan-German parallel corpus dataset, with sentences deduplicated and filtered by the GEnCaTa quality filter. ### Training procedure #### Tokenization


The original m2m100\_418M model's sentencepiece tokenizer was used. #### Hyperparameters


The model was trained for 2 epochs with the default parameters and \(LR = 2\mathrm{e}{-5}\).


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


We use the BLEU score for evaluation on test sets: Flores-200 and WMT13. ### Evaluation results


Below are the evaluation results on the machine translation from German to Catalan compared with the original m2m100 on a testset: Flores-200.



Additional information
---------------------- ### Licensing information


Apache License, Version 2.0 ### Funding


This work was funded by the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya within the framework of Projecte AINA. ### 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 #m2m_100 #text2text-generation #ca #de #multilingual #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #has_space #region-us 
 ### Training data


As a data for fine-tuning we used the Softcatalà Catalan-German parallel corpus dataset, with sentences deduplicated and filtered by the GEnCaTa quality filter. ### Training procedure #### Tokenization


The original m2m100\_418M model's sentencepiece tokenizer was used. #### Hyperparameters


The model was trained for 2 epochs with the default parameters and \(LR = 2\mathrm{e}{-5}\).


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


We use the BLEU score for evaluation on test sets: Flores-200 and WMT13. ### Evaluation results


Below are the evaluation results on the machine translation from German to Catalan compared with the original m2m100 on a testset: Flores-200.



Additional information
---------------------- ### Licensing information


Apache License, Version 2.0 ### Funding


This work was funded by the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya within the framework of Projecte AINA. ### 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 #m2m_100 #text2text-generation #ca #de #multilingual #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #has_space #region-us 
### Training data


As a data for fine-tuning we used the Softcatalà Catalan-German parallel corpus dataset, with sentences deduplicated and filtered by the GEnCaTa quality filter.### Training procedure#### Tokenization


The original m2m100\_418M model's sentencepiece tokenizer was used.#### Hyperparameters


The model was trained for 2 epochs with the default parameters and \(LR = 2\mathrm{e}{-5}\).


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


We use the BLEU score for evaluation on test sets: Flores-200 and WMT13.### Evaluation results


Below are the evaluation results on the machine translation from German to Catalan compared with the original m2m100 on a testset: Flores-200.



Additional information
----------------------### Licensing information


Apache License, Version 2.0### Funding


This work was funded by the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya within the framework of Projecte AINA.### 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.