Downloads · 30 days
7
12% of all-time downloads
kabesaml/regllm-qwen25-7b-banking-lora
regllm-qwen25-7b-banking-lora is a text generation model from kabesaml. 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 LoRA adapter fine-tuned on top of Qwen/Qwen2.5-7B-Instruct for banking regulation and credit risk expertise.
Downloads · 30 days
7
12% of all-time downloads
All-time downloads
57
Public
Repo size
334 MB
Likes
0
Public
Click a slice to open those files.
.safetensors323 MB · 95%
From the Hugging Face model README
A LoRA adapter fine-tuned on top of Qwen/Qwen2.5-7B-Instruct for banking regulation and credit risk expertise.
This model specialises in:
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-7B-Instruct |
| Method | LoRA (SFT) |
| LoRA rank | 32 |
| LoRA alpha | 64 |
| Training examples | ~163 (SQL + Banking Q&A + Regulation) |
| Adapter size | ~309MB |
| Run | 2026-02-22 |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model = "Qwen/Qwen2.5-7B-Instruct"
adapter = "kabesaml/regllm-qwen25-7b-banking-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(
base_model,
torch_dtype=torch.float16,
device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter)
messages = [
{"role": "system", "content": "Eres un asistente experto en regulación bancaria y el sector bancario español. Responde con datos precisos y cita la normativa cuando sea posible."},
{"role": "user", "content": "¿Qué es la tasa de impago bajo el estándar CRR Art. 178?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Eres un asistente experto en regulación bancaria y el sector bancario español.
Responde con datos precisos y cita la normativa cuando sea posible.