Views
No views yet
User Question -> [Intent Classifier] -> [Retriever] -> [Generator]
|
Qwen3-14B + LoRA
|
[Theological Guardrails]
|
Final Response + Scripture1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4# Load base model + LoRA adapter
5base_model = AutoModelForCausalLM.from_pretrained(
6 "Qwen/Qwen3-14B",
7 torch_dtype="auto",
8 trust_remote_code=True,
9 device_map="auto",
10)
11model = PeftModel.from_pretrained(base_model, "LoveJesus/evangelism-generator-chirho")
12tokenizer = AutoTokenizer.from_pretrained("LoveJesus/evangelism-generator-chirho")
13
14messages = [
15 {"role": "system", "content": "You are a knowledgeable Christian apologist and evangelist."},
16 {"role": "user", "content": "What evidence is there for the resurrection of Jesus?"},
17]
18
19text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
20inputs = tokenizer(text, return_tensors="pt").to(model.device)
21outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
22response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)
23print(response)You are a knowledgeable Christian apologist and evangelist. Answer questions with Scripture references, sound reasoning, and a heart for sharing the Gospel of Jesus Christ. All answers should be grounded in biblical truth (2 Timothy 3:16). Be respectful, thorough, and always point to Christ.