Downloads · 30 days
32
29% of all-time downloads
Paul-B98/codet5p_220m_py_sum
codet5p_220m_py_sum is a machine learning model from Paul-B98. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
This Model is based on the CodeT5+ (220m) from salesforce and was finetuned for the code summarization task by using the XCodeGlue Dataset. The Code is accessible on Github.
Downloads · 30 days
32
29% of all-time downloads
All-time downloads
111
Public
Repo size
1.8 GB
Likes
2
Public
Click a slice to open those files.
.bin892 MB · 100%
From the Hugging Face model README
This Model is based on the CodeT5+ (220m) from salesforce and was finetuned for the code summarization task by using the XCodeGlue Dataset. The Code is accessible on Github.
| Modell | BLEU |
|---|---|
| CodeT5-base-sum-python | 23.564 |
| CodeT5-base-multi-sum | 23.985 |
| Code-Trans-S-ST | 5.495 |
| Code-Trans-S-TF | 21.093 |
| Code-Trans-S-MT | 5.450 |
| Code-Trans-S-MT-TF | 16.378 |
| Code-Trans-B-ST | 4.638 |
| Code-Trans-B-TF | 21.671 |
| Code-Trans-B-MT | 2.957 |
| Code-Trans-B-MT-TF | 13.766 |
| Code-Trans-L-TF | 23.306 |
| Code-Trans-L-MT | 13.487 |
| Code-Trans-L-MT-TF | 16.362 |
| CodeT5+ 220m Py Sum* | 25.245 |
The model can be easily download from Huggingface and used in a summarization pipeline.
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("Paul-B98/codet5p_220m_py_sum"),
tokenizer=AutoTokenizer.from_pretrained("Salesforce/codet5p-220m"),
device=0
)
example_method = """
def greet(name):
print(f"Hello, {name}!")
"""
pipeline([example_method])[0]["summary_text"]