Odin Medical NER — Gemma 4 E4B-it

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)

Entity Types

DISEASE DRUG SYMPTOM ADVERSE_EFFECT GENE_PROTEIN ANATOMY PROCEDURE CHEMICAL VARIANT CELL_LINE SPECIES

Relation Types

treats causes associated_with interacts_with located_in affects

Training

Parameter Value
Training examples 600
LoRA rank 32
Max steps 300
Corpora ADE Corpus V2, BC5CDR, BioRED

Usage

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]))
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for odin-deus/odin-gemma4-medical-ner-v1

Adapter
(337)
this model