Views
No views yet
Trainer class from the Transformers library was used to train the model. PyTorch was used as the backend framework during training, but the model remains compatible with TensorFlow nonetheless.| Model | #params | Arch. | Training/Validation data (text) |
|---|---|---|---|
javanese-gpt2-small-imdb | 124M | GPT-2 Small | Javanese IMDB (47.5 MB of text) |
| train loss | valid loss | perplexity | total time |
|---|---|---|---|
| 4.135 | 4.103 | 60.54 | 6:22:40 |
1from transformers import pipeline
2
3pretrained_name = "w11wo/javanese-gpt2-small-imdb"
4
5nlp = pipeline(
6 "text-generation",
7 model=pretrained_name,
8 tokenizer=pretrained_name
9)
10
11nlp("Jenengku Budi, saka Indonesia")1from transformers import GPT2LMHeadModel, GPT2TokenizerFast
2
3pretrained_name = "w11wo/javanese-gpt2-small-imdb"
4model = GPT2LMHeadModel.from_pretrained(pretrained_name)
5tokenizer = GPT2TokenizerFast.from_pretrained(pretrained_name)
6
7prompt = "Indonesia minangka negara gedhe."
8encoded_input = tokenizer(prompt, return_tensors='pt')
9output = model(**encoded_input)1@inproceedings{wongso2021causal,
2 title={Causal and Masked Language Modeling of Javanese Language using Transformer-based Architectures},
3 author={Wongso, Wilson and Setiawan, David Samuel and Suhartono, Derwin},
4 booktitle={2021 International Conference on Advanced Computer Science and Information Systems (ICACSIS)},
5 pages={1--7},
6 year={2021},
7 organization={IEEE}
8}