Downloads · 30 days
0
Yash345/Qwen2.5-1.5B-Medical-Denoise-Adapter
Qwen2.5-1.5B-Medical-Denoise-Adapter is a machine learning model from Yash345. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Author: Yash Sharma Context: Developed as a reproduction of the paper "Evaluating Robustness in LLM-based Medical Chatbots" (Wadhwani AI).
Downloads · 30 days
0
Access
Public
Updated Dec 17, 2025
Repo size
295 MB
Likes
0
Public
Click a slice to open those files.
.safetensors295 MB · 100%
From the Hugging Face model README
base_model: Qwen/Qwen2.5-1.5B-Instruct
library_name: peft
tags:
- medical
- asr-correction
- robustness
- qlora
Author: Yash Sharma
Context: Developed as a reproduction of the paper "Evaluating Robustness in LLM-based Medical Chatbots" (Wadhwani AI).
This is a QLoRA adapter fine-tuned on Qwen/Qwen2.5-1.5B-Instruct. It is designed to run on resource-constrained edge devices (T4 GPU / CPU) to correct severe ASR (Automatic Speech Recognition) phonetic errors in medical queries.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# 1. Load Base Model
base_model_id = "Qwen/Qwen2.5-1.5B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
# 2. Load This Adapter
model = PeftModel.from_pretrained(model, "YOUR_HF_USERNAME/Qwen2.5-1.5B-Medical-Denoise-Adapter")
# 3. Inference
noisy_query = "wat r da simptoms of birus"
prompt = f"User: Fix this medical query: {noisy_query}\nAssistant:"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))