Views
No views yet
t5-base model. It has its own SentencePiece vocabulary model. It used single-task training on source code summarization python dataset.1from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
2
3pipeline = SummarizationPipeline(
4 model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_python"),
5 tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_python", skip_special_tokens=True),
6 device=0
7)
8
9tokenized_code = '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
10pipeline([tokenized_code])| Language / Model | Python | SQL | C# |
|---|---|---|---|
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | 13.37 | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | 23.57 |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | 19.98 | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |