Downloads · 30 days
9
28% of all-time downloads
vsingh10/bitnet-medical-chat
bitnet-medical-chat is a machine learning model from vsingh10. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a fine-tuned version of microsoft/bitnet-b1.58-2B-4T-bf16 using LoRA adapters on a medical chatbot dataset. It is designed to act as a helpful and knowledgeable medical assistant for answering patient queries…
Downloads · 30 days
9
28% of all-time downloads
All-time downloads
32
Public
Parameters
2.4B
4.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.8 GB · 100%
From the Hugging Face model README
This is a fine-tuned version of microsoft/bitnet-b1.58-2B-4T-bf16 using LoRA adapters on a medical chatbot dataset.
It is designed to act as a helpful and knowledgeable medical assistant for answering patient queries with medically accurate and detailed explanations.
microsoft/bitnet-b1.58-2B-4T-bf16ruslanmv/ai-medical-chatbotNot intended for:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "vsingh10/bitnet-medical-chat"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
messages = [
{"role": "system", "content": "You are a helpful and knowledgeable medical doctor. Always provide detailed, medically accurate explanations."},
{"role": "user", "content": "Hello doctor, I have bad acne. How do I get rid of it?"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=300,
temperature=0.7,
top_p=0.9,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))