Instructions to use supertakerin2/waka-gpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use supertakerin2/waka-gpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="supertakerin2/waka-gpt")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("supertakerin2/waka-gpt") model = AutoModelForCausalLM.from_pretrained("supertakerin2/waka-gpt") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use supertakerin2/waka-gpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "supertakerin2/waka-gpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "supertakerin2/waka-gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/supertakerin2/waka-gpt
- SGLang
How to use supertakerin2/waka-gpt with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "supertakerin2/waka-gpt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "supertakerin2/waka-gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "supertakerin2/waka-gpt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "supertakerin2/waka-gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use supertakerin2/waka-gpt with Docker Model Runner:
docker model run hf.co/supertakerin2/waka-gpt
Model Description
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
- Developed by: supertakerin2
- Funded by: No one
- Shared by: No one
- Model type: Text-generation
- Language(s) (NLP): Japanese,Classical Japanese
- License: Mit License
- Finetuned from model : rinna/japanese-gpt2-small
Model Sources
The Eight Imperially Compiled Anthologies of Waka Poetry, compiled during the golden age of waka culture
Direct Uses
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("supertakerin2/waka-gpt")
model = AutoModelForCausalLM.from_pretrained("supertakerin2/waka-gpt")
input_text = "古き良き日本の風景を詠む和歌:"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Bias, Risks, and Limitations
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.
Model Card Contact
- Downloads last month
- 4
Model tree for supertakerin2/waka-gpt
Base model
rinna/japanese-gpt2-small