How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="baseten/gemma-4-e2b-it-sequence-classification", trust_remote_code=True)
# Load model directly
from transformers import AutoProcessor, AutoModelForSequenceClassification

processor = AutoProcessor.from_pretrained("baseten/gemma-4-e2b-it-sequence-classification", trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained("baseten/gemma-4-e2b-it-sequence-classification", trust_remote_code=True)
Quick Links

Gemma 4 E2B IT Sequence Classification

This checkpoint converts google/gemma-4-E2B-it into a two-label sequence classifier by slicing the original LM head to the single-token labels no and yes.

The classifier logits are exactly the original next-token logits for:

  • no: token id 1904
  • yes: token id 4443

Load with custom code enabled:

from transformers import AutoModelForSequenceClassification, AutoTokenizer

model_id = "baseten/gemma-4-e2b-it-sequence-classification"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(
    model_id,
    trust_remote_code=True,
    dtype="auto",
)
Downloads last month
105
Safetensors
Model size
5B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for baseten/gemma-4-e2b-it-sequence-classification

Finetuned
(222)
this model