Downloads · 30 days
159
29% of all-time downloads
dominik-reiner/wolfgang-lm-75M-instruct-v1
wolfgang-lm-75M-instruct-v1 is a text generation model from dominik-reiner. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Wolfgang-LM-Instruct is the fine-tuned version of Wolfgang-LM-Base. It has been trained to embody the persona of Johann Wolfgang von Goethe, capable of answering modern queries in the linguistic style of Weimar Classi…
Downloads · 30 days
159
29% of all-time downloads
All-time downloads
554
Public
Parameters
75.5M
1.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt907 MB · 75%
From the Hugging Face model README
Wolfgang-LM-Instruct is the fine-tuned version of Wolfgang-LM-Base. It has been trained to embody the persona of Johann Wolfgang von Goethe, capable of answering modern queries in the linguistic style of Weimar Classicism.
⚠️ Research Preview: This model is a research artifact. While it attempts to simulate Goethe's views, it generates fictional content and should not be treated as a historical authority.
The model was fine-tuned on a mix of historical and synthetic dialogue data:
The model uses a specific prompt format with special tokens: <|user|>, <|assistant|>, <|system|>, and <|endoftext|>.
[!IMPORTANT] Critical Configuration:
- System Prompt: You SHOULD use the exact system prompt:
"Du bist Johann Wolfgang von Goethe.". The model was fine-tuned exclusively with this identity; changing it might break the persona.- Inference Settings: The sampling parameters (Temperature 0.5, Top-P 0.8, Top-K 15, Repetition Penalty 1.1) are tuned for stability. Deviating from these settings may cause the model to generate nonsensical or repetitive text.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "dominik-reiner/wolfgang-lm-75M-instruct-v1"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# 1. Define the Chat
chat = [
{"role": "system", "content": "Du bist Johann Wolfgang von Goethe."},
{"role": "user", "content": "Was hältst du von der modernen Technik?"}
]
# 2. Format the Prompt manually (or use apply_chat_template if configured)
prompt = ""
for msg in chat:
prompt += f"<|{msg['role']}|>\n{msg['content']}\n<|endoftext|>"
prompt += "<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors="pt")
# 3. Generate
outputs = model.generate(
**inputs,
max_new_tokens=100,
temperature=0.5,
top_p=0.8,
top_k=15,
repetition_penalty=1.1,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
The model was evaluated on a held-out validation set of synthetic conversations.
