NLBSE/nlbse25-code-comment-classification
Viewer • Updated • 13.2k • 1.17k
Run fabiancpl/nlbse25_java on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/fabiancpl/nlbse25_java. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/fabiancpl/nlbse25_java on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use fabiancpl/nlbse25_java with setfit:
from setfit import SetFitModel
model = SetFitModel.from_pretrained("fabiancpl/nlbse25_java")
preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"])
print(preds)How to use fabiancpl/nlbse25_java with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("fabiancpl/nlbse25_java")
sentences = [
"The weather is lovely today.",
"It's so sunny outside!",
"He drove to the stadium."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]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:
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.")
@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}}
Base model
nreimers/MiniLM-L6-H384-uncased