Thanks to everyone who tried DeepSeek‑V4‑Flash‑0731 here! Want your own, always‑on copy? Deploy it yourself on Hugging Face Inference Endpoints, starting at $10/hr with autoscale‑to‑zero, so you only pay while it's actually running.
A 284B‑parameter mixture‑of‑experts language model, 6 of 256 experts active per token, with a built‑in speculative decoder ("DSpark") and a 1,048,576‑token context window (64K native, YaRN‑extended).
This is a free, public Hugging Face Inference Endpoint — an OpenAI‑compatible Chat Completions API. No Hugging Face token required.
curl https://q5dh1rfszfym23hj.us-east-2.aws.endpoints.huggingface.cloud/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/DeepSeek-V4-Flash-0731",
"messages": [{"role": "user", "content": "Write a haiku about sparse attention."}],
"reasoning_effort": "high",
"temperature": 1.0,
"top_p": 0.95
}'
from openai import OpenAI
client = OpenAI(
base_url="https://q5dh1rfszfym23hj.us-east-2.aws.endpoints.huggingface.cloud/v1",
api_key="not-needed", # public endpoint — any non-empty string works
)
resp = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash-0731",
messages=[{"role": "user", "content": "Explain DSpark speculative decoding in 3 sentences."}],
extra_body={"reasoning_effort": "max"}, # low (default) · high · max
)
print(resp.choices[0].message.content)
Thinking is controlled by reasoning_effort: omit it for fast non‑reasoning replies, set it to make the model think. Note: on this deployment (vLLM v0.26.0), low and high behave identically — only max adds an extra maximum‑effort directive.
| value | behaviour |
|---|---|
| (omitted) | No reasoning — fastest replies. |
"low" / "high" | Thinking mode on (equivalent on this deployment). |
"max" | Thinking plus a maximum‑effort directive — slowest, most thorough. |
This deployment serves up to 393,216 tokens of context (the documented floor for high/max effort) — a slice of the model's native 1,048,576‑token window.
Internally the model emits a DeepSeek‑specific markup ("DSML") for tool calls, but the endpoint's built‑in parser translates it to standard OpenAI tools / tool_calls JSON — use it exactly like any other OpenAI‑style function‑calling model.
{
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"parameters": {"type": "object", "properties": {"location": {"type": "string"}}}
}
}],
"tool_choice": "auto"
}
Shared, free, and rate‑limited to be fair to everyone: about 20 requests in a burst, refilling to roughly 12 requests/minute, per IP address. Parallel agent tool‑calls are fine — hammering it from a script is not. Over the limit, you'll get a 429 with a friendly note and a Retry‑After header.
There's a full chat-ui front end running on this same endpoint — reasoning effort and artifacts both switched on.
pi reads custom model providers from ~/.pi/agent/models.json. Add a provider entry pointing at this endpoint's OpenAI‑compatible base URL, then select it from the CLI.
{
"providers": {
"hf-dsv4": {
"name": "DeepSeek V4 Flash 0731 (HF public)",
"baseUrl": "https://q5dh1rfszfym23hj.us-east-2.aws.endpoints.huggingface.cloud/v1",
"api": "openai-completions",
"apiKey": "not-needed",
"compat": {
"supportsReasoningEffort": true,
"maxTokensField": "max_tokens",
"thinkingFormat": "deepseek",
"requiresReasoningContentOnAssistantMessages": true
},
"models": [{
"id": "deepseek-ai/DeepSeek-V4-Flash-0731",
"name": "DeepSeek V4 Flash 0731",
"reasoning": true,
"thinkingLevelMap": {
"off": null,
"minimal": "low",
"low": "low",
"medium": "high",
"high": "high",
"xhigh": "max",
"max": "max"
},
"input": ["text"],
"contextWindow": 393216,
"maxTokens": 393216,
"cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
}]
}
}
}
Then run it — no restart needed, pi picks up models.json on launch:
# interactive, thinking level "high" pi --provider hf-dsv4 --model deepseek-ai/DeepSeek-V4-Flash-0731 --thinking high # one-shot, non-interactive pi -p --no-session --provider hf-dsv4 \ --model deepseek-ai/DeepSeek-V4-Flash-0731 --thinking max \ "Summarize how DSpark speculative decoding works." # add it to your Ctrl+P model cycle alongside others pi --models "hf-dsv4/*,sonnet,haiku"
Same shape works for any OpenAI‑compatible server — swap baseUrl for a local vllm serve or llama.cpp instance and keep the rest.
This whole thing — 4×H200, vLLM, autoscaling, the works — is one deploy form on Inference Endpoints: dedicated, production-grade deployments of any model on the Hub.
Pick a model, pick your hardware (CPU to multi-GPU H200), and get an OpenAI-compatible URL with autoscaling, scale-to-zero, and per-minute billing. No shared queues, no rate limits from strangers — your model, your GPUs.