Downloads · 30 days
8
27% of all-time downloads
KafeisM/t5-small-pirate-style
t5-small-pirate-style is a machine learning model from KafeisM. 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 a fine-tuned version of t5-small on the KafeisM/pirate-speak-dataset. It specializes in Style Transfer, rewriting standard Modern English text into stereotypical Pirate English.
Downloads · 30 days
8
27% of all-time downloads
All-time downloads
30
Public
Parameters
60.5M
243 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors242 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of t5-small on the KafeisM/pirate-speak-dataset. It specializes in Style Transfer, rewriting standard Modern English text into stereotypical Pirate English.
It achieves the following results on the evaluation set:

This model was developed as an academic project for a "Deep Learning for NLP" course. It demonstrates how a small, general-purpose model like T5-small can be adapted to a specific niche domain using a small, high-quality synthetic dataset.
You must use the prefix translate English to Pirate: for the model to work correctly.
from transformers import pipeline
pipe = pipeline("text2text-generation", model=("KafeisM/t5-small-pirate-style"))
def translate_to_pirate(text):
input_text = "translate English to Pirate: " + text
inputs = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
outputs = model.generate(inputs, max_length=64, num_beams=4, early_stopping=True)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
print(translate_to_pirate("The server is down."))
print(translate_to_pirate("Hello friend, can you help me?"))
print(translate_to_pirate("I need to sleep now."))
# Output: "The server is down, matey."
# Output: "Hallo, friend, can ye help me?"
# Output: "I need to sleep now, matey.
The model was trained on KafeisM/pirate-speak-dataset, a corpus of 500 English-Pirate pairs generated specifically for this project to ensure domain consistency.
The following hyperparameters were used during training:
| Epoch | Training Loss | Validation Loss | Rouge1 | Bleu |
|---|---|---|---|---|
| 1.0 | No log | 0.6660 | 0.0* | 0.0* |
| 2.0 | No log | 0.2254 | 0.7016 | 0.6968 |
| 3.0 | No log | 0.1544 | 0.8005 | 0.8027 |
| 4.0 | No log | 0.1326 | 0.8701 | 0.8647 |
| 5.0 | No log | 0.1254 | 0.8776 | 0.8680 |
Note: The 0.0 scores in Epoch 1 were due to an initial configuration behavior where the model generated empty strings or padding tokens, which was resolved as the model converged in subsequent epochs.