Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeepSeek guide #84

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
"modus/error-handling"
]
},
{
"group": "How-To Guides",
"pages": ["modus/deepseek-model"]
},
{
"group": "API Reference",
"pages": [
Expand Down
67 changes: 67 additions & 0 deletions modus/deepseek-model.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Using DeepSeek
description: "Use the DeepSeek Models with your Modus app"
mode: "wide"
"og:title": "Using DeepSeek - Modus"
---

DeepSeek is an AI lab that has developed and released a series of open source
LLMs that are notable for both their performance and cost-efficiency. By using a
Mixture-of-Experts (MoE) system that utilizes only 37 billion of the models' 671
billion parameters for any task, the DeepSeek-R1 model is able to achieve best
in class performance at a fraction of cost of inference on other comparable
models. In this guide we review how to leverage the DeepSeek models using Modus.

## Options for using DeepSeek with Modus

There are two options for invoking DeepSeek models in your Modus app:

1. [Use the distilled DeepSeek model hosted by Hypermode](#using-the-distilled-deepseek-model-hosted-by-Hypermode)

Check notice on line 19 in modus/deepseek-model.mdx

View check run for this annotation

Trunk.io / Trunk Check

markdownlint(MD051)

[new] Link fragments should be valid
Hypermode hosts and makes available the distilled DeepSeek model which can be
used by Modus apps developed locally and deployed to Hypermode
2. [Use the DeepSeek API with your Modus app](#using-the-deepseek-api-with-modus)
Access DeepSeek models hosted on the DeepSeek platform by configuring a
DeepSeek connection in your Modus app and using your DeepSeek API key

## Using the distilled DeepSeek model hosted by Hypermode

TODO: explain what a distilled model is

```json modus.json
"deepseek-r1-distill": {
"sourceModel": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
"provider": "hugging-face",
"connection": "hypermode"
}
```

## Using the DeepSeek API with Modus

```json modus.json
{
"$schema": "https://schema.hypermode.com/modus.json",
"endpoints": {
"default": {
"type": "graphql",
"path": "/graphql",
"auth": "bearer-token"
}
},
"models": {
"deepseek-chat": {
"sourceModel": "deepseek-chat",
"connection": "deepseek",
"path": "v1/chat/completions"
}
},
"connections": {
"deepseek": {
"type": "http",
"baseUrl": "https://api.deepseek.com/",
"headers": {
"Authorization": "Bearer {{API_TOKEN}}"
}
}
}
}
```
Loading