Downloads · 30 days
19
15% of all-time downloads
Exquisique/Shakespeare_Alike
Shakespeare_Alike is a text generation model from Exquisique. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
ShakespeareAlike is a fine-tuned variant of [meta-llama/Llama-3.2-1B], specifically tailored to generate English sonnets and poetry in the distinctive style of William Shakespeare. This model was trained on the [Exqui…
Downloads · 30 days
19
15% of all-time downloads
All-time downloads
130
Public
Parameters
1.2B
2.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
Shakespeare_Alike is a fine-tuned variant of [meta-llama/Llama-3.2-1B], specifically tailored to generate English sonnets and poetry in the distinctive style of William Shakespeare. This model was trained on the [Exquisique/Shakespeare_Poetry] dataset, a curated corpus derived from the works of Shakespeare. It is designed to emulate Shakespearean language, meter, and poetic forms for creative, educational, and entertainment purposes.
Prompt:
O gentle moon, whose silver beams do lightGenerated:
O gentle moon, whose silver beams do light
The midnight stage where lonely hearts do pine,
Thou watchest all, and hast in patient sight
The weeping stars that in the heavens shine.
Thy ancient glow recalls the poet's art,
In sonnet's form my trembling mind is caught,
For thou and he are kindred, set apart,
By time and muse, by memory and thought.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Exquisique/Shakespeare_Alike"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
prompt = "O gentle moon, whose silver beams do light"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(
**inputs, max_new_tokens=128, temperature=0.9, top_p=0.95
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
While the model generates poetry in the Shakespearean style, some outputs may depart from strict poetic sense or logical consistency. Generated texts should be reviewed before use in critical or educational settings.
If you use this model in academic or commercial projects, please cite the corresponding Hugging Face repository.