A QLoRA fine-tuned variant of TinyLlama-1.1B-intermediate-step-1431k-3T, trained on medical question-answering data. The LoRA adapter has been merged into the base weights, so this repo is a standalone model — no separate adapter loading required.
⚠️ Intended use
This model was trained as part of a GenAI training lab to demonstrate the fine-tuning → merge → deploy workflow. It is not validated for real clinical or medical use and should not be used to inform actual medical decisions. Treat its outputs as educational examples of what a small fine-tuned LLM can produce, not medical advice.
Training details
Base model:TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
Method: QLoRA (4-bit NF4 quantization during training) via peft + trl.SFTTrainer
LoRA config:r=8, lora_alpha=16
Dataset:BI55/MedText — medical case/question-answer pairs
Steps: 400
Merge: adapter merged into the base model via PeftModel.merge_and_unload(), then saved as a full standalone model
How to use
fromtransformersimportAutoModelForCausalLM,AutoTokenizer,pipelinerepo_id="tweijie/tinyllama-medical-merged"model=AutoModelForCausalLM.from_pretrained(repo_id)tokenizer=AutoTokenizer.from_pretrained(repo_id)pipe=pipeline("text-generation",model=model,tokenizer=tokenizer,max_length=200)prompt="<s>[INST] A patient presents with restless leg sensations at night. What could be the cause? [/INST]"print(pipe(prompt)[0]["generated_text"])Limitations1.1Bparameters—smallmodel,pronetohallucinationandfactualerrors,especiallyonmedicalcontent.Fine-tunedonasinglenarrowdataset(400trainingsteps);notbroadlyevaluated.Nosafety/alignmenttuningbeyondthebasemodel's own training.