Downloads · 30 days
60
8% of all-time downloads
jed351/gpt2_tiny_zh-hk-shikoto
gpt2_tiny_zh-hk-shikoto is a text generation model from jed351. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as openrail.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
60
8% of all-time downloads
All-time downloads
799
Public
Repo size
102 MB
Likes
0
Public
Click a slice to open those files.
.bin50.8 MB · 96%
From the Hugging Face model README
This model was trained on a dataset I obtained from an online novel site. Please be aware that the stories (training data) might contain inappropriate content. This model is intended for research purposes only.
The base model can be found here, which was obtained by patching a GPT2 Chinese model and its tokenizer with Cantonese characters. Refer to the base model for info on the patching process.
Please refer to the script provided by Huggingface.
The model was trained for 400,000 steps on 2 NVIDIA Quadro RTX6000 for around 15 hours at the Research Computing Services of Imperial College London.
The following hyperparameters were used during training:
from transformers import AutoTokenizer
from transformers import TextGenerationPipeline, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("jed351/gpt2-tiny-zh-hk")
model = AutoModelForCausalLM.from_pretrained("jed351/gpt2_tiny_zh-hk-shikoto")
# try messing around with the parameters
generator = TextGenerationPipeline(model, tokenizer,
max_new_tokens=200,
no_repeat_ngram_size=3) #, device=0) #if you have a GPU
input_string = "your input"
output = generator(input_string)
string = output[0]['generated_text'].replace(' ', '')
print(string)