CoolFace
Modelpublic

DunnBC22/codet5-small-Generate_Docstrings_for_Python-Condensed

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
4likes30downloads
Model Card

codet5-small-GenerateDocstringsfor_Python-Condensed

This model is a fine-tuned version of Salesforce/codet5-small on the None dataset. It achieves the following results on the evaluation set:

  • Loss: 2.1444
  • Rouge1: 0.3828
  • Rouge2: 0.2214
  • Rougel: 0.3583
  • Rougelsum: 0.3661
  • Gen Len: 12.6656

Model description

This model is trained to predict the docstring (the output) for a function (the input).

For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLPProjects/blob/main/Generate%20Docstrings/Smol%20Dataset/CodeT5_Project-Small%20Checkpoint.ipynb

For this model, I trimmed some of the longer samples to quicken the pace of training on consumer hardware.

Intended uses & limitations

This model is intended to demonstrate my ability to solve a complex problem using technology.

Training and evaluation data

Dataset Source: calum/the-stack-smol-python-docstrings (from HuggingFace Datasets; https://huggingface.co/datasets/calum/the-stack-smol-python-docstrings)

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • trainbatchsize: 16
  • evalbatchsize: 16
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lrschedulertype: linear
  • num_epochs: 4

Training results

Training LossEpochStepValidation LossRouge1Rouge2RougelRougelsumGen Len
2.90641.09652.30960.36950.20980.34640.352911.7285
2.48362.019302.20510.380.21760.35540.363512.9401
2.36693.028952.15480.38420.22190.35950.367413.0029
2.32544.038602.14440.38280.22140.35830.366112.6656

Framework versions

  • Transformers 4.26.1
  • Pytorch 1.12.1
  • Datasets 2.9.0
  • Tokenizers 0.12.1

License Notice

This model is a fine-tuned derivative of a pretrained model. Users must comply with the original model license.

Dataset Notice

This model was fine-tuned on third-party datasets which may have separate licenses or usage restrictions.