How to Use deepseek coder on Cursor

How to Use deepseek coder on Cursor

Aug 19, 2024

By

Tatsuya

Cursor (https://www.cursor.com/) is currently generating significant buzz in the tech community, rapidly becoming one of the most popular IDEs available. This blog post explores why you should consider integrating DeepSeek with Cursor and provides a step-by-step guide on how to do so effectively.

Why deepseek?

DeepSeek-Coder-V2 is an open-source Mixture-of-Experts (MoE) code language model that delivers performance on par with GPT-4 Turbo for code-specific tasks. It offers this capability at a fraction of the cost—just one-tenth of the GPT-4 Turbo's price. Moreover, when utilizing disk cache, it becomes even more cost-effective, reducing expenses by an additional factor of ten.

Getting started

  1. Install Cursor

Skip this step if you already install the cursor

If you haven't already installed Cursor, visit https://www.cursor.com/ and click "Download". Unzip the downloaded file and run the installer to complete the installation.

  1. Set up ModelBox and obtain your API Key

Go to https://model.box/ and sign in. If you haven't already, deposit funds into your account.

ModelBox is under public beta. Here are some invite codes to try:

  • CDFQIUES

  • JHFEY4B4

  • J0SI828Q

  • GFZU87TB

  • PKWETCJT

Navigate to the API Keys section and click "Create" to generate your API key.

Important: Your API key will only be displayed once, so make sure to save it securely. You'll need this key for Cursor in the following steps.

  1. Open Cursor and configure deepseek

Open cursor settings in Settings > Cursor Settings,

Begin by opening the models section and clicking "Add model" (circle 2). Enter "deepseek/deepseek-coder" and enable the model (circle 3).

Next, click "Override OpenAI Base URL" to configure the ModelBox OpenAI-compatible API endpoint, https://api.model.box/v1 (circle 5). Then, enter the API key you obtained from ModelBox in the designated field (circle 6).

After enabling the OpenAI API Key by toggling the switch, you can verify your access to Deepseek in Cursor by clicking the "Verify" button. This process ensures proper setup and connectivity to the Deepseek model within the Cursor environment.

Starting using Cursor with deepseek-coder

You can now utilize deepseek-coder in Cursor. For example, use Command+K to toggle completion or simply press the Tab key to navigate through suggestions.

Analyze your token usage in ModelBox

After setting up DeepSeek with Cursor, you can access your ModelBox Analytics dashboard to monitor your token usage. Additionally, you can visit the History tab to view detailed request information, including prompts, latency, cache status, and more.

About deepseek-coder

DeepSeek-Coder-V2, an open-source Mixture-of-Experts (MoE) code language model that achieves performance comparable to GPT4-Turbo in code-specific tasks. Specifically, DeepSeek-Coder-V2 is further pre-trained from an intermediate checkpoint of DeepSeek-V2 with additional 6 trillion tokens. Through this continued pre-training, DeepSeek-Coder-V2 substantially enhances the coding and mathematical reasoning capabilities of DeepSeek-V2, while maintaining comparable performance in general language tasks. Compared to DeepSeek-Coder-33B, DeepSeek-Coder-V2 demonstrates significant advancements in various aspects of code-related tasks, as well as reasoning and general capabilities. Additionally, DeepSeek-Coder-V2 expands its support for programming languages from 86 to 338, while extending the context length from 16K to 128K.

About Cursor

Cursor is the AI code editor aiming to make users extraordinarily productive.

Here are some key features and aspects of Cursor:

  1. AI assistance: Cursor integrates AI capabilities to help developers write, understand, and debug code more efficiently.

  2. Code completion: The platform offers advanced code completion suggestions, helping developers write code faster and with fewer errors.

  3. Natural language processing: Users can describe what they want to do in plain English, and Cursor will attempt to generate the corresponding code.

  4. Code explanation: Cursor can provide explanations for complex code snippets, making it easier for developers to understand unfamiliar codebases.

  5. Debugging support: The AI can assist in identifying and fixing bugs in the code.

  6. Multi-language support: Cursor works with various programming languages, making it versatile for different types of projects.

  7. GitHub integration: The platform integrates with GitHub, allowing for seamless version control and collaboration.

  8. Performance: Cursor is designed to be fast and responsive, even when working with large codebases.

  9. User interface: It features a clean, modern interface that aims to maximize productivity.

  10. Continuous updates: As an AI-powered tool, Cursor is regularly updated to improve its capabilities and features.


Ship with ModelBox

Ship with ModelBox

Ship with ModelBox

Build, analyze and optimize your LLM workflow with magic power of ModelBox

Build, analyze and optimize your LLM workflow with magic power of ModelBox

Build, analyze and optimize your LLM workflow with magic power of ModelBox