Downloads · 30 days
11
14% of all-time downloads
Suchinthana/MT-5-Sinhala-Wikigen
MT-5-Sinhala-Wikigen is a machine learning model from Suchinthana. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This model is fine tuned with articles from Sinhala Wikipedia for article generation. Used around 10,000 articles for training and fine tuned more than 100 times.
Downloads · 30 days
11
14% of all-time downloads
All-time downloads
76
Public
Parameters
300M
6 GB on disk
Likes
0
Public
Click a slice to open those files.
.ckpt3.6 GB · 60%
From the Hugging Face model README
This model is fine tuned with articles from Sinhala Wikipedia for article generation. Used around 10,000 articles for training and fine tuned more than 100 times.
We have to use "writeWiki: " part at the begining of each prompt.
You can use this model with a pipeline for text generation.
First you might need to install required libraries and import them.
!pip uninstall transformers -y
!pip install transformers
pip install tokenizers sentencepiece
Then we might need to restart the runtime either manually or use the below code to end it.
import os
os.kill(os.getpid(), 9)
Then we just have to import the tokenizer and run the pipeline:
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('google/mt5-base')
from transformers import pipeline
generator = pipeline(model='Suchinthana/MT5-Sinhala-Wikigen-Experimental', tokenizer=tokenizer)
generator("writeWiki: මානව ආහාර", do_sample=True, max_length=180)