remove pytorch ckpt
Browse files- README.md +0 -42
- config.json +0 -34
- pytorch_model.bin +0 -3
- special_tokens_map.json +0 -9
- tokenizer.json +0 -0
- tokenizer_config.json +0 -16
- vocab.txt +0 -0
README.md
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
---
|
2 |
-
language: ko
|
3 |
-
tags:
|
4 |
-
- korean
|
5 |
-
mask_token: "[MASK]"
|
6 |
-
widget:
|
7 |
-
- text: 대한민국의 수도는 [MASK] 입니다.
|
8 |
-
---
|
9 |
-
|
10 |
-
# KoBigBird
|
11 |
-
|
12 |
-
Pretrained BigBird Model for Korean (**kobigbird-bert-base**)
|
13 |
-
|
14 |
-
## About
|
15 |
-
|
16 |
-
BigBird, is a sparse-attention based transformer which extends Transformer based models, such as BERT to much longer sequences.
|
17 |
-
|
18 |
-
BigBird relies on **block sparse attention** instead of normal attention (i.e. BERT's attention) and can handle sequences up to a length of 4096 at a much lower compute cost compared to BERT.
|
19 |
-
|
20 |
-
Model is warm started from Korean BERT’s checkpoint.
|
21 |
-
|
22 |
-
## How to use
|
23 |
-
|
24 |
-
*NOTE:* Use `BertTokenizer` instead of BigBirdTokenizer. (`AutoTokenizer` will load `BertTokenizer`)
|
25 |
-
|
26 |
-
```python
|
27 |
-
from transformers import AutoModel, AutoTokenizer
|
28 |
-
|
29 |
-
# by default its in `block_sparse` mode with num_random_blocks=3, block_size=64
|
30 |
-
model = AutoModel.from_pretrained("monologg/kobigbird-bert-base")
|
31 |
-
|
32 |
-
# you can change `attention_type` to full attention like this:
|
33 |
-
model = AutoModel.from_pretrained("monologg/kobigbird-bert-base", attention_type="original_full")
|
34 |
-
|
35 |
-
# you can change `block_size` & `num_random_blocks` like this:
|
36 |
-
model = AutoModel.from_pretrained("monologg/kobigbird-bert-base", block_size=16, num_random_blocks=2)
|
37 |
-
|
38 |
-
tokenizer = AutoTokenizer.from_pretrained("monologg/kobigbird-bert-base")
|
39 |
-
text = "한국어 BigBird 모델을 공개합니다!"
|
40 |
-
encoded_input = tokenizer(text, return_tensors='pt')
|
41 |
-
output = model(**encoded_input)
|
42 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.json
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"architectures": [
|
3 |
-
"BigBirdForMaskedLM"
|
4 |
-
],
|
5 |
-
"attention_probs_dropout_prob": 0.1,
|
6 |
-
"attention_type": "block_sparse",
|
7 |
-
"block_size": 64,
|
8 |
-
"bos_token_id": 5,
|
9 |
-
"classifier_dropout": null,
|
10 |
-
"eos_token_id": 6,
|
11 |
-
"gradient_checkpointing": false,
|
12 |
-
"hidden_act": "gelu_new",
|
13 |
-
"hidden_dropout_prob": 0.1,
|
14 |
-
"hidden_size": 768,
|
15 |
-
"initializer_range": 0.02,
|
16 |
-
"intermediate_size": 3072,
|
17 |
-
"layer_norm_eps": 1e-12,
|
18 |
-
"max_position_embeddings": 4096,
|
19 |
-
"model_type": "big_bird",
|
20 |
-
"num_attention_heads": 12,
|
21 |
-
"num_hidden_layers": 12,
|
22 |
-
"num_random_blocks": 3,
|
23 |
-
"pad_token_id": 0,
|
24 |
-
"position_embedding_type": "absolute",
|
25 |
-
"rescale_embeddings": false,
|
26 |
-
"sep_token_id": 3,
|
27 |
-
"tokenizer_class": "BertTokenizer",
|
28 |
-
"torch_dtype": "float32",
|
29 |
-
"transformers_version": "4.11.3",
|
30 |
-
"type_vocab_size": 2,
|
31 |
-
"use_bias": true,
|
32 |
-
"use_cache": true,
|
33 |
-
"vocab_size": 32500
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pytorch_model.bin
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:34fc7d7536b6c78fa17af2a99bada8684fde89e172dd677b289eea0f83298cd6
|
3 |
-
size 457600984
|
|
|
|
|
|
special_tokens_map.json
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"bos_token": "<s>",
|
3 |
-
"eos_token": "</s>",
|
4 |
-
"unk_token": "[UNK]",
|
5 |
-
"sep_token": "[SEP]",
|
6 |
-
"pad_token": "[PAD]",
|
7 |
-
"cls_token": "[CLS]",
|
8 |
-
"mask_token": "[MASK]"
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tokenizer.json
DELETED
The diff for this file is too large to render.
See raw diff
|
tokenizer_config.json
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"do_lower_case": false,
|
3 |
-
"unk_token": "[UNK]",
|
4 |
-
"sep_token": "[SEP]",
|
5 |
-
"pad_token": "[PAD]",
|
6 |
-
"cls_token": "[CLS]",
|
7 |
-
"mask_token": "[MASK]",
|
8 |
-
"tokenize_chinese_chars": true,
|
9 |
-
"strip_accents": null,
|
10 |
-
"do_basic_tokenize": true,
|
11 |
-
"never_split": null,
|
12 |
-
"bos_token": "<s>",
|
13 |
-
"eos_token": "</s>",
|
14 |
-
"model_max_length": 4096,
|
15 |
-
"tokenizer_class": "BertTokenizer"
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vocab.txt
DELETED
The diff for this file is too large to render.
See raw diff
|