Fauxpilot (github.com/fauxpilot/fauxpilot) is an open-source project designed to provide a self-hosted, local alternative to cloud-based AI code completion services like GitHub Copilot. It empowers developers to leverage the capabilities of large language models (LLMs) for code suggestions directly within their own infrastructure, offering greater control over data privacy and model choice. The core idea is to run capable code generation models locally and integrate them into popular Integrated Development Environments (IDEs).
Fauxpilot primarily utilizes Salesforce CodeGen models, running them efficiently on NVIDIA's Triton Inference Server with the FasterTransformer backend. This setup provides an API that IDE extensions can connect to for requesting code completions.
Fauxpilot's architecture involves several key components:
- Code Generation Models: It is designed to work primarily with Salesforce CodeGen models, which are open-source LLMs trained specifically for code. These models come in various sizes (e.g., 350M, 2B, 6B parameters) and support multiple programming languages. Models are typically downloaded in GPT-J format and then converted for optimized inference.
- NVIDIA Triton Inference Server: An open-source inference serving software that simplifies the deployment of AI models at scale in production. Fauxpilot uses Triton to serve the CodeGen models.
- NVIDIA FasterTransformer: A library implementing an optimized transformer layer for inference, offering significant speedups for models like those used by Fauxpilot. It's used as a backend within Triton.
- Fauxpilot Server: A Dockerized application that manages the Triton server, model loading, and conversion. It exposes an OpenAI API-compatible endpoint.
- IDE Integration (Clients): Developers connect their IDEs to the local Fauxpilot server. This is often done by:
- Using a dedicated VS Code extension like
vscode-fauxpilot
.
- Configuring the official GitHub Copilot extension (or other compatible OpenAI API clients) to point to the local Fauxpilot server URL instead of the default GitHub Copilot service.
When a developer types code in their IDE, the client extension sends the current code context (and potentially surrounding code) as a prompt to the local Fauxpilot server. The server processes this prompt using the hosted CodeGen model via Triton/FasterTransformer and returns code suggestions back to the IDE.
- Self-Hosted & Local: Runs entirely on your own hardware, ensuring code and interactions remain private.
- Open-Source Alternative to GitHub Copilot: Provides similar AI-powered code completion functionality.
- Salesforce CodeGen Model Support: Optimized for running various sizes of CodeGen models (mono-language and multi-language).
- High-Performance Inference: Leverages NVIDIA Triton Inference Server and FasterTransformer for efficient model serving on GPUs.
- Dockerized Deployment: Simplifies setup and management using Docker and
docker-compose
.
- OpenAI API Compatibility: The Fauxpilot server exposes an API that mimics the OpenAI Completions API, allowing for broader client compatibility.
- IDE Integration: Supports integration with popular IDEs, primarily VS Code, through client-side extensions or configurations.
- Model Flexibility (within CodeGen/GPT-J family): While focused on CodeGen, the underlying system for GPT-J format models offers some flexibility.
- Cost-Effective (Potentially): No subscription fees for Fauxpilot itself. Costs are related to hardware and electricity.
- Customization & Control: Offers greater control over the models used and the operational environment compared to cloud services.
Fauxpilot is primarily designed and tested with the Salesforce CodeGen models. These models are available in different sizes and specializations:
codegen-350M-mono
: Smallest model, trained on Python.
codegen-350M-multi
: Smallest model, trained on multiple programming languages.
codegen-2B-mono
: Medium-sized model, trained on Python.
codegen-2B-multi
: Medium-sized model, trained on multiple programming languages.
codegen-6B-mono
: Larger model, trained on Python, offers better suggestions but requires more VRAM.
codegen-6B-multi
: Larger model, trained on multiple languages.
codegen-16B-mono
/ codegen-16B-multi
: Largest CodeGen models, requiring substantial VRAM (can be split across multiple GPUs).
The setup.sh
script provided by Fauxpilot helps in downloading these models (often from Hugging Face via user Moyix's GPT-J converted versions) and preparing them for FasterTransformer. While other models in GPT-J format might theoretically be adaptable, CodeGen is the officially supported and documented family.
Running Fauxpilot with CodeGen models requires significant hardware, particularly a capable NVIDIA GPU:
- GPU: An NVIDIA GPU with Compute Capability >= 6.0 is essential.
- VRAM: The amount of VRAM needed depends directly on the size of the CodeGen model you choose:
- 350M models: Might run on GPUs with ~6-8GB VRAM.
- 2B models: Typically require ~10-12GB VRAM or more.
- 6B models: Need substantial VRAM, often ~16-24GB. The GitHub documentation mentions that the 6B model needs about 13GB for FP16.
- 16B models: Require even more, often necessitating multiple GPUs to split the model. Fauxpilot supports splitting models across available GPUs.
- System RAM: At least 16GB, with 32GB or more recommended, especially for larger models or if running other applications alongside.
- CPU: A modern multi-core CPU.
- Storage: Sufficient disk space for Docker images, the Fauxpilot setup, downloaded model weights (which can be many GBs), and converted model files. An SSD is recommended.
- Other:
nvidia-docker
must be installed for Docker to access the GPU.
Setting up Fauxpilot involves preparing your system, downloading Fauxpilot, setting up the server with a chosen model, and then configuring your IDE client.
-
Prerequisites:
- Docker: Install Docker Engine.
- docker-compose: Version 1.28 or newer.
- NVIDIA GPU Drivers & CUDA: Ensure you have the latest NVIDIA drivers and a compatible CUDA toolkit version installed.
- nvidia-docker: Install the NVIDIA Container Toolkit to allow Docker containers to access NVIDIA GPUs.
- Utilities:
curl
and zstd
(for downloading and decompressing models).
-
Clone Fauxpilot Repository:
git clone [https://github.com/fauxpilot/fauxpilot.git](https://github.com/fauxpilot/fauxpilot.git)
cd fauxpilot
-
Run the Setup Script (setup.sh
):
- This interactive script will guide you through:
- Choosing a CodeGen model to download (e.g.,
codegen-2B-multi
).
- Downloading the selected model weights (from Hugging Face, often via Moyix's GPT-J conversions).
- Converting the downloaded model into the format required by FasterTransformer.
- Setting up the necessary configurations for Triton Inference Server.
- Execute the script:
./setup.sh
- Follow the prompts. This step can take a significant amount of time depending on the model size and your internet speed. The script will also show estimated VRAM requirements for the selected model.
-
Launch the Fauxpilot Server:
- Once the setup script completes successfully, you can start the Fauxpilot server using
docker-compose
:
docker-compose up -d
- This will start the Triton Inference Server with the configured CodeGen model. By default, the server usually listens on
http://localhost:5000
. You can check the logs using docker-compose logs -f fauxpilot
.
You need to configure your IDE to send code completion requests to your local Fauxpilot server.
1. VS Code:
- Using
vscode-fauxpilot
Extension (Recommended by some community members for Fauxpilot):
- Search for and install an extension named "Fauxpilot" (e.g., one by Venthe or similar ones that allow custom server URLs).
- Open VS Code settings (
settings.json
) and configure it to point to your local server:
"fauxpilot.enabled": true,
"fauxpilot.server": "http://localhost:5000/v1/engines", // Default for some fauxpilot extensions
// Or, if the extension expects an OpenAI-like base URL:
"fauxpilot.apiBase": "http://localhost:5000/v1",
"fauxpilot.model": "codegen" // Or the specific model name you set up
- Note: The exact settings might vary depending on the specific Fauxpilot client extension you find and use. Refer to the extension's documentation.
- Using the Official GitHub Copilot Extension (Advanced):
- As detailed in Fauxpilot's
documentation/client.md
, you can configure the official GitHub Copilot VS Code extension to override its default endpoints:
- Install the official GitHub Copilot extension.
- Open your
settings.json
file in VS Code.
- Add or modify the following settings:
"github.copilot.advanced": {
"debug.overrideEngine": "codegen", // Or the engine name you configured in Fauxpilot
"debug.testOverrideProxyUrl": "http://localhost:5000",
"debug.overrideProxyUrl": "http://localhost:5000"
}
- You might need to replace
vocab.bpe
and tokenizer.json
files in the GitHub Copilot extension's directory with those compatible with your CodeGen model (often provided within the Fauxpilot repository or linked by its documentation) for optimal performance. This is an advanced step and might break with Copilot extension updates.
2. Neovim, JetBrains IDEs, and other clients:
- Since Fauxpilot exposes an OpenAI API-compatible endpoint (e.g.,
http://localhost:5000/v1
), any IDE plugin or client that can be configured to use a custom OpenAI API base URL and a dummy API key should work.
- You would typically set:
- API Base URL:
http://localhost:5000/v1
- API Key: A dummy string (e.g., "dummy", "EMPTY") as Fauxpilot doesn't use actual authentication by default.
- Model Name: The name of the model you configured on the Fauxpilot server (e.g., "codegen").
- Look for OpenAI or Copilot-compatible plugins for your specific IDE and check their settings for custom endpoint configuration.
Once the server is running and your IDE client is configured:
- Fauxpilot should start providing code suggestions as you type, similar to GitHub Copilot.
- The quality and relevance of suggestions will depend on the chosen CodeGen model, the context provided from your code, and the specific programming language.
Fauxpilot is released under the MIT License, which is a permissive open-source license allowing for free use, modification, and distribution, including for commercial purposes, with minimal restrictions (primarily requiring preservation of copyright and license notices).
While specific, in-depth blog posts dedicated solely to Fauxpilot setup are less common than for mainstream tools, here are some relevant resources and types of articles that can help:
- Official Fauxpilot Documentation (Primary Source):
- Articles Discussing Fauxpilot and Self-Hosted AI Coding Assistants:
- Deepchecks - "What is FauxPilot? Features & Getting Started": Provides a good overview and context.
- BytePlus - "FauxPilot vs Self Hosted AI Coding Assistants": Discusses Fauxpilot in the landscape of self-hosted options.
- BytePlus - "Best free GitHub copilot alternatives for developers": Mentions Fauxpilot as an open-source, self-hostable alternative.
- Bito AI Blog - "10 Free GitHub Copilot Alternatives for VS Code 2025": Includes Fauxpilot, noting its use of Salesforce CodeGen and Docker setup.
- Projects Inspired by Fauxpilot (Potentially Useful for Context/Client Setup):
- TurboPilot (GitHub - ravenscroftj/turbopilot): Explicitly states it is "heavily based and inspired by on the fauxpilot project" and uses GGML for CPU execution. Its README might offer insights into client configurations that are also applicable to Fauxpilot.
- Tutorials on NVIDIA Triton and FasterTransformer: Understanding these underlying technologies can be helpful for advanced users or troubleshooting.
Several other open-source and commercial AI code assistants exist:
- GitHub Copilot: The leading commercial cloud-based solution.
- TabbyML: An open-source, self-hostable AI coding assistant.
- Codeium: Offers a free tier for individuals and self-hosting options for enterprises.
- Sourcegraph Cody: AI coding assistant with strong codebase context understanding.
- Refact.ai: Open-source with self-hosting and cloud options.
- Continue.dev: Open-source IDE extension to connect to various local and remote LLMs.
- LocalPilot / Various llama-cpp solutions: Projects enabling local LLM usage for code completion, often more lightweight but potentially less integrated than Fauxpilot's Triton-based approach.
- GitHub Issues: The primary place for reporting bugs, asking technical questions, and discussing development related to Fauxpilot.
- Community forums related to self-hosting, AI, and specific LLMs (like CodeGen) may also have discussions about Fauxpilot.
- Data Privacy: A major advantage of Fauxpilot is that your code remains within your local environment, enhancing data privacy compared to cloud-based services.
- Model Quality & Bias: The quality of code suggestions depends entirely on the open-source CodeGen model used. These models, while capable, may not be as advanced or frequently updated as the proprietary models powering services like GitHub Copilot. They may also reflect biases present in their training data.
- Resource Intensive: Requires significant GPU hardware for effective operation.
- Setup Complexity: The installation and configuration process can be complex, requiring familiarity with Docker, NVIDIA GPU drivers, and model management.
- Maintenance: As a self-hosted solution, you are responsible for maintaining the server, updating models (if desired), and troubleshooting issues.
- Security: You are responsible for securing your self-hosted Fauxpilot server environment.