flax-community / gpt2-base-thai

huggingface.co
Total runs: 3.1K
24-hour runs: 0
7-day runs: 34
30-day runs: 740
Model's Last Updated: 2021年7月17日
text-generation

Introduction of gpt2-base-thai

Model Details of gpt2-base-thai

GPT-2 Base Thai

GPT-2 Base Thai is a causal language model based on the OpenAI GPT-2 model. It was trained on the OSCAR dataset, specifically the unshuffled_deduplicated_th subset. The model was trained from scratch and achieved an evaluation loss of 1.708 and an evaluation perplexity of 5.516.

This model was trained using HuggingFace's Flax framework and is part of the JAX/Flax Community Week organized by HuggingFace. All training was done on a TPUv3-8 VM, sponsored by the Google Cloud team.

All necessary scripts used for training could be found in the Files and versions tab, as well as the Training metrics logged via Tensorboard.

Model
Model #params Arch. Training/Validation data (text)
gpt2-base-thai 124M GPT-2 unshuffled_deduplicated_th Dataset
Evaluation Results

The model was trained for 3 epochs and the following is the final result once the training ended.

train loss valid loss valid PPL total time
1.638 1.708 5.516 6:12:34
How to Use
As Causal Language Model
from transformers import pipeline

pretrained_name = "flax-community/gpt2-base-thai"

nlp = pipeline(
    "text-generation",
    model=pretrained_name,
    tokenizer=pretrained_name
)

nlp("สวัสดีตอนเช้า")
Feature Extraction in PyTorch
from transformers import GPT2Model, GPT2TokenizerFast

pretrained_name = "flax-community/gpt2-base-thai"
model = GPT2Model.from_pretrained(pretrained_name)
tokenizer = GPT2TokenizerFast.from_pretrained(pretrained_name)

prompt = "สวัสดีตอนเช้า"
encoded_input = tokenizer(prompt, return_tensors='pt')
output = model(**encoded_input)
Team Members

Runs of flax-community gpt2-base-thai on huggingface.co

3.1K
Total runs
0
24-hour runs
-128
3-day runs
34
7-day runs
740
30-day runs

More Information About gpt2-base-thai huggingface.co Model

More gpt2-base-thai license Visit here:

https://choosealicense.com/licenses/mit

gpt2-base-thai huggingface.co

gpt2-base-thai huggingface.co is an AI model on huggingface.co that provides gpt2-base-thai's model effect (), which can be used instantly with this flax-community gpt2-base-thai model. huggingface.co supports a free trial of the gpt2-base-thai model, and also provides paid use of the gpt2-base-thai. Support call gpt2-base-thai model through api, including Node.js, Python, http.

flax-community gpt2-base-thai online free

gpt2-base-thai huggingface.co is an online trial and call api platform, which integrates gpt2-base-thai's modeling effects, including api services, and provides a free online trial of gpt2-base-thai, you can try gpt2-base-thai online for free by clicking the link below.

flax-community gpt2-base-thai online free url in huggingface.co:

https://huggingface.co/flax-community/gpt2-base-thai

gpt2-base-thai install

gpt2-base-thai is an open source model from GitHub that offers a free installation service, and any user can find gpt2-base-thai on GitHub to install. At the same time, huggingface.co provides the effect of gpt2-base-thai install, users can directly use gpt2-base-thai installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

gpt2-base-thai install url in huggingface.co:

https://huggingface.co/flax-community/gpt2-base-thai

Url of gpt2-base-thai

Provider of gpt2-base-thai huggingface.co

flax-community
ORGANIZATIONS

Other API from flax-community