liam168 commited on
Commit
85f60aa
1 Parent(s): a1aecfb

feat: init;

Browse files
README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ tags:
6
+ - translation
7
+ widget:
8
+ - text: "我喜欢学习数据科学和机器学习。"
9
+ ---
10
+
11
+ # liam168/trans-opus-mt-zh-en
12
+
13
+ ## Model description
14
+
15
+ * source group: English
16
+ * target group: Chinese
17
+ * model: transformer
18
+ * source language(s): eng
19
+
20
+ ## How to use
21
+
22
+ ```python
23
+ >>> from transformers import AutoModelWithLMHead,AutoTokenizer,pipeline
24
+ >>> mode_name = 'liam168/trans-opus-mt-zh-en'
25
+ >>> model = AutoModelWithLMHead.from_pretrained(mode_name)
26
+ >>> tokenizer = AutoTokenizer.from_pretrained(mode_name)
27
+ >>> translation = pipeline("translation_zh_to_en", model=model, tokenizer=tokenizer)
28
+ >>> translation('我喜欢学习数据科学和机器学习。', max_length=400)
29
+ [{'translation_text': 'I like to study data science and machine learning.'}]
30
+ ```
31
+
32
+ ## Contact
33
+
34
config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "liam168/trans-opus-mt-zh-en",
3
+ "activation_dropout": 0.0,
4
+ "activation_function": "swish",
5
+ "add_bias_logits": false,
6
+ "add_final_layer_norm": false,
7
+ "architectures": [
8
+ "MarianMTModel"
9
+ ],
10
+ "attention_dropout": 0.0,
11
+ "bad_words_ids": [
12
+ [
13
+ 65000
14
+ ]
15
+ ],
16
+ "bos_token_id": 0,
17
+ "classif_dropout": 0.0,
18
+ "classifier_dropout": 0.0,
19
+ "d_model": 512,
20
+ "decoder_attention_heads": 8,
21
+ "decoder_ffn_dim": 2048,
22
+ "decoder_layerdrop": 0.0,
23
+ "decoder_layers": 6,
24
+ "decoder_start_token_id": 65000,
25
+ "dropout": 0.1,
26
+ "encoder_attention_heads": 8,
27
+ "encoder_ffn_dim": 2048,
28
+ "encoder_layerdrop": 0.0,
29
+ "encoder_layers": 6,
30
+ "eos_token_id": 0,
31
+ "extra_pos_embeddings": 65001,
32
+ "forced_eos_token_id": 0,
33
+ "gradient_checkpointing": false,
34
+ "id2label": {
35
+ "0": "LABEL_0",
36
+ "1": "LABEL_1",
37
+ "2": "LABEL_2"
38
+ },
39
+ "init_std": 0.02,
40
+ "is_encoder_decoder": true,
41
+ "label2id": {
42
+ "LABEL_0": 0,
43
+ "LABEL_1": 1,
44
+ "LABEL_2": 2
45
+ },
46
+ "max_length": 512,
47
+ "max_position_embeddings": 512,
48
+ "model_type": "marian",
49
+ "normalize_before": false,
50
+ "normalize_embedding": false,
51
+ "num_beams": 6,
52
+ "num_hidden_layers": 6,
53
+ "pad_token_id": 65000,
54
+ "scale_embedding": true,
55
+ "static_position_embeddings": true,
56
+ "transformers_version": "4.8.2",
57
+ "use_cache": true,
58
+ "vocab_size": 65001
59
+ }
metadata.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"hf_name":"eng-zho","source_languages":"eng","target_languages":"zho","opus_readme_url":"https:\/\/github.com\/Helsinki-NLP\/Tatoeba-Challenge\/tree\/master\/models\/eng-zho\/README.md","original_repo":"Tatoeba-Challenge","tags":["translation"],"languages":["en","zh"],"src_constituents":["eng"],"tgt_constituents":["cmn_Hans","nan","nan_Hani","gan","yue","cmn_Kana","yue_Hani","wuu_Bopo","cmn_Latn","yue_Hira","cmn_Hani","cjy_Hans","cmn","lzh_Hang","lzh_Hira","cmn_Hant","lzh_Bopo","zho","zho_Hans","zho_Hant","lzh_Hani","yue_Hang","wuu","yue_Kana","wuu_Latn","yue_Bopo","cjy_Hant","yue_Hans","lzh","cmn_Hira","lzh_Yiii","lzh_Hans","cmn_Bopo","cmn_Hang","hak_Hani","cmn_Yiii","yue_Hant","lzh_Kana","wuu_Hani"],"src_multilingual":false,"tgt_multilingual":false,"prepro":" normalization + SentencePiece (spm32k,spm32k)","url_model":"https:\/\/object.pouta.csc.fi\/Tatoeba-MT-models\/eng-zho\/opus-2020-07-17.zip","url_test_set":"https:\/\/object.pouta.csc.fi\/Tatoeba-MT-models\/eng-zho\/opus-2020-07-17.test.txt","src_alpha3":"eng","tgt_alpha3":"zho","short_pair":"en-zh","chrF2_score":0.268,"bleu":31.4,"brevity_penalty":0.896,"ref_len":110468.0,"src_name":"English","tgt_name":"Chinese","train_date":"2020-07-17","src_alpha2":"en","tgt_alpha2":"zh","prefer_old":false,"long_pair":"eng-zho","helsinki_git_sha":"480fcbe0ee1bf4774bcbe6226ad9f58e63f6c535","transformers_git_sha":"2207e5d8cb224e954a7cba69fa4ac2309e9ff30b","port_machine":"brutasse","port_time":"2020-08-21-14:41"}
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6c058648f7c0937d5240c3a3889fb3be1f5c12ed91e9401b71417b6684fc42e
3
+ size 310016901
source.spm ADDED
Binary file (805 kB). View file
 
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>"}
target.spm ADDED
Binary file (807 kB). View file
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "zho", "target_lang": "eng", "unk_token": "<unk>", "eos_token": "</s>", "pad_token": "<pad>", "model_max_length": 512, "sp_model_kwargs": {}, "special_tokens_map_file": null, "tokenizer_file": null, "name_or_path": "liam168/trans-opus-mt-zh-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff