Use the model as a sequence classifier
#10
by
A123hmed
- opened
Hello, I was wondering if you intend on supporting sequence classification like you do for Gemma 2 using "Gemma2ForSequenceClassification".
Do you intent to release "Gemma3ForSequenceClassification"? Because as it stands now, Gemma 2's sequence classifier won't work with Gemma 3 when I try to finetune a Gemma 3 model for sequence classification. Is there any workaround that I can do to allow it to work?
I did this temporary workaround, in the "modeling_gemma2.py", I import the Gemma 3 text model class as follows:
from ..gemma3.modeling_gemma3 import Gemma3TextModel
and then in "Gemma2ForSequenceClassification" class in the same file, I change this line:
self.model = Gemma2Model(config)
to
self.model = Gemma3TextModel(config)