Papadopoulos, Dimitris commited on
Commit
3b77fca
1 Parent(s): 36471a6

Added El2EN model

Browse files
Files changed (7) hide show
  1. README.md +58 -0
  2. config.json +37 -0
  3. merges.txt +0 -0
  4. pytorch_model.bin +3 -0
  5. tokenizer_config.json +8 -0
  6. vocab-src.json +0 -0
  7. vocab-tgt.json +0 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ | language | thumbnail | tags | license | datasets | metrics |
4
+ | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
5
+ | English-Greek | lighteternal/SSE-TUC-mt-en-el-cased | NTM, EL-EN | Apache2 |Opus, CC-Matrix |BLEU, chrF |
6
+
7
+ # English to Greek NMT from Hellenic Army Academy (SSE) and Technical University of Crete (TUC)
8
+
9
+ ## Model description
10
+
11
+ Trained using the Fairseq framework, transformer_iwslt_de_en architecture.\
12
+ BPE segmentation (20k codes).\
13
+ Mixed-case model. \
14
+
15
+ #### How to use
16
+
17
+ ```
18
+ from transformers import FSMTTokenizer, FSMTForConditionalGeneration
19
+
20
+ mname = " <your_downloaded_model_folderpath_here> "
21
+
22
+ tokenizer = FSMTTokenizer.from_pretrained(mname)
23
+ model = FSMTForConditionalGeneration.from_pretrained(mname)
24
+
25
+ text = " Katerina, is the best name for a girl."
26
+
27
+ encoded = tokenizer.encode(text, return_tensors='pt')
28
+
29
+ outputs = model.generate(encoded, num_beams=5, num_return_sequences=5, early_stopping=True)
30
+ for i, output in enumerate(outputs):
31
+ i += 1
32
+ print(f"{i}: {output.tolist()}")
33
+
34
+ decoded = tokenizer.decode(output, skip_special_tokens=True)
35
+ print(f"{i}: {decoded}")
36
+ ```
37
+
38
+
39
+ ## Training data
40
+
41
+ Consolidated corpus from Opus and CC-Matrix (~6.6GB in total)
42
+
43
+
44
+ ## Eval results
45
+
46
+ Results on Tatoeba testset (EN-EL):
47
+ | BLEU | chrF |
48
+ | ------ | ------ |
49
+ | 76.9 | 0.733 |
50
+
51
+
52
+ Results on XNLI parallel (EN-EL):
53
+ | BLEU | chrF |
54
+ | ------ | ------ |
55
+ | 65.4 | 0.624 |
56
+
57
+ ### BibTeX entry and citation info
58
+ TODO
config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "FSMTForConditionalGeneration"
4
+ ],
5
+ "model_type": "fsmt",
6
+ "activation_dropout": 0.0,
7
+ "activation_function": "relu",
8
+ "attention_dropout": 0.0,
9
+ "d_model": 512,
10
+ "dropout": 0.3,
11
+ "init_std": 0.02,
12
+ "max_position_embeddings": 1024,
13
+ "num_hidden_layers": 6,
14
+ "src_vocab_size": 15288,
15
+ "tgt_vocab_size": 23224,
16
+ "langs": [
17
+ "en",
18
+ "el"
19
+ ],
20
+ "encoder_attention_heads": 4,
21
+ "encoder_ffn_dim": 1024,
22
+ "encoder_layerdrop": 0,
23
+ "encoder_layers": 6,
24
+ "decoder_attention_heads": 4,
25
+ "decoder_ffn_dim": 1024,
26
+ "decoder_layerdrop": 0,
27
+ "decoder_layers": 6,
28
+ "bos_token_id": 0,
29
+ "pad_token_id": 1,
30
+ "eos_token_id": 2,
31
+ "is_encoder_decoder": true,
32
+ "scale_embedding": true,
33
+ "tie_word_embeddings": false,
34
+ "num_beams": 5,
35
+ "early_stopping": false,
36
+ "length_penalty": 1.0
37
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2a1f45e093af2153900db3b126119447a93235cf5b11c2c8a3a78e18a16b78a
3
+ size 205089118
tokenizer_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "langs": [
3
+ "en",
4
+ "el"
5
+ ],
6
+ "model_max_length": 1024,
7
+ "do_lower_case": false
8
+ }
vocab-src.json ADDED
The diff for this file is too large to render. See raw diff
 
vocab-tgt.json ADDED
The diff for this file is too large to render. See raw diff