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
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.
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 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.
export SOCAITY_API_KEY="sk_..." 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.
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))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.
| Parameter | Type | Default | Description |
|---|---|---|---|
prompt | str | '' | Input prompt for the model. |
max_tokens | int | 2048 | Maximum number of tokens to generate in the response. |
temperature | float | 0.1 | Sampling temperature. Lower values produce more deterministic output; higher values produce more varied output. |
top_p | float | 1.0 | Nucleus sampling cutoff. Tokens are sampled from the smallest set whose cumulative probability exceeds top_p. |
presence_penalty | float | 0.0 | Penalty applied to tokens that have already appeared in the output. Positive values reduce repetition. |
frequency_penalty | float | 0.0 | Penalty proportional to how frequently a token has appeared. Positive values further discourage repeated tokens. |
Current pricing and the interactive playground live on socaity.ai.
Open deepseek-v3 on socaity.ai- Social Media Content Pipeline: end-to-end tutorial that uses deepseek_v3 for the script stage.
- flux-schnell: pair text generation with fast image output.
- Python SDK reference: full surface area, job lifecycle, and result handling.
- Job system: how predictions are queued, polled, and returned as Job objects.