Code generation, programming assistants
October 14, 2021 — February 25, 2025
Suspiciously similar content
A cousin to neural automata: writing machines to code for us, because code generation is fancy text generation, which involves similar technology, i.e. large language models.
There are two aspects to making this work: the model and the interface. Sometimes the two are combined, as in Cursor, which makes it hard to structure this page.
Terms to know:
MCP — Model Context Protocol
MCP is an open protocol that standardises how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standard way to connect your devices to various peripherals and accessories, MCP provides a standard way to connect AI models to different data sources and tools.
1 Security
So, the obvious important thing first. I am vaguely concerned about how much of the world uploads their source code to these code servers. The potential for abuse is huge.
Anyway, the arms race is real, so let’s all ignore that and upload all our code into their models, eh?
2 Clients
2.1 Github Copilot
GitHub Copilot uses suggestions from OpenAI Codex some GPT4 off-the-shelf thing now IIRC to suggest code completions. The original Codex engine was really good and I don’t think the general-purpose models have matched it.
Github Copilot has a great workflow for automatic completions, but the chat interface is janky and semi-reliable. It is bad at following instructions, messes up basic stuff like indentation and is not especially fast. Still a net positive, but not great; you can see why there are competitors in this space.
Behind a firewall, we need at least the following whitelist exceptions:
vscode-auth.github.com
api.github.com
copilot-proxy.githubusercontent.com
See Networked VS Code for more whitelist rules we need for VS Code.
2.2 Cursor
Cursor - The AI-first Code Editor
Cursor is an AI-powered code editor that helps you build software faster.
It is a VS Code fork with its own AI engine (“Copilot++”, cheeky) and some extra UI affordances.
2.3 Fauxpilot
FauxPilot: Like GitHub Copilot without Microsoft telemetry:
Updated GitHub Copilot, one of several recent tools for generating programming code suggestions with the help of AI models, remains problematic for some users due to licensing concerns and the telemetry the software sends back to the Microsoft-owned company.
fauxpilot/fauxpilot: FauxPilot - an open-source alternative to GitHub Copilot server
This is an attempt to build a locally hosted alternative to GitHub Copilot. It uses the SalesForce CodeGen models inside NVIDIA’s Triton Inference Server with the FasterTransformer backend.
Being able to work offline would be a real win; Copilot loves bandwidth too much.
2.4 Continue
For JetBrains and VS Code IDEs, Continue is a plugin that provides AI-powered code completions. Seems to support BYO model.
2.5 Cody
Cody supports the most powerful LLMs including Claude 3.5, GPT-4o, Gemini 1.5, and Mixtral-8x7B.
You can also bring your own LLM key with Amazon Bedrock and Azure OpenAI.
3 Models and serving them
3.1 Codeium
Codeium has been developed by the team at Exafunction to build on the industry-wide momentum on foundational models. We realised that the combination of recent advances in generative models and our world-class optimised deep learning serving software could provide users with top-quality AI-based products at the lowest possible costs (or ideally, for free!).
3.2 Codestral Mamba
Codestral Mamba | Mistral AI | Frontier AI in your hands
Following the publishing of the Mixtral family, Codestral Mamba is another step in our effort to study and provide new architectures. It is available for free use, modification, and distribution, and we hope it will open new perspectives in architecture research. Codestral Mamba was designed with help from Albert Gu and Tri Dao.
Unlike Transformer models, Mamba models offer linear time inference and can theoretically model sequences of any length. This efficiency is especially relevant for code productivity use cases—this is why we trained this model with advanced code and reasoning capabilities, enabling it to compete with state-of-the-art transformer-based models.
3.3 Ollama/LLaama coder
Two offline solutions that work well together:
Run Llama 3.1, Phi 3, Mistral, Gemma 2, and other models. Customise and create your own.
Llama Coder is a better and self-hosted Github Copilot replacement for VS Code. Llama Coder uses Ollama and CodeLlama to provide autocomplete that runs on your hardware. Works best with Mac M1/M2/M3 or with RTX 4090.
3.4 Amazon CodeWhisperer
AI Code Generator - Amazon CodeWhisperer - AWS
Available as part of the AWS Toolkit for Visual Studio (VS) Code and JetBrains, CodeWhisperer currently supports Python, Java, JavaScript, TypeScript, C#, Go, Rust, PHP, Ruby, Kotlin, C, C++, Shell scripting, SQL and Scala. In addition to VS Code and the JetBrains family of IDEs—including IntelliJ, PyCharm, GoLand, CLion, PhpStorm, RubyMine, Rider, WebStorm, and DataGrip—CodeWhisperer is also available for AWS Cloud9, AWS Lambda console, JupyterLab and Amazon SageMaker Studio.
Free for individual use.
3.5 Others
4 Pedagogy
Coding assistants are a great way to learn to code (if that is a thing that is still valuable to do?)
5 Incoming
openai/openai-cookbook: Examples and guides for using the OpenAI API
LMQL: Programming Large Language Models: “LMQL is a programming language for language model interaction.”
LMQL generalises natural language prompting, making it more expressive while remaining accessible. For this, LMQL builds on top of Python, allowing users to express natural language prompts that also contain code. The resulting queries can be directly executed on language models like OpenAI’s GPT models > Fixed answer templates and intermediate instructions allow the user to steer the LLM’s reasoning process.
Mitchell Hashimoto on the mysterious ease of ChatGPT plugins
Glean is a system for working with facts about source code. It is designed for collecting and storing detailed information about code structure, and providing access to the data to power tools and experiences from online IDE features to offline code analysis.
For example, Glean could answer all the questions you’d expect your IDE to answer, accurately and efficiently on a large-scale codebase. Things like:
- Where is the definition of this method?
- Where are all the callers of this function?
- Who inherits from this class?
- What are all the declarations in this file?