Downloads · 30 days
24
3% of all-time downloads
NoaiGPT/777
777 is a machine learning model from NoaiGPT. 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 openrail.
This repository contains a fine-tuned text-rewriting model based on the T5-Base with 223M parameters.
Downloads · 30 days
24
3% of all-time downloads
All-time downloads
769
Public
Repo size
1.8 GB
Likes
0
Public
Click a slice to open those files.
.bin892 MB · 100%
From the Hugging Face model README
This repository contains a fine-tuned text-rewriting model based on the T5-Base with 223M parameters.
Model Performance:
T5 model expects a task related prefix: since it is a paraphrasing task, we will add a prefix "paraphraser: "
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
device = "cuda"
tokenizer = AutoTokenizer.from_pretrained("NoaiGPT/777", token='your_token')
model = AutoModelForSeq2SeqLM.from_pretrained("NoaiGPT/777", token='your_token').to(device)
def generate_title(text):
input_ids = tokenizer(f'paraphraser: {text}', return_tensors="pt", padding="longest", truncation=True, max_length=64).input_ids.to(device)
outputs = model.generate(
input_ids,
num_beams=4,
num_beam_groups=4,
num_return_sequences=4,
repetition_penalty=10.0,
diversity_penalty=3.0,
no_repeat_ngram_size=2,
temperature=0.8,
max_length=64
)
return tokenizer.batch_decode(outputs, skip_special_tokens=True)
text = 'By leveraging prior model training through transfer learning, fine-tuning can reduce the amount of expensive computing power and labeled data needed to obtain large models tailored to niche use cases and business needs.'
generate_title(text)
['The fine-tuning can reduce the amount of expensive computing power and labeled data required to obtain large models adapted for niche use cases and business needs by using prior model training through transfer learning.',
'fine-tuning, by utilizing prior model training through transfer learning, can reduce the amount of expensive computing power and labeled data required to obtain large models tailored for niche use cases and business needs.',
'Fine-tunering by using prior model training through transfer learning can reduce the amount of expensive computing power and labeled data required to obtain large models adapted for niche use cases and business needs.',
'Using transfer learning to use prior model training, fine-tuning can reduce the amount of expensive computing power and labeled data required for large models that are suitable in niche usage cases or businesses.']