waka-gpt is a GPT-based language model designed for Japanese text generation.
It was constructed by fine-tuning the original base model, rinna/japanese-gpt2-small (based on base model information).
Features and Use Cases (Samples):
Generating classical and waka-style texts
Generating Japanese poetry and creative writing
Conversation/Creative writing assistance
The Eight Imperially Compiled Anthologies of Waka Poetry, compiled during the golden age of waka culture
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("supertakerin2/waka-gpt")
4model = AutoModelForCausalLM.from_pretrained("supertakerin2/waka-gpt")
5
6input_text = "古き良き日本の風景を詠む和歌:"
7inputs = tokenizer(input_text, return_tensors="pt")
8
9outputs = model.generate(**inputs, max_length=100)
10
11print(tokenizer.decode(outputs[0], skip_special_tokens=True))
waka-gpt is a statistical language model trained on large volumes of text, and the following points require attention:
Potential for factual errors in output
Potential for inclusion of biases
Potential to generate inappropriate expressions in specific contexts
Proper filtering and operation under supervision are recommended.