Skip to content
LLM
replicate

deepseek-v3

deepseek_v3 runs DeepSeek V3 on Socaity, routed through Replicate. Use it for math problems, code generation, and step-by-step problem solving. The class exposes a single predictions(...) method, also callable as model.run(...) or model(...).

by deepseek-ai · socaity.sdk.replicate.deepseek_ai.deepseek_v3

What it does

deepseek_v3 takes a prompt and returns a text completion. Defaults from the SDK class are temperature=0.1, max_tokens=2048, and top_p=1.0. The low default temperature already favours deterministic answers on math and code. Raise it for more varied output. Raise max_tokens when you need long step-by-step derivations. deepseek-v3 is a strong general-purpose instruction model. If you want a model tuned specifically for reasoning, reach for the sibling deepseek_r1 in the catalog.

Install

bash
pip install socaity

# Authenticate the CLI once (opens a browser). socaity install uses your
# stored login, not SOCAITY_API_KEY. Then generate the deepseek-v3 stub:
socaity login
socaity install deepseek-ai/deepseek-v3

Authentication

deepseek-v3 is routed through the Socaity backend, which makes the upstream Replicate call for you. Set SOCAITY_API_KEY in your environment. You do not need a Replicate key. Get a Socaity key at socaity.ai/account/secrets.

bash
export SOCAITY_API_KEY="sk_..."

Quick start

Send a math prompt at a low temperature for a deterministic derivation. .get_result() blocks until the job finishes and returns the model's output as a list of streamed chunks; join them into the full string with "".join(str(c) for c in chunks). On timeout it returns None instead of raising.

python
import os
from socaity.sdk.replicate.deepseek_ai import deepseek_v3

# Pass your Socaity key explicitly when you construct the model.
model = deepseek_v3(api_key=os.getenv("SOCAITY_API_KEY"))

# The default temperature=0.1 is already tuned for deterministic math/code.
# Raise max_tokens above the 2048 default for long step-by-step derivations.
chunks = model.predictions(
    prompt="Prove that the square root of 2 is irrational. Show your reasoning step by step.",
    temperature=0.1,
    max_tokens=4096,
).get_result()

# get_result() returns a list of streamed chunks; coerce and join into one string.
print("".join(str(chunk) for chunk in chunks))

Methods

predictions(top_p=1.0, prompt='', max_tokens=2048, temperature=0.1, presence_penalty=0.0, frequency_penalty=0.0, **kwargs)

Run a completion against deepseek_v3. Returns a Job object; .get_result() yields a list of streamed text chunks (join them). Also available as model.run(...) and model(...); both call the same endpoint.

ParameterTypeDefaultDescription
promptstr''Input prompt for the model.
max_tokensint2048Maximum number of tokens to generate in the response.
temperaturefloat0.1Sampling temperature. Lower values produce more deterministic output; higher values produce more varied output.
top_pfloat1.0Nucleus sampling cutoff. Tokens are sampled from the smallest set whose cumulative probability exceeds top_p.
presence_penaltyfloat0.0Penalty applied to tokens that have already appeared in the output. Positive values reduce repetition.
frequency_penaltyfloat0.0Penalty proportional to how frequently a token has appeared. Positive values further discourage repeated tokens.

Pricing & live playground

Current pricing and the interactive playground live on socaity.ai.

Open deepseek-v3 on socaity.ai

Next steps