Downloads · 30 days
9
14% of all-time downloads
sambitchakhf03/gemma-3-270m-classifier
gemma-3-270m-classifier is a machine learning model from sambitchakhf03. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Fine-tuned version of google/gemma-3-270m for binary threat classification (Safe vs Unsafe prompts).
Downloads · 30 days
9
14% of all-time downloads
All-time downloads
64
Public
Parameters
268M
6.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt4.3 GB · 56%
From the Hugging Face model README
Fine-tuned version of google/gemma-3-270m for binary threat classification (Safe vs Unsafe prompts).
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("path/to/model")
tokenizer = AutoTokenizer.from_pretrained("path/to/model")
text = "Your prompt here"
inputs = tokenizer(text, return_tensors="pt", max_length=256, truncation=True)
outputs = model(**inputs)
prediction = outputs.logits.argmax(-1).item()
label = "unsafe" if prediction == 1 else "safe"