KoichiYasuoka
commited on
Commit
•
d8af42b
1
Parent(s):
5531969
initial release
Browse files- README.md +26 -0
- config.json +27 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +56 -0
- tokenizer.json +3 -0
- tokenizer_config.json +0 -0
README.md
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- "th"
|
4 |
+
tags:
|
5 |
+
- "thai"
|
6 |
+
- "masked-lm"
|
7 |
+
base_model: clicknext/phayathaibert
|
8 |
+
license: "apache-2.0"
|
9 |
+
pipeline_tag: "fill-mask"
|
10 |
+
mask_token: "<mask>"
|
11 |
+
---
|
12 |
+
|
13 |
+
# camembert-thai-base
|
14 |
+
|
15 |
+
## Model Description
|
16 |
+
|
17 |
+
This is a CamemBERT model pre-trained on Thai texts, derived from [PhayaThaiBERT](https://huggingface.co/clicknext/phayathaibert) with the tokenizer improved. You can fine-tune `camembert-thai-base` for downstream tasks, such as [POS-tagging](https://huggingface.co/KoichiYasuoka/camembert-thai-base-upos), [dependency-parsing](https://huggingface.co/KoichiYasuoka/camembert-thai-base-ud-goeswith), and so on.
|
18 |
+
|
19 |
+
## How to Use
|
20 |
+
|
21 |
+
```py
|
22 |
+
from transformers import AutoTokenizer,AutoModelForMaskedLM
|
23 |
+
tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/camembert-thai-base")
|
24 |
+
model=AutoModelForMaskedLM.from_pretrained("KoichiYasuoka/camembert-thai-base")
|
25 |
+
```
|
26 |
+
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"CamembertForMaskedLM"
|
4 |
+
],
|
5 |
+
"attention_probs_dropout_prob": 0.1,
|
6 |
+
"bos_token_id": 0,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"eos_token_id": 2,
|
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": "camembert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 1,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.30.2",
|
24 |
+
"type_vocab_size": 1,
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 249262
|
27 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ddb1786f3b22021ff636938d898203fcfe33381b15a63f72b65bdfd375520e4
|
3 |
+
size 1110969209
|
special_tokens_map.json
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<s>NOTUSED",
|
4 |
+
"</s>NOTUSED",
|
5 |
+
"<_>"
|
6 |
+
],
|
7 |
+
"bos_token": {
|
8 |
+
"content": "<s>",
|
9 |
+
"lstrip": false,
|
10 |
+
"normalized": false,
|
11 |
+
"rstrip": false,
|
12 |
+
"single_word": false
|
13 |
+
},
|
14 |
+
"cls_token": {
|
15 |
+
"content": "<s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"eos_token": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false
|
27 |
+
},
|
28 |
+
"mask_token": {
|
29 |
+
"content": "<mask>",
|
30 |
+
"lstrip": true,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false
|
34 |
+
},
|
35 |
+
"pad_token": {
|
36 |
+
"content": "<pad>",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false
|
41 |
+
},
|
42 |
+
"sep_token": {
|
43 |
+
"content": "</s>",
|
44 |
+
"lstrip": false,
|
45 |
+
"normalized": false,
|
46 |
+
"rstrip": false,
|
47 |
+
"single_word": false
|
48 |
+
},
|
49 |
+
"unk_token": {
|
50 |
+
"content": "<unk>",
|
51 |
+
"lstrip": false,
|
52 |
+
"normalized": false,
|
53 |
+
"rstrip": false,
|
54 |
+
"single_word": false
|
55 |
+
}
|
56 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:67d187215f962d5cce64e220651641808a1afeb332d7c6e22447bfe9b2aa9138
|
3 |
+
size 16916048
|
tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|