mgrbyte commited on
Commit
15c0950
1 Parent(s): da10e5e

Add model card.

Browse files

Initial draft of the model card.

Files changed (1) hide show
  1. README.md +70 -14
README.md CHANGED
@@ -1,23 +1,79 @@
1
- ---
2
  language:
3
  - en
4
  - cy
5
- license: apache-2.0
6
  pipeline_tag: translation
7
  tags:
8
  - translation
9
  - marian
10
  metrics:
11
- - type: bleu
12
- value: 54.16
13
- - type: cer
14
- value: 0.31
15
- - type: wer
16
- value: 0.47
17
- - type: wil
18
- value: 0.67
19
- - type: wip
20
- value: 0.33
21
- - type: chrf
22
- value: 69.03
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  language:
2
  - en
3
  - cy
4
+
5
  pipeline_tag: translation
6
  tags:
7
  - translation
8
  - marian
9
  metrics:
10
+ - bleu
11
+ - cer
12
+ - wer
13
+ - wil
14
+ - wip
15
+ - chrf
16
+ license: apache-2.0
17
+ model-index:
18
+ - name: "mt-dspec-health-en-cy"
19
+ results:
20
+ - task:
21
+ name: Translation
22
+ type: translation
23
+ metrics:
24
+ - name: SacreBLEU
25
+ type: bleu
26
+ value: 54.16
27
+ - name: CER
28
+ type: cer
29
+ value: 0.31
30
+ - name: WER
31
+ type: wer
32
+ value: 0.47
33
+ - name: WIL
34
+ type: wil
35
+ value: 0.67
36
+ - name: WIP
37
+ type: wip
38
+ value: 0.33
39
+ - name: SacreBLEU CHRF
40
+ type: chrf
41
+ value: 69.03
42
  ---
43
+ # mt-dspec-health-en-cy
44
+ A language translation model for translating between English and Welsh, specialised to the specific domain of Health and care.
45
+
46
+ This model was trained using custom DVC pipeline employing [Marian NMT](https://marian-nmt.github.io/),
47
+ the datasets prepared were generated from the following sources:
48
+ - [UK Government Legislation data](https://www.legislation.gov.uk)
49
+ - [OPUS-cy-en](https://opus.nlpl.eu/)
50
+ - [Cofnod Y Cynulliad](https://record.assembly.wales/)
51
+ - [Cofion Techiaith Cymru](https://cofion.techiaith.cymru)
52
+
53
+ The data was split into train, validation and tests sets, the test set containing health-specific segments from TMX files
54
+ selected at random from the [Cofion Techiaith Cymru](https://cofion.techiaith.cymru) website, which have been pre-classified as pertaining to the specific domain.
55
+ Having extracted the test set, the aggregation of remaining data was then split into 10 training and validation sets, and fed into 10 marian training sessions.
56
+
57
+ A website demonstrating use of this model is available at http://cyfieithu.techiaith.cymru.
58
+
59
+ ## Evaluation
60
+
61
+ Evaluation was done using the python libraries [SacreBLEU](https://github.com/mjpost/sacrebleu) and [torchmetrics](https://torchmetrics.readthedocs.io/en/stable/).
62
+
63
+ ## Usage
64
+
65
+ Ensure you have the prerequisite python libraries installed:
66
+
67
+ ```bash
68
+ pip install transformers sentencepiece
69
+ ```
70
+
71
+ ```python
72
+ import trnasformers
73
+ model_id = "techiaith/mt-spec-health-en-cy"
74
+ tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
75
+ model = transformers.AutoModelForSeq2SeqLM.from_pretrained(model_id)
76
+ translate = transformers.pipeline("translation", model=model, tokenizer=tokenizer)
77
+ translated = translate("The doctor will be late to attend to patients this morning.")
78
+ print(translated["translation_text"])
79
+ ```