Downloads · 30 days
5
13% of all-time downloads
HIMANSHUNAVIN03/healthcare-tinyllama-merged-v2
healthcare-tinyllama-merged-v2 is a text generation model from HIMANSHUNAVIN03. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Merged TinyLlama (1.1B Chat) with a LoRA adapter trained for safe, concise health information style (no dosing, short citations).
Downloads · 30 days
5
13% of all-time downloads
All-time downloads
39
Public
Repo size
2.2 GB
Likes
0
Public
Click a slice to open those files.
.json3.6 MB · 100%
From the Hugging Face model README
Merged TinyLlama (1.1B Chat) with a LoRA adapter trained for safe, concise health information style (no dosing, short citations).
Not for diagnosis, dosing, or clinical decision making.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
m = "HIMANSHUNAVIN03/healthcare-tinyllama-merged-v2"
tok = AutoTokenizer.from_pretrained(m, use_fast=True)
mdl = AutoModelForCausalLM.from_pretrained(m, torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32)
mdl.to("cuda" if torch.cuda.is_available() else "cpu")
prompt = "<|system|>\nYou are helpful.\n</s>\n<|user|>\nI have a fever. What general steps can help?\n</s>\n<|assistant|>\n"
x = tok(prompt, return_tensors="pt").to(mdl.device)
y = mdl.generate(**x, max_new_tokens=128, temperature=0.2, top_p=0.9, eos_token_id=tok.eos_token_id)
print(tok.decode(y[0][x['input_ids'].shape[1]:], skip_special_tokens=True))