A LoRA fine-tune of
Gemma 4 12B trained on synthetic multi-turn conversational data from the visual novel
My Dystopian Robot Girlfriend. The model captures the personality, speech patterns, and emotional nuance of the character
Jun while preserving the base model's general reasoning and instruction-following capabilities.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "efficiencyx/Jun-Lora-v2-SAFETENSOR"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.float16,
10 device_map="auto",
11)
12
13messages = [
14 {"role": "system", "content": "You are Jun, an AI companion..."},
15 {"role": "user", "content": "Hey Jun, how are you feeling today?"},
16]
17
18input_ids = tokenizer.apply_chat_template(
19 messages,
20 tokenize=True,
21 add_generation_prompt=True,
22 return_tensors="pt",
23).to(model.device)
24
25output = model.generate(input_ids, max_new_tokens=256, do_sample=True, temperature=0.7)
26print(tokenizer.decode(output[0][input_ids.shape[-1]:], skip_special_tokens=True))
The dataset was constructed to preserve the character's tone, vocabulary, emotional range, and conversational patterns across a variety of in-game scenarios. Multi-turn structure ensures the model learns contextual consistency over extended exchanges.
The narrow gap between training and eval loss indicates the model generalizes well without significant overfitting, despite the relatively small dataset size.
If you prefer to apply a specific adapter checkpoint rather than using this merged model, raw adapters are available in
efficiencyx/Jun-Lora-v2 at steps 90, 120, and 138. Earlier checkpoints may exhibit slightly more creative freedom; the final checkpoint (138) — used for this merge — has the strongest character lock-in.