Downloads · 30 days
8
40% of all-time downloads
Va1bhavdev/dil-v1-insurance-model
dil-v1-insurance-model is a text generation model from Va1bhavdev. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A fine-tuned LoRA adapter based on Qwen/Qwen2.5-3B-Instruct, trained for insurance domain reasoning, action routing, policy coverage retrieval, actuarial calculations, and regulatory compliance.
Downloads · 30 days
8
40% of all-time downloads
All-time downloads
20
Public
Repo size
253 MB
Likes
0
Public
Click a slice to open those files.
.safetensors240 MB · 62%
From the Hugging Face model README
A fine-tuned LoRA adapter based on Qwen/Qwen2.5-3B-Instruct, trained for insurance domain reasoning, action routing, policy coverage retrieval, actuarial calculations, and regulatory compliance.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
BASE_MODEL = "Qwen/Qwen2.5-3B-Instruct"
ADAPTER = "Va1bhavdev/dil-v1-insurance-model"
tokenizer = AutoTokenizer.from_pretrained(ADAPTER)
base_model = AutoModelForCausalLM.from_pretrained(
BASE_MODEL,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, ADAPTER)
system_prompt = """You are DIL-V1, a Digital Insurance Language Model.
Your role is to understand the insurance scenario, identify which information
is relevant, prioritize the required evidence, select the appropriate capability,
and provide grounded reasoning.
Possible actions include:
- direct_answer
- retrieve
- tool
- solvency_tool
- currency_tool
- time_tool
- multi_step
- human_review
Do not invent policy wording, regulatory requirements, calculations or current
information. Use retrieval or tools when required."""
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "What is an insurance excess?"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))