Downloads · 30 days
0
odin-deus/odin-gemma4-medical-ner-v1
odin-gemma4-medical-ner-v1 is a machine learning model from odin-deus. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as gemma.
Fine-tuned LoRA adapter for medical Named Entity Recognition (and optionally Relation Extraction).
Downloads · 30 days
0
Access
Public
Updated Apr 9, 2026
Repo size
372 MB
Likes
0
Public
Click a slice to open those files.
.safetensors339 MB · 91%
From the Hugging Face model README
Fine-tuned LoRA adapter for medical Named Entity Recognition (and optionally Relation Extraction).
Base model: google/gemma-4-E4B-it via Unsloth QLoRA (4-bit)
Previous version: odin-deus/odin-llama3.1-medical-ner-v14 (Llama 3.1 8B, F1=0.911)
DISEASE DRUG SYMPTOM ADVERSE_EFFECT GENE_PROTEIN ANATOMY PROCEDURE CHEMICAL VARIANT CELL_LINE SPECIES
treats causes associated_with interacts_with located_in affects
| Parameter | Value |
|---|---|
| Training examples | 600 |
| LoRA rank | 32 |
| Max steps | 300 |
| Corpora | ADE Corpus V2, BC5CDR, BioRED |
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="odin-deus/odin-gemma4-medical-ner-v1",
max_seq_length=2048,
load_in_4bit=True,
)
text = "Ibuprofen was prescribed for the treatment of rheumatoid arthritis."
prompt = 'Extract all named medical entities as JSON. Text: "{}"'.format(text)
inputs = tokenizer.apply_chat_template(
[{"role": "user", "content": prompt}],
return_tensors="pt",
add_generation_prompt=True,
).to(model.device)
outputs = model.generate(inputs, max_new_tokens=256, temperature=0)
print(tokenizer.decode(outputs[0]))