Sillok-LM 350M
language model for working with Joseon Dynasty Annals texts
2 min readupdated
The model was trained on a digitized corpus of the Annals of the Joseon Dynasty (1392–1863), containing over 67 million characters of Classical Chinese. The architecture is built according to modern Llama-3 standards using RoPE (positional encoding), GQA (Grouped-Query Attention), and RMSNorm. The model is designed for digital humanities researchers, historical text restoration tasks, and the generation of historiographical materials.
Key features
- Corpus scale: Trained on 673 volumes of XML documents from the National Institute of Korean History.
- Llama-3 architecture: Uses 26 layers, a 1024 hidden dimension, and 347.1 million parameters.
- Specialized tokenizer: Custom Byte-Level BPE with a 32K vocabulary for working with Hanja and Hangul.
- Historical context: Supports the hierarchical structure of dates, reigns, and court historian commentaries (사론).
What you can do
- Chronicle generation: Create fragments of classical texts based on the entered monarch, date, and topic.
- Reverse synthesis: Formulate modern Korean summary headlines from original records in Hanja.
- Fine-tuning: Use the checkpoint for further pre-training or fine-tuning for specific historical linguistics tasks.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "darkstar-11e/sillok-350m"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
prompt = "<|bos|><|king|>세종실록(世宗實錄)<|date|>세종 28년 9월 29일 | 庚戌<|subject|>문화-출판/인쇄<|title|>어제 훈민정음 서책을 완성하여 인쇄하게 하다<|hanja|>"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=80, temperature=0.6)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
Read more
DetailsParameters: 347.1M parameters, 26 layers
Benchmarks: Validation Loss 3.2509, Perplexity 25.81 (step 5000)
Limitations: Research checkpoint, requires verification of historical facts against primary sources










Comments