DeepSeek-R1 a model trained via large-scale reinforcement learning (RL) without supervised fine-tuning (SFT) as a preliminary step, demonstrated remarkable performance on reasoning. With RL, DeepSeek-R1-Zero naturally emerged with numerous powerful and interesting reasoning behaviors. However, DeepSeek-R1-Zero encounters challenges such as endless repetition, poor readability, and language mixing. To address these issues and further enhance reasoning performance, we introduce DeepSeek-R1, which incorporates cold-start data before RL. DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks.
Using DeepSeek-R1 model with clarifai
Export your PAT as an environment variable. Then, import and initialize the API Client.
export CLARIFAI_PAT={your personal access token}
Deployment for DeepSeek-R1
In-order to effectively use the DeepSeek-R1 model, Please use the dedicated nodepool for faster response.
Select a g6e.12xlarge instance nodepool which has 4x NVIDIA-L40S GPUs.
Refer to this guide for creating nodepools and clusters in your account.
Running the API with Clarifai's Python SDK
# Please run `pip install -U clarifai` before running this script
from clarifai.client import Model
from clarifai_grpc.grpc.api.status import status_code_pb2
model = Model(url="https://clarifai.com/deepseek-ai/deepseek-chat/models/DeepSeek-R1")
prompt = "What’s the future of AI?"
params={
"temperature":0.9,
"max_tokens":100
}
results = model.generate_by_bytes(prompt.encode("utf-8"),
input_type="text",
deployment_id="YOUR_DEPLOYMENT_ID",
user_id='USER_ID',
inference_params=params)
for res in results:
if res.status.code == status_code_pb2.SUCCESS:
print(res.outputs[0].data.text.raw, end='', flush=True)