Views
No views yet
microsoft/DialoGPT-small base, teaching it to respond in a compassionate, context‑aware style. The adapter was trained for 10 epochs with an effective batch size of 32, a learning rate of 2 × 10⁻⁴, and LoRA hyperparameters r=16, α=32, dropout=0.05.jmz365)microsoft/DialoGPT-smalltraining_model.pygenerate_dialogs.py1from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
2import torch
3
4repo_id = "jmz365/lumicare-lora"
5tokenizer = AutoTokenizer.from_pretrained(repo_id)
6model = AutoModelForCausalLM.from_pretrained(
7 repo_id,
8 torch_dtype=torch.float16,
9 device_map="auto"
10)
11gen = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
12
13prompt = (
14 "<|assistant|> You are a supportive mental‑health coach. "
15 "Please respond clearly and compassionately. <|end|>\n"
16 "<|user|> I've been feeling anxious lately and can't sleep. <|end|>\n"
17 "<|assistant|>"
18)
19print(gen(prompt, max_new_tokens=64, temperature=0.7, top_p=0.8))