Downloads · 30 days
0
mfbottari/mini-Whitman-llama
mini-Whitman-llama is a text generation model from mfbottari. Use it when you need the model to write or continue text. The card lists the license as mit.
A QLoRA fine-tune of meta-llama/Llama-3.1-8B trained on Walt Whitman's Leaves of Grass — an experiment in giving a small language model a large poetic soul.
Downloads · 30 days
0
Access
Public
Updated Mar 28, 2026
Repo size
688 MB
Likes
0
Public
Click a slice to open those files.
.safetensors671 MB · 97%
From the Hugging Face model README
A QLoRA fine-tune of meta-llama/Llama-3.1-8B trained on Walt Whitman's Leaves of Grass — an experiment in giving a small language model a large poetic soul.
This model was trained purely as a creative and educational demonstration: to explore whether a compact generative model can absorb the cadence, imagery, and democratic spirit of one of America's greatest poets, and produce novel verse in that tradition.
| Field | Value |
|---|---|
| Base Model | meta-llama/Llama-3.1-8B |
| Fine-tuning Method | QLoRA (4-bit quantization) |
| Training Data | Walt Whitman's Leaves of Grass (public domain) |
| Training Date | March 2025 |
| Task | Causal language modeling / creative text generation |
| Language | English |
| License | MIT |
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("your-username/mini-Whitman-llama")
model = AutoModelForCausalLM.from_pretrained("your-username/mini-Whitman-llama")
prompt = "I celebrate myself, and sing myself,"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=500,
do_sample=True,
temperature=0.7,
top_p=0.95,
top_k=50,
repetition_penalty=1.2,
num_return_sequences=1,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
These settings were tuned specifically for this model and produce the most coherent, Whitman-esque output:
| Parameter | Value | Why |
|---|---|---|
max_new_tokens | 500 | Long enough for a full verse or stanza |
temperature | 0.7 | Creative but not chaotic — preserves Whitman's cadence |
top_p | 0.95 | Nucleus sampling keeps outputs grounded |
top_k | 50 | Limits vocabulary to the most likely tokens at each step |
repetition_penalty | 1.2 | Reduces the model's tendency to loop phrases |
num_return_sequences | 1 | Generate one poem at a time |
Leaves of Grass (1855–1891) is the life's work of Walt Whitman (1819–1892), widely considered one of the most innovative and influential collections in American literature. The text is in the public domain and freely available via Project Gutenberg.
Whitman's verse is characterized by:
This model is an artistic and educational proof-of-concept, not a production tool. Its purpose is to demonstrate the poetic potential of small fine-tuned language models — that even a sub-1B parameter model, when trained on a focused literary corpus, can generate text with a recognizable stylistic voice.
Limitations:
Generating text in the voice of a deceased writer raises genuine aesthetic and ethical questions. This model is offered in that spirit of inquiry — not to deceive, but to explore what these tools can and cannot do. All generated text should be understood as inspired by Whitman, not attributed to him.
MIT License — free to use, modify, and distribute with attribution.