-
Corpora
- Irish Penny Journal 1840 (dleemiller/irish_penny_journal)
- Modernized translations produced via rule‑based spelling normalisation plus manual post‑edit
-
Reward = classifier output
19ᵗʰ‑century texts can contain outdated social views. Outputs may reflect such biases or archaic spelling. Always review generations before use.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3checkpoint = "dleemiller/Penny-1.7B"
4
5device = "cuda" # or "cpu"
6
7tokenizer = AutoTokenizer.from_pretrained(checkpoint)
8# For multi‑GPU: install accelerate and use device_map="auto"
9model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
10
11messages = [{"role": "user", "content": "What is the capital of France."}]
12input_text = tokenizer.apply_chat_template(messages, tokenize=False)
13inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
14
15outputs = model.generate(inputs,
16 max_new_tokens=512,
17 temperature=0.8,
18 top_p=0.9,
19 do_sample=True)
20
21print(tokenizer.decode(outputs[0]))
1@software{penny_1.7b_2025,
2 title = {Penny‑1.7B: Irish Penny Journal Style Language Model},
3 author = {Lee Miller},
4 year = 2025,
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/dleemiller/Penny-1.7B}
7}
Apache 2.0 (inherits from the base model).