Instructions to use EngineeringSoftware/teco with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EngineeringSoftware/teco with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("EngineeringSoftware/teco") model = AutoModelForSeq2SeqLM.from_pretrained("EngineeringSoftware/teco", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from EngineeringSoftware/teco: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/EngineeringSoftware/teco/resolve/main/README.md
- Command line
-
hf download hf://EngineeringSoftware/teco/README.md
-
curl -L -o README.md https://huggingface.co/EngineeringSoftware/teco/resolve/main/README.md
license: mit
TeCo is a deep learning model using code semantics to automatically complete the next statement in a test method. Completing tests requires reasoning about the execution of the code under test, which is hard to do with only syntax-level data that existing code completion models use. To solve this problem, we leverage the fact that tests are readily executable. TeCo extracts and uses execution-guided code semantics as inputs for the ML model, and performs reranking via test execution to improve the outputs. On a large dataset with 131K tests from 1270 open-source Java projects, TeCo outperforms the state-of-the-art by 29% in terms of test completion accuracy.
TeCo is presented in the following ICSE 2023 paper:
Title: Learning Deep Semantics for Test Completion
Authors: Pengyu Nie, Rahul Banerjee, Junyi Jessy Li, Raymond Mooney, Milos Gligoric
TeCo's code is hosted on GitHub: https://github.com/EngineeringSoftware/teco
This repo hosts the model we trained, but it should be used together with our codebase; please read the README there, which describes how to download and use this model.