Model Card for UniXcoder base Model Details Model Description UniXcoder is a unified cross modal pre trained model that leverages multimodal data (i.e. code comment and AST) to pretrain code representation. Developed by: Microsoft Team Shared by [Optional]: Hugging Face Model type: Feature Engineering Language(s) (NLP): en License: Apache 2.0 Related Models: Parent Model: RoBERTa Resources for more information: Associated Paper Uses 1. Dependency pip install torch pip install transformers 2. Quick Tour We implement a class to use UniXcoder and you can follow the code to build UniXcoder. You can download the class by In the following, we will give zero shot examples for several tasks under different mode, including code search (encoder only) , code completion (decoder only) , function name prediction (encoder decoder) , API recommendation (encoder decoder) , code summarization (encoder decoder) . 3. Encoder only Mode For encoder only mode, we give an example of code search . 1) Code and NL Embeddings Here, we give an example to obtain code fragment embedding from CodeBERT. 2) Similarity between code and NL Now, we calculate cosine similarity between NL and two functions. Although th…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy