Java comment classifier
This is a SetFit model that can be used for Java code comment classification.
The model has been trained using few-shot learning that involves:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned model.
Model Description
- Model Type: SetFit
- Classification head: RandomForestClassifier
Sources
- Repository: GitHub
- Paper: Evaluating the Performance and Efficiency of Sentence-BERT for Code Comment Classification
- Dataset: HF Dataset
How to use it
First, install the depencies:
pip install setfit scikit-learn
Then, load the model and run inferences:
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("fabiancpl/nlbse25_java")
# Run inference
preds = model("This function sorts a list of numbers.")
Cite as
@inproceedings{11029440,
author={Peña, Fabian C. and Herbold, Steffen},
booktitle={2025 IEEE/ACM International Workshop on Natural Language-Based Software Engineering (NLBSE)},
title={Evaluating the Performance and Efficiency of Sentence-BERT for Code Comment Classification},
year={2025},
pages={21-24},
doi={10.1109/NLBSE66842.2025.00010}}
- Downloads last month
- 159
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for fabiancpl/nlbse25_java
Base model
sentence-transformers/all-MiniLM-L6-v2