Downloads · 30 days
16
31% of all-time downloads
Chakster/Tinyllama-pneumonia
Tinyllama-pneumonia is a machine learning model from Chakster. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
This model is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 specifically trained for answering questions about pneumonia.
Downloads · 30 days
16
31% of all-time downloads
All-time downloads
52
Public
Repo size
1.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.3 GB · 79%
From the Hugging Face model README
This model is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 specifically trained for answering questions about pneumonia.
⚠️ Important: This model is in development/testing phase and should NOT be used for actual medical diagnosis or treatment decisions.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"TinyLlama/TinyLlama-1.1B-Chat-v1.0",
torch_dtype=torch.float16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "your-username/tinyllama-pneumonia-improved")
tokenizer = AutoTokenizer.from_pretrained("your-username/tinyllama-pneumonia-improved")
# Generate response
question = "What is pneumonia?"
input_text = f"### Question: {question}\n### Answer:"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=80, temperature=0.6)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
If you use this model, please cite:
@misc{tinyllama-pneumonia-improved,
author = {Your Name},
title = {TinyLlama Fine-tuned for Pneumonia Q&A},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/your-username/tinyllama-pneumonia-improved}
}