This is a locally hosted version of GitHub Copilot. It uses the SalesForce CodeGen model and FasterTransformer backend in NVIDIA’s Triton inference server.


  • Docker
  • docker-compose >= 1.28
  • An Nvidia GPU with compute capability greater than 7.0, and enough VRAM to run the model you want
  • nvidia-docker
  • curl and zstd for downloading and unpacking models

Copilot plugin

You can configure the official VSCode Copilot plugin to use your local server. Just edit your settings.json to add.

    "github.copilot.advanced": {
        "debug.overrideEngine": "codegen",
        "debug.testOverrideProxyUrl": "http://localhost:5000",
        "debug.overrideProxyUrl": "http://localhost:5000"

set up

Run the setup script to select the model to use. This will download the model from Huggingface and convert it to use with the FasterTransformer.

$ ./ 
Models available:
[1] codegen-350M-mono (2GB total VRAM required; Python-only)
[2] codegen-350M-multi (2GB total VRAM required; multi-language)
[3] codegen-2B-mono (7GB total VRAM required; Python-only)
[4] codegen-2B-multi (7GB total VRAM required; multi-language)
[5] codegen-6B-mono (13GB total VRAM required; Python-only)
[6] codegen-6B-multi (13GB total VRAM required; multi-language)
[7] codegen-16B-mono (32GB total VRAM required; Python-only)
[8] codegen-16B-multi (32GB total VRAM required; multi-language)
Enter your choice [6]: 2
Enter number of GPUs [1]: 1
Where do you want to save the model [/home/moyix/git/fauxpilot/models]? /fastdata/mymodels
Downloading and converting the model, this will take a while...
Converting model codegen-350M-multi with 1 GPUs
Loading CodeGen model
Downloading config.json: 100%|██████████| 996/996 [00:00<00:00, 1.25MB/s]
Downloading pytorch_model.bin: 100%|██████████| 760M/760M [00:11<00:00, 68.3MB/s] 
Creating empty GPTJ model
Conversion complete.
Saving model to codegen-350M-multi-hf...

=============== Argument ===============
saved_dir: /models/codegen-350M-multi-1gpu/fastertransformer/1
in_file: codegen-350M-multi-hf
trained_gpu_num: 1
infer_gpu_num: 1
processes: 4
weight_data_type: fp32
[... more conversion output trimmed ...]
Done! Now run ./ to start the FauxPilot server.

#FauxPilot #Homepage #Documentation #Downloads #Open #Source #GitHub #Copilot #Server #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *