liam168 commited on
Commit
4f89d8a
1 Parent(s): 1be9114

feat:init;

Browse files
README.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ tags:
6
+ - translation
7
+ widget:
8
+ - text: "I like to study Data Science and Machine Learning."
9
+ ---
10
+
11
+ # liam168/trans-opus-mt-en-zh
12
+
13
+ ## Model description
14
+
15
+ * source group: English
16
+ * target group: Chinese
17
+ * model: transformer
18
+ * source language(s): eng
19
+ * target language(s): cjy_Hans cjy_Hant cmn cmn_Hans cmn_Hant gan lzh lzh_Hans nan wuu yue yue_Hans yue_Hant
20
+
21
+ ## How to use
22
+
23
+ ```python
24
+ >>> from transformers import AutoModelWithLMHead,AutoTokenizer,pipeline
25
+ >>> mode_name = 'liam168/trans-opus-mt-en-zh'
26
+ >>> model = AutoModelWithLMHead.from_pretrained(mode_name)
27
+ >>> tokenizer = AutoTokenizer.from_pretrained(mode_name)
28
+ >>> translation = pipeline("translation_en_to_zh", model=model, tokenizer=tokenizer)
29
+ >>> translation('I like to study Data Science and Machine Learning.', max_length=400)
30
+ [{'translation_text': '我喜欢学习数据科学和机器学习'}]
31
+ ```
32
+
33
+ ## Contact
34
+
35
+ liam168520@gmail.com
config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "liam168/trans-opus-mt-en-zh",
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
+ "do_blenderbot_90_layernorm": false,
26
+ "dropout": 0.1,
27
+ "encoder_attention_heads": 8,
28
+ "encoder_ffn_dim": 2048,
29
+ "encoder_layerdrop": 0.0,
30
+ "encoder_layers": 6,
31
+ "eos_token_id": 0,
32
+ "extra_pos_embeddings": 0,
33
+ "force_bos_token_to_be_generated": false,
34
+ "forced_eos_token_id": 0,
35
+ "gradient_checkpointing": false,
36
+ "id2label": {
37
+ "0": "LABEL_0",
38
+ "1": "LABEL_1",
39
+ "2": "LABEL_2"
40
+ },
41
+ "init_std": 0.02,
42
+ "is_encoder_decoder": true,
43
+ "label2id": {
44
+ "LABEL_0": 0,
45
+ "LABEL_1": 1,
46
+ "LABEL_2": 2
47
+ },
48
+ "max_length": 512,
49
+ "max_position_embeddings": 512,
50
+ "model_type": "marian",
51
+ "normalize_before": false,
52
+ "normalize_embedding": false,
53
+ "num_beams": 4,
54
+ "num_hidden_layers": 6,
55
+ "pad_token_id": 65000,
56
+ "scale_embedding": true,
57
+ "static_position_embeddings": true,
58
+ "transformers_version": "4.8.2",
59
+ "use_cache": true,
60
+ "vocab_size": 65001
61
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3332812466738338b03ed2c1232ce93c77263e9b54c146e6b5b9fabc22f20b6
3
+ size 310016901
source.spm ADDED
Binary file (806 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 (805 kB). View file
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "eng", "target_lang": "zho", "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-en-zh", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff