A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://help.github.com/en/copilot/how-tos/use-ai-models/create-a-custom-model below:

Creating a custom model for GitHub Copilot

You can fine-tune Copilot code completion by creating a custom model based on code in your organization's repositories.

Who can use this feature?

Owners of organizations enrolled in the public preview.

Organizations with a Copilot Enterprise plan

Note

The current public preview of custom models for GitHub Copilot Enterprise will be discontinued. For now, participants can continue using their custom models, but we are no longer processing new training requests. We encourage participants to try the newer GPT-4.1 Copilot code completion model. See Changing the AI model for Copilot code completion.

Prerequisite

The code on which you want to train a custom model must be hosted in repositories owned by your organization on GitHub.

Limitations About Copilot custom models

By default GitHub Copilot uses a large language model that has been trained on a large number of public code repositories, so that it can provide code completion for a wide range of programming languages in many different contexts. You can use this model as the basis for creating a custom large language model that you train specifically on your own code. This process is often known as fine-tuning.

By creating a custom model you enable GitHub Copilot to show you code completion suggestions that are:

This provides:

About model creation

Currently, in the public preview, only one organization in an enterprise is permitted to create a custom model.

As an owner of the organization that's permitted to create a custom model, you can choose which of your organization's repositories to use to train the model. You can train the model on one, several, or all of the repositories in the organization. The model is trained on the content of the default branches of the selected repositories. Optionally, you can specify that only code written in certain programming languages should be used for training. The custom model will be used for generating code completion suggestions in all file types, irrespective of whether that type of file was used for training.

You can also choose whether telemetry data (such as the prompts entered by users and the suggestions generated by Copilot) should be used when training the model. For more information, see Telemetry data collection and usage for custom models, later in this article.

Once initiated, custom model creation will take many hours to complete. You can check the progress of the training in your organization's settings. When model creation completes - or if it fails to complete - the person who initiated the model training will be notified by email.

If model creation fails, Copilot will continue to use the current model for generating code completion suggestions.

About model usage

As soon as the custom model is successfully created, all managed users in your enterprise who get Copilot Enterprise access from the organization in which the custom model is deployed will start to see Copilot code completion suggestions that are generated using the custom model. The custom model will always be used for any code these users edit, irrespective of where the code resides. Users cannot choose which model is used to generate the code completion suggestions they see.

When you can benefit from a custom model

The value of a custom model is most pronounced in environments with:

However, even in standardized environments, fine-tuning offers an opportunity to align Copilot code completion more closely with your organization’s established coding practices and standards.

Assess the effectiveness of a custom model

While some coding environments are more likely to benefit from fine-tuning, there is no guaranteed correlation between specific behaviors in a codebase and the quality of the results you get from a custom model. It is advisable to assess the use and satisfaction levels of GitHub Copilot code completion suggestions before and after the implementation of a custom model.

Comparing results from the API and developer survey, from before and after the implementation of a custom model, will give you an indication of the effectiveness of the custom model.

Creating a custom model

You can use your organization settings to create a custom large language model.

  1. In the upper-right corner of GitHub, click your profile picture, then click Your organizations.

  2. Next to the organization, click Settings.

  3. In the left sidebar, click Copilot then click Custom model.

  4. On the "Custom models" page, click Train a new custom model.

  5. Under "Select repositories," choose either Selected repositories or All repositories.

  6. If you chose Selected repositories, select the repositories you want to use for training then click Apply.

  7. Optionally, if you want to train your model only on code written in certain programming languages, under "Specify languages," start typing the name of a language you want to include. Select the required language from the list that's displayed. Repeat the process for each language you want to include.

  8. To improve the performance of your model, select the checkbox labeled Include data from prompts and suggestions.

    By selecting this option you allow Copilot to collect data for prompts that user submitted and the code completion suggestions that were generated. Once sufficient data has been collected, Copilot will use this as part of the model training process, allowing it to produce a more effective model.

    For more information, see Telemetry data collection and usage for custom models, later in this article.

  9. Click Create new custom model.

Checking the progress of model creation

You can check in your organization settings for an indication of how model creation is progressing.

  1. Go to your organization's settings for Copilot custom models. See Creating a custom model above.

  2. The first time you train a model, the page that's displayed shows the training results.

    If this is not the first training, the current and previous training attempts are listed. To see details of the current training process, click the first ellipsis button (...), then click Training details.

Reasons for training failure

Model training may fail for a variety of reasons, including:

Retraining or deleting the custom model

As an organization owner, you can update or delete the custom model from your organization's settings page.

Retraining the model updates it to include any new code that has been added to the repositories you selected for training. You can retrain the model once a week.

  1. Go to your organization's settings for Copilot custom models. See Creating a custom model above.
  2. On the model training page, click the first ellipsis button (...), then click either Retrain model or Delete model.

If you retrain the model, Copilot will continue to use the current model to generate code completion suggestions until the new model is ready. Once the new model is ready, it will be automatically be used for code completion suggestions for all managed users who get a Copilot Enterprise plan from the organization.

If you delete the custom model, Copilot will use the included model for generating code completion suggestions for all users who get a Copilot plan from the organization.

Telemetry data collection and usage for custom models

When you create a custom model, you can choose to allow GitHub to collect telemetry data for the purposes of training the model. This data is used to improve the quality of the code completion suggestions the model can generate.

What telemetry data is collected? How is telemetry data used?

Telemetry data is primarily used to fine-tune the Copilot custom model to better understand and predict your organization’s coding patterns. Specifically, it helps:

Data storage and retention Privacy and data security

GitHub is committed to ensuring that your organization’s data remains private and secure.

Important considerations

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4