Use the DeepSeek-R1 Model with your Modus app
DeepSeek-R1
is an open source AI reasoning model that rivals the performance
of frontier models such as OpenAI’s o1 in complex reasoning tasks like math and
coding. Benefits of DeepSeek include:
DeepSeek-R1
achieves comparable results to OpenAI’s o1
model on several benchmarks.DeepSeek-R1
model in your Modus app.
DeepSeek-R1
in your Modus app:
DeepSeek-R1
model hosted by Hypermode
Hypermode hosts and makes available the distilled DeepSeek model based on
Llama-3.1-8B
enabling Modus apps to use it in both local development
environments and deployed apps.
DeepSeek-R1-Distill-Llama-8B
DeepSeek model is available on
Hypermode’s Model Router. This means that we can invoke this
model in a Modus app in both a local development environment and also in an app
deployed on Hypermode.
The DeepSeek-R1-Distill-Llama-8B
model is a distilled version of the
DeepSeek-R1 model which has been fine-tuned using the Llama-3.1-8B
model as a
base model, using samples generated by DeepSeek-R1.
Distilled models offer similar high reasoning capabilities with fewer
parameters.
Create a Modus app
Add the DeepSeek model to your app manifest
modus.json
file to specify the
DeepSeek-R1-Distill-Llama-8B
model hosted on Hypermode.deepseek-reasoner
in our app manifest, which we
use to access the model in our Modus function.Use the Hyp CLI to sign in to Hypermode
hyp
CLI to log in to Hypermode.Install the hyp
CLI if not previously installed.Write a function to invoke the model
temperature
parameter in the range of 0.5-0.7Run your Modus app
Query your function in the Modus API Explorer
http://localhost:8686/explorer
.Add your prompt as an input argument for the generateText
query field and
select “Run” to invoke the DeepSeek model.\boxed{}.
”Create a DeepSeek API key
Create a Modus app
Define the model and connection in your app manifest
modus.json
app manifest file to include the DeepSeek
model and a connection for the DeepSeek Platform API. Use deepseek-reasoner
as
the value for sourceModel
for the DeepSeek-R1 reasoning model and
deepseek-chat
for the DeepSeek-V3 model.{{API_TOKEN}}
secret placeholder with your MODUS_DEEPSEEK_API_TOKEN
environment variable value.Set this environment variable value in the next step.Create environment variable for your API token
.env.dev.local
file to declare an environment variable for your DeepSeek Platform API key.MODUS
and
your connection’s name from the app manifest. For more details on using secrets
in Modus, refer to
working locally with secrets.Write a function to invoke the DeepSeek model
temperature
parameter in the range of 0.5-0.7Run your Modus app
Query using the Modus API Explorer
http://localhost:8686/explorer
.Add your prompt as an input argument for the generateText
query field and
select “Run” to invoke the DeepSeek model.\boxed{}.
”