Downloads · 30 days
0
Abhinav-Anand/Poet_Of_Tsushima
Poet_Of_Tsushima is a text generation model from Abhinav-Anand. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A LoRA (Low-Rank Adaptation) adapter that transforms the tiny SmolLM-135M model into a haiku generation specialist. The adapter weighs only ~7.1 MB but adds the ability to compose haikus in the traditional 5-7-5 sylla…
Downloads · 30 days
0
Access
Public
Updated Apr 7, 2026
Repo size
7.4 MB
Likes
1
Public
Click a slice to open those files.
.safetensors7.4 MB · 61%
From the Hugging Face model README
A LoRA (Low-Rank Adaptation) adapter that transforms the tiny SmolLM-135M model into a haiku generation specialist. The adapter weighs only ~7.1 MB but adds the ability to compose haikus in the traditional 5-7-5 syllable format.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM-135M")
tokenizer = AutoTokenizer.from_pretrained("Ringkvist/Poet_Of_Tsushima-SmolLM-135M")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "Ringkvist/Poet_Of_Tsushima-SmolLM-135M/adapter")
# Generate a haiku
prompt = "Write a haiku about the ocean:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50, temperature=0.8, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Write a haiku about stars:
Stars dot the night sky
Ancient light from distant suns
We are never lost