File size: 3,431 Bytes
acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc acc7ce8 02bdefc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
---
language:
- fr
- en
- de
- es
- it
license: mit
tags:
- text-classification
- commit-messages
- humor-detection
- eurobert
- lora
- git
- optuna-optimized
datasets:
- custom
metrics:
- accuracy
- f1
library_name: transformers
pipeline_tag: text-classification
model-index:
- name: eurobert-commit-humor
results:
- task:
type: text-classification
name: Text Classification
dataset:
type: custom
name: Git Commit Humor Detection
metrics:
- type: accuracy
value: 85.3
name: Global Accuracy
- type: accuracy
value: 82.9
name: Funny Class Accuracy
---
# 🎭 EuroBERT Commit Humor Classifier (Optimized)
## 📋 Description
Ce modèle est une version optimisée d'EuroBERT fine-tunée pour détecter l'humour dans les messages de commit Git.
Il a été optimisé avec Optuna sur plusieurs cycles d'amélioration automatique du dataset.
## 🎯 Performances
- **Accuracy globale**: 85.3%
- **Accuracy classe "funny"**: 82.9%
- **Accuracy classe "neutral"**: 85.6%
- **Seuil optimal**: 0.35
## 🚀 Utilisation
```python
from transformers import pipeline
# Charger le modèle
classifier = pipeline("text-classification",
model="LBerthalon/eurobert-commit-humor",
trust_remote_code=True)
# Prédiction
result = classifier("fix: gcc et moi c'est compliqué")
print(result)
# [{"label": "funny", "score": 0.85}]
```
## 🔧 Utilisation avancée
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Charger le modèle et tokenizer
tokenizer = AutoTokenizer.from_pretrained("LBerthalon/eurobert-commit-humor", trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained("LBerthalon/eurobert-commit-humor", trust_remote_code=True)
# Préparer l'input
text = "feat: ajout de la fonctionnalité qui marche pas"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
# Prédiction
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
print(f"Funny: {predictions[0][1]:.3f}")
print(f"Neutral: {predictions[0][0]:.3f}")
```
## 📊 Exemples de Prédictions
| Message de Commit | Prédiction | Score |
|-------------------|------------|-------|
| "fix: correction du bug" | neutral | 0.92 |
| "feat: ajout de la magie noire" | funny | 0.78 |
| "docs: mise à jour README" | neutral | 0.95 |
| "fix: ça marche sur ma machine" | funny | 0.83 |
## 🛠️ Optimisation
Ce modèle a été optimisé avec :
- **Optuna** pour l'optimisation bayésienne des hyperparamètres
- **LoRA** (Low-Rank Adaptation) pour un fine-tuning efficace
- **Amélioration itérative** du dataset
- **5 cycles d'optimisation** automatique
## 📈 Architecture
- **Modèle de base**: EuroBERT
- **Technique**: LoRA Fine-tuning
- **Classes**: 2 (funny, neutral)
- **Langues supportées**: Français (principal), Anglais, Allemand, Espagnol, Italien
## 🎓 Citation
```bibtex
@misc{eurobert-commit-humor-optimized,
title={EuroBERT Commit Humor Classifier (Optimized)},
author={LBerthalon},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/LBerthalon/eurobert-commit-humor}
}
```
## 📄 Licence
MIT License
|