This model was fine-tuned for biomedical applications, primarily focusing on enhancing accuracy in question-answering tasks within this domain.
The model is suitable for biomedical question-answering and other related language generation tasks.
Not recommended for general-purpose NLP tasks outside the biomedical domain or for clinical decision-making.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4# Load tokenizer and model
5tokenizer = AutoTokenizer.from_pretrained("BeastGokul/BioMistral-7B-Finetuned")
6model = AutoModelForCausalLM.from_pretrained("BeastGokul/BioMistral-7B-Finetuned")
7
8# Example usage
9input_text = "What are the symptoms of diabetes?"
10inputs = tokenizer(input_text, return_tensors="pt")
11outputs = model.generate(**inputs)
12print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model was fine-tuned using the LoRA (Low-Rank Adaptation) method, with a configuration set for biomedical question-answering.
Training Hyperparameters
Precision: 4-bit quantization with BitsAndBytes
Learning Rate: 2e-5
Batch Size: Effective batch size of 16 (4 per device, gradient accumulation steps of 4)
Number of Epochs: 3