CoolFace
Modelpublic

lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
2likes46downloads
Model Card

Gemma-4-E2B-IT-SFT-RLVR-Medical

Gemma-4-E2B-it fine-tuned on PubMedQA using SFT and RLVR.<br> Also check out the training code on GitHub.<br> Quantized models are available here.

Setup

python
#!pip install transformers, torch, accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical")
model = AutoModelForCausalLM.from_pretrained("lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "Do GEC produce and bear factor H under complement attack?"}
        ]
    },
]
inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=1024)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))

Benchmarks

**Model****Quantization****PubMedQA<br>(In-Domain)****MedQA-USMLE<br>(Zero-Shot Transfer)**
Gemma-4-E2B-it (base model)-58.10 %29.54 %
Gemma-4-E2B-it + SFT + RLVR-73.10 %43.05 %
Gemma-4-E2B-it + SFT + RLVRQ8_072.40 %43.00 %
Gemma-4-E2B-it + SFT + RLVRQ6_K72.10 %42.18 %
Gemma-4-E2B-it + SFT + RLVRQ5KM72.00 %38.88 %
Gemma-4-E2B-it + SFT + RLVRQ4KM71.80 %38.88 %