Edit model card

Model Card for starman76/t5_500

Model Details

This model is a fine-tuned version of the T5-small model specifically tailored for question answering tasks in the biomedical domain. It has been trained to understand and generate responses based on biomedical literature, making it particularly useful for researchers and practitioners in the field.

Getting started with the model

!pip install transformers

from transformers import T5ForConditionalGeneration, T5Tokenizer
import torch

tokenizer = T5Tokenizer.from_pretrained("starman76/t5_500")
model = T5ForConditionalGeneration.from_pretrained("starman76/t5_500")

context = "The Recognition of Stroke in the Emergency Room (ROSIER) scale: development and validation of a stroke recognition instrument. BACKGROUND: In patients with acute stroke, rapid intervention is crucial to maximise early treatment benefits. Stroke patients commonly have their first contact with medical staff in the emergency room (ER). We designed and validated a stroke recognition tool-the Recognition of Stroke in the Emergency Room (ROSIER) scale-for use by ER physicians. METHODS: We prospectively collected data for 1 year (development phase) on the clinical characteristics of patients with suspected acute stroke who were admitted to hospital from the ER. We used logistic regression analysis and clinical reasoning to develop a stroke recognition instrument for application in this setting. Patients with suspected transient ischaemic attack (TIA) with no symptoms or signs when assessed in the ER were excluded from the analysis. The instrument was assessed using the baseline 1-year dataset and then prospectively validated in a new cohort of ER patients admitted over a 9-month period. FINDINGS: In the development phase, 343 suspected stroke patients were assessed (159 stroke, 167 non-stroke, 32 with TIA [17 with symptoms when seen in ER]). Common stroke mimics were seizures (23%), syncope (23%), and sepsis (10%). A seven-item (total score from -2 to +5) stroke recognition instrument was constructed on the basis of clinical history (loss of consciousness, convulsive fits) and neurological signs (face, arm, or leg weakness, speech disturbance, visual field defect). When internally validated at a cut-off score greater than zero, the instrument showed a diagnostic sensitivity of 92%, specificity of 86%, positive predictive value (PPV) of 88%, and negative predictive value (NPV) of 91%. Prospective validation in 173 consecutive suspected stroke referrals (88 stroke, 59 non-stroke, 26 with TIA [13 with symptoms]) showed sensitivity of 93% (95% CI 89-97), specificity 83% (77-89), PPV 90% (85-95), and NPV 88% (83-93). The ROSIER scale had greater sensitivity than existing stroke recognition instruments in this population. INTERPRETATION: The ROSIER scale was effective in the initial differentiation of acute stroke from stroke mimics in the ER. Introduction of the instrument improved the appropriateness of referrals to the stroke team."
question = "ROSIER scale is used for which disorder?"
inputs = tokenizer(question, context, add_special_tokens=True, return_tensors="pt", max_length=512, truncation=True)

with torch.no_grad():
    outputs = model.generate(input_ids=inputs['input_ids'], attention_mask=inputs['attention_mask'], max_length=50)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)

print("Answer:", answer)
Downloads last month
1
Safetensors
Model size
60.5M params
Tensor type
F32