Downloads · 30 days
12
11% of all-time downloads
LBerthalon/eurobert-commit-humor
eurobert-commit-humor is a text classification model from LBerthalon. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
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.
Downloads · 30 days
12
11% of all-time downloads
All-time downloads
108
Public
Parameters
212M
1.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors849 MB · 98%
From the Hugging Face model README
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.
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}]
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}")
| 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 |
Ce modèle a été optimisé avec :
@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}
}
MIT License