ThangLD201 commited on
Commit
1193ea0
·
verified ·
1 Parent(s): 673fe07

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-sa-4.0
3
+ language:
4
+ - en
5
+ - de
6
+ - fr
7
+ - zh
8
+ - ja
9
+ - ro
10
+ tags:
11
+ - word alignment
12
+ - multilingual
13
+ - translation
14
+ ---
15
+ # Model Description
16
+ Refer to [https://github.com/qiyuw/WSPAlign](https://github.com/qiyuw/WSPAlign) and [https://github.com/qiyuw/WSPAlign.InferEval](https://github.com/qiyuw/WSPAlign.InferEval) for details.
17
+
18
+ # Qucik Usage
19
+
20
+ First clone inference repository:
21
+ ```
22
+ git clone https://github.com/qiyuw/WSPAlign.InferEval.git
23
+ ```
24
+ Then install the requirements following [https://github.com/qiyuw/WSPAlign.InferEval](https://github.com/qiyuw/WSPAlign.InferEval). For inference only `transformers`, `SpaCy` and `torch` are required.
25
+
26
+ Finally, run the following example:
27
+ ```
28
+ python inference.py --model_name_or_path qiyuw/WSPAlign-ft-kftt --src_lang ja --src_text="私は猫が好きです。" --tgt_lang en --tgt_text="I like cats."
29
+ ```
30
+ Check `inference.py` for details usage.
31
+
32
+ # Citation
33
+ Cite our paper if WSPAlign helps your work:
34
+
35
+ ```bibtex
36
+ @inproceedings{wu-etal-2023-wspalign,
37
+ title = "{WSPA}lign: Word Alignment Pre-training via Large-Scale Weakly Supervised Span Prediction",
38
+ author = "Wu, Qiyu and Nagata, Masaaki and Tsuruoka, Yoshimasa",
39
+ booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
40
+ month = jul,
41
+ year = "2023",
42
+ address = "Toronto, Canada",
43
+ publisher = "Association for Computational Linguistics",
44
+ url = "https://aclanthology.org/2023.acl-long.621",
45
+ pages = "11084--11099",
46
+ }
47
+ ```
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "qiyuw/WSPAlign-mbert-base",
3
+ "architectures": [
4
+ "BertForQuestionAnswering"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "directionality": "bidi",
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "pooler_fc_size": 768,
21
+ "pooler_num_attention_heads": 12,
22
+ "pooler_num_fc_layers": 3,
23
+ "pooler_size_per_head": 128,
24
+ "pooler_type": "first_token_transform",
25
+ "position_embedding_type": "absolute",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.21.2",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 119547
31
+ }
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6411f5d06f2fb5c743c1b0da8cdffa090bd2d1c1fbb51a04d16d8dae854cf20e
3
+ size 1418231813
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:693bb1f981bcf53c6b2bc35a1956b7e9dbd3aecc1f95d7f1022ae4a7a7e0dbf2
3
+ size 709129709
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:631ea08acf301fa9ca40faaf4c9fa70ccacf5e60387a660ca000e7e7ad0bea66
3
+ size 627
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "do_basic_tokenize": true,
4
+ "do_lower_case": false,
5
+ "mask_token": "[MASK]",
6
+ "model_max_length": 512,
7
+ "name_or_path": "qiyuw/WSPAlign-mbert-base",
8
+ "never_split": null,
9
+ "pad_token": "[PAD]",
10
+ "sep_token": "[SEP]",
11
+ "special_tokens_map_file": null,
12
+ "strip_accents": null,
13
+ "tokenize_chinese_chars": true,
14
+ "tokenizer_class": "BertTokenizer",
15
+ "unk_token": "[UNK]"
16
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fdf603ca54f0fa767e48fd6a738450ad333d423e2c24dda89d87f713b8318b9e
3
+ size 1915
vocab.txt ADDED
The diff for this file is too large to render. See raw diff