AI Pair Programming with Replit

Ghostwriter is a cutting-edge AI pair programmer developed by Replit. Its primary objective is to streamline the coding process, enhancing developers’ productivity and enabling them to swiftly implement their creative ideas.

Key Features:

  • Code Enhancement:
    • Autocompletion and Suggestions: Ghostwriter leverages AI to autocomplete code, suggest code blocks, and provide clear explanations.
    • Code Transformation: The tool can refactor and transform code with ease.
    • File and Function Generation: Ghostwriter can spontaneously create functions and files.
    • Website Styling: Beyond just code, Ghostwriter can assist in website design, generating feature ideas and suggesting novel coding techniques.
  • Pair Programming Experience:
    • Ghostwriter Chat: This feature allows for pair programming, but instead of a human counterpart, you’re collaborating with an AI, infused with the collective coding knowledge of humanity.
    • Real-Time Collaboration: Ghostwriter provides real-time AI assistance, likened to collaborating in multiplayer mode, but with AI.

Optimized for Speed: 

  • Ghostwriter boasts an impressive average response time of 500ms, ensuring developers stay in their creative flow.
  • Broad Compatibility: The platform supports multiple languages including Python, Ruby, JavaScript, TypeScript, HTML, CSS, Go, Lisp, Haskell, Bash, C, C++, Rust, Java, and JSON.
  • Intuitive Search Utility: Ghostwriter integrates an in-editor search utility that enables users to find and incorporate open-source code directly, akin to having Stackoverflow within your IDE.

AI Complete Code: 

Termed as the flagship feature, Ghostwriter’s AI-powered pair programmer, “Complete Code”, facilitates code completion in real time. It’s designed to be efficient, making coding on mobile platforms not just feasible but enjoyable.

Technical Advancements: 

Ghostwriter’s rapid performance is rooted in its integration with open-source Large Language Models (LLMs) like Salesforce’s CodeGen models. To ensure swift responses:

  • FasterTransformer + Triton Server: Ghostwriter converted CodeGen checkpoints to FasterTransformer to leverage their highly optimized decoder blocks. Additionally, Nvidia’s Triton inference server is employed for speed and scalability.
  • Distillation: Ghostwriter distilled the CodeGen model to a faster, lightweight student model with fewer parameters, ensuring efficiency at scale.
  • Quantization: The platform is exploring post-training quantization to further optimize latency.

Future Directions: 

  • Ghostwriter’s evolution includes:
  • Training on additional open-source datasets.
  • Incorporating Deep Reinforcement Learning.
  • Using operational transformation edits from Replit’s IDE to capture authentic cursor movements and code edits, aiming to make LLMs function more like a pair programmer.

Editor Implementation: 

  • Ensuring the right user experience is crucial. Challenges include:
  • Whitespace and brace matching to avoid redundancy in code suggestions.


Ghostwriter, with its AI-driven capabilities, is redefining the future of coding. Developers globally trust it for its accuracy and speed, and its potential to change software creation. With continuous improvements and its vast array of features, Ghostwriter is set to remain a pivotal tool for developers worldwide.

Leave a Comment