anhtunguyen98 commited on
Commit
a3c5573
1 Parent(s): 4afe539
README.md CHANGED
@@ -1,3 +1,27 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - vi
4
+ - vn
5
+ - en
6
+ tags:
7
+ - question-answering
8
+ - pytorch
9
+ datasets:
10
+ - squad
11
+ pipeline_tag: question-answering
12
+ metrics:
13
+ - squad
14
  ---
15
+
16
+ ```python
17
+ from transformers import pipeline
18
+ model_checkpoint = "aicryptogroup/distill-xlm-mrc"
19
+ nlp = pipeline('question-answering', model=model_checkpoint,
20
+ tokenizer=model_checkpoint)
21
+ QA_input = {
22
+ 'question': "what is the capital of Vietnam",
23
+ 'context': "Keeping an ageless charm through centuries, Hanoi - the capital of Vietnam is famous not only for the Old Quarter with narrow and crowded streets but also for the nostalgic feeling that it brings. While Saigon is a young and modern city, the ancient Hanoi is still a true beholder of history."
24
+ }
25
+ res = nlp(QA_input)
26
+ print('pipeline: {}'.format(res))
27
+
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "dmec-mrc-base",
3
+ "architectures": [
4
+ "MRCQuestionAnswering"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 384,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.9.2",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 49576
28
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c1fc8ab7c8ed75cf9666ec217fcfb0aeb166d87403791ca374cf1631b0d29d5
3
+ size 162202097
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85e4c79af3897cbd1628364e90dd09303605625130b65f3524d4a84747f06e59
3
+ size 1102832
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "special_tokens_map_file": null, "name_or_path": "anhtunguyen98/xlm-base-vi-en", "sp_model_kwargs": {}, "tokenizer_class": "XLMRobertaTokenizer"}