Instructions to use nnl26/gemma_toxic_sequence_cls with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use nnl26/gemma_toxic_sequence_cls with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("unsloth/gemma-2-2b-it-bnb-4bit") model = PeftModel.from_pretrained(base_model, "nnl26/gemma_toxic_sequence_cls") - Transformers
How to use nnl26/gemma_toxic_sequence_cls with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nnl26/gemma_toxic_sequence_cls", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
gemma_toxic_sequence_cls
This model is a fine-tuned version of unsloth/gemma-2-2b-it-bnb-4bit on the None dataset. It achieves the following results on the evaluation set:
- F1 Threshold 0.5: 0.8308
- Loss: 0.1107
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 0.1
- training_steps: 500
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | F1 Threshold 0.5 | Validation Loss |
|---|---|---|---|---|
| 0.5805 | 0.0533 | 25 | 0.0278 | 0.6418 |
| 0.3259 | 0.1066 | 50 | 0.5364 | 0.2144 |
| 0.2077 | 0.1599 | 75 | 0.7106 | 0.1802 |
| 0.0284 | 0.2132 | 100 | 0.7817 | 0.1314 |
| 0.0577 | 0.2665 | 125 | 0.7446 | 0.1616 |
| 0.1123 | 0.3198 | 150 | 0.8280 | 0.1025 |
| 0.0950 | 0.3731 | 175 | 0.8107 | 0.1164 |
| 0.1635 | 0.4264 | 200 | 0.8395 | 0.0897 |
| 0.0772 | 0.4797 | 225 | 0.8349 | 0.1131 |
| 0.1412 | 0.5330 | 250 | 0.8097 | 0.1102 |
| 0.1280 | 0.5864 | 275 | 0.8308 | 0.1107 |
Framework versions
- PEFT 0.21.1
- Transformers 5.17.0
- Pytorch 2.11.0+cu130
- Datasets 4.8.5
- Tokenizers 0.23.2
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for nnl26/gemma_toxic_sequence_cls
Base model
unsloth/gemma-2-2b-it-bnb-4bit