Downloads · 30 days
16
8% of all-time downloads
Mohamad-Jaallouk/model-to-production-2.2
model-to-production-2.2 is a text classification model from Mohamad-Jaallouk. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as gemma.
A fine-tuned Gemma 3 1B Instruct model for Swedish binary text classification.
Downloads · 30 days
16
8% of all-time downloads
All-time downloads
205
Public
Parameters
1000M
2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2 GB · 98%
From the Hugging Face model README
A fine-tuned Gemma 3 1B Instruct model for Swedish binary text classification.
This model is a merged LoRA fine-tuned version of google/gemma-3-1b-it for binary text classification on Swedish text data.
| Metric | Value |
|---|---|
| Accuracy | 97.26% |
| F1 Score (macro) | 97.26% |
| Eval Loss | 0.067 |
| Parameter | Value |
|---|---|
| Base model | google/gemma-3-1b-it |
| Learning rate | 5e-05 |
| Batch size | 8 |
| Gradient accumulation steps | 2 |
| Effective batch size | 16 |
| Epochs | 1 |
| Max sequence length | 512 |
| Warmup ratio | 0.1 |
| Optimizer | AdamW |
| Precision | bfloat16 |
| Flash Attention | Enabled |
| Parameter | Value |
|---|---|
| LoRA rank (r) | 32 |
| LoRA alpha | 64 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj, up_proj, down_proj, gate_proj |
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="Mohamad-Jaallouk/model-to-production-2.2",
device="cuda" # or "cpu"
)
result = classifier("Din svenska text här")
print(result)
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "Mohamad-Jaallouk/model-to-production-2.2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="cuda"
)
text = "Din svenska text här"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
inputs = {k: v.to(model.device) for k, v in inputs.items()}
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=-1).item()
print(f"Predicted class: {prediction}")
model.safetensors - Merged model weightsconfig.json - Model configurationtokenizer.json - Tokenizertokenizer_config.json - Tokenizer configurationtrain.py - Training scripttransform.py - Data augmentation utilitiesrequirements.txt - Python dependenciestrain.csv - Training dataval_small.csv - Validation dataText is preprocessed with the following transformations:
For training, additional augmentation is applied:
This model inherits the Gemma license from the base model.
If you use this model, please cite:
@misc{model-to-production-2.2,
author = {Mohamad Jaallouk},
title = {Model-to-Production v2.2: Swedish Text Classification},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Mohamad-Jaallouk/model-to-production-2.2}}
}