A domain-expert language model fine-tuned on
Basic Fantasy Role-Playing Game source material using
OSFT (Orthogonal Subspace Fine-Tuning), a continual learning method that preserves the base model's general knowledge while injecting new domain expertise.
Evaluated on 210 questions across 16 BFRPG categories, scored 0-10 by an automated LLM judge (
qwen3-14b) against reference answers.
This mathematically guarantees that new domain knowledge doesn't overwrite existing capabilities.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "RobbieJ/granite-3.1-8b-bfrpg-osft"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="bfloat16", device_map="auto")
6
7messages = [
8 {"role": "system", "content": "You are an expert on Basic Fantasy Role-Playing Game (BFRPG). You provide accurate, helpful answers about BFRPG rules, character creation, combat, spells, monsters, equipment, and gameplay."},
9 {"role": "user", "content": "What is the Armor Class and cost of plate mail in BFRPG?"},
10]
11
12input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
13outputs = model.generate(input_ids, max_new_tokens=512, temperature=0.7, do_sample=True)
14print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True))
This model is fine-tuned on open-source RPG content (Basic Fantasy RPG is released under the Open Game License). It generates fictional game content and should not be used for real-world decision-making.