速度测试
DeepSeek-V4.1-Flash-1017-NVFP4
RTX PRO 6000 Blackwell Max-Q Workstation Edition 96GB ×4 · vllm · v0.1.dev21836+g6d66eed35 · NVFP4
解码
399tok/s
预填充
15.9ktok/s
首个 token 延迟
169ms
总计
891tok/s
峰值 VRAM
—
上下文长度
1024K
KV 深度
0
批大小
1
并发数
1
功耗
—
验证
未验证 — 实验性结果
已验证的运行使用标准测试提示词,并记录足够的数据以核对结果。
- The run did not use one of the standard test prompts.
启动命令
BRRR_FUSED_DECODER=0 vllm serve nvidia/DeepSeek-V4.1-Flash-1017-NVFP4 --served-model-name nvfp4-1017 --host 0.0.0.0 --port 8641 --tensor-parallel-size 4 --gpu-memory-utilization 0.96 --max-model-len 1048576 --max-num-seqs 16 --reasoning-parser deepseek_v41 --enable-auto-tool-choice --tool-call-parser deepseek_v41 --max-num-batched-tokens 4096 --attention-backend B12X --moe-backend b12x --kv-cache-dtype fp8 --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false,"attention_backend":"B12X","moe_backend":"b12x"}' --override-generation-config '{"temperature":1.0,"top_p":1.0}' --tokenizer-mode deepseek_v41 --mm-processor-cache-gb 1 --linear-backend b12x --engram-config '{"projection_tp":true}' --block-size 256 --swa-block-size 128 --compilation-config '{"cudagraph_mode":"FULL_AND_PIECEWISE"}' --max-cudagraph-capture-size 128 --async-scheduling --enable-scale-out --enable-prompt-tokens-details --default-chat-template-kwargs '{"thinking":false}'Theoretical memory ceiling
296.9–298.2 tok/s
7,168 GB/s memory bandwidth (spec sheet) · 381.50 GB model weights · 8-bit KV cache · 1–2,676 tokens of context
Includes speculative decoding: 4.74 tokens accepted per model step on average (62.6–62.9 steps/s) · measured 84.1 steps/s
134–134%
of the ceiling reached
Medium confidenceThe fastest this hardware's memory could serve a single request; real runs are slower. Model details from nvidia/DeepSeek-V4.1-Flash-1017-NVFP4; size from NVFP4 estimate. Hardware source · Open calculator
模型
- GPU
- RTX PRO 6000 Blackwell Max-Q Workstation Edition
- 数量
- 4
- VRAM
- 96 GB
- OS
- Ubuntu 26.04.1 LTS
引擎
- 引擎
- vllm
- 版本
- 0.1.dev21836+g6d66eed35
- Build
- PureTensor patch (NVFP4 routed-expert dispatch to b12x W4A4 + BRRR_FUSED_DECODER=0) on fraserprice/DeepSeek-4.1-Flash-1017-BRRR@0bc4dbd0 on ghcr.io/local-inference-lab/vllm@sha256:376745af9ebffe0ecb3a9b7ee3d2040027834e58e3248898e52487255f33125a
- Commit
- 6d66eed35
- 量化
- NVFP4
- 后端
- cuda
- TP
- 4
- KV 缓存
- fp8
- GPU mem util
- 0.96
- 前缀缓存
- 是
- 分块预填
- 是
- 预填块
- 4096
- 最大运行序列数
- 16
- Attn
- B12X
- Spec decode
- 已启用
运行配置
- 上下文
- 1,048,576 个 token
- 深度
- 0 个 token
- 批量大小
- 1
- 提示词 token
- 2676
- 预填 tok/s
- 15.9K tok/s
- 输出 token
- 2048
- 修订版本
- 480550d3
- 备注
- PureTensor lab, tensor-core: 4x RTX PRO 6000 Blackwell Max-Q (325 W) on PCIe 5.0 x16, Threadripper PRO 9975WX, 512 GB DDR5. Host P2P settings (amd_iommu=off iommu=off, NVIDIA P2P registry keys). CPU in a performance window (boost on, performance governor, C2 off). Measured 2026-10-31 in a same-day A/B against nvidia/DeepSeek-V4.1-Flash-1017-NVFP4. nvidia/DeepSeek-V4.1-Flash-1017-NVFP4 (ModelOpt: routed experts NVFP4 W4A4, Engram MXFP4). Stock vLLM images cannot load it (needs vLLM PR #61530); served on the BRRR image with a small patch routing the 40 NVFP4 expert layers to b12x's native NVFP4 MoE (W4A4), MTP/DSpark draft experts left MXFP4 as shipped, and BRRR's fused decoder off (it requires the MXFP4 w4a8_mx layout). Engram MXFP4 tables expanded losslessly to FP8 (E2M1 values exact in E4M3, UE8M0 scales unchanged) so the FP8 NVMe Engram path serves NVIDIA's exact values. DSpark K7, adaptive verification OFF (fixed K). Same-engine source-weights control: code-v1 464 tok/s; production fused seat 581. Thinking off. Batch 1, temperature 0, streamed; median of 5 runs after 2 warmup(s). 433 verify steps, 4.74 tokens/step, 11.9 ms/step.
推测解码
- 方法
- dspark
- 每步接受数
- 4.74 个 token
- 接受率
- 53%
- 草稿 token
- 3,031
- 已接受 token
- 1,620
已记录的证据
- 提示词哈希(SHA-256)
- 5a6b7bc1cbbc…
提示词样本 · 2,000 chars
[LocalMaxxing cache-bust nonce: 75bb82d35cefa61e81462a28a59f8ba7]
I have a FastAPI service that receives webhook events from a payment provider and stores them in Postgres with asyncpg. The current handler:
```python
@app.post("/webhooks/payments")
async def payments_webhook(request: Request) -> dict[str, str]:
payload = await request.json()
if payload["type"] == "invoice.paid":
await pool.execute(
"INSERT INTO invoices (id, amount) VALUES ($1, $2)",
payload["data"]["id"], payload["data"]["amount"],
)
return {"status": "ok"}
```
Problems: the `X-Signature` header is never verified, retried deliveries insert the same invoice twice, and any exception returns a 500 so the provider retries forever.
Rewrite this as a proper module: verify the signature with HMAC-SHA256 over the raw body and reject stale timestamps, make inserts idempotent on the event id, dispatch event types through a registry instead of if-chains, and return 2xx for event types we don't handle. Use pydantic models, full type hints, and no bare except. Include the SQL for the idempotency table and a pytest test for the signature check, then list the failure modes you would alert on.
I have a FastAPI service that receives webhook events from a payment provider and stores them in Postgres with asyncpg. The current handler:
```python
@app.post("/webhooks/payments")
async def payments_webhook(request: Request) -> dict[str, str]:
payload = await request.json()
if payload["type"] == "invoice.paid":
await pool.execute(
"INSERT INTO invoices (id, amount) VALUES ($1, $2)",
payload["data"]["id"], payload["data"]["amount"],
)
return {"status": "ok"}
```
Problems: the `X-Signature` header is never verified, retried deliveries insert the same invoice twice, and any exception returns a 500 so the provider retries forever.
Rewrite this as a proper module: verify the signature with HMAC-SHA256 over the raw bod输出样本 · 4,000 chars
# Webhook Handler Rewrite
Below is a complete module. It's split into `webhooks/` package: `models.py`, `signature.py`, `registry.py`, `handler.py`, plus SQL and tests.
---
## `webhooks/models.py`
```python
from __future__ import annotations
from datetime import datetime
from typing import Any, Literal
from pydantic import BaseModel, ConfigDict, Field
class InvoicePaidData(BaseModel):
model_config = ConfigDict(frozen=True)
id: str
amount: int = Field(ge=0)
class WebhookEvent(BaseModel):
"""Envelope common to all provider events."""
model_config = ConfigDict(frozen=True)
id: str # provider event id — idempotency key
type: str
created_at: datetime # provider-side event creation time
data: dict[str, Any]
class InvoicePaidEvent(WebhookEvent):
type: Literal["invoice.paid"] = "invoice.paid"
data: InvoicePaidData
```
---
## `webhooks/signature.py`
```python
from __future__ import annotations
import hashlib
import hmac
import time
from datetime import datetime, timezone
# Reject events whose provider timestamp is older than this.
MAX_EVENT_AGE_SECONDS = 300
# Allow small clock skew into the future.
MAX_EVENT_FUTURE_SKEW_SECONDS = 60
class SignatureError(Exception):
"""Raised when a webhook signature or timestamp is invalid."""
def compute_signature(secret: bytes, raw_body: bytes) -> str:
return hmac.new(secret, raw_body, hashlib.sha256).hexdigest()
def verify_signature(
secret: bytes,
raw_body: bytes,
header_signature: str | None,
) -> None:
if not header_signature:
raise SignatureError("missing X-Signature header")
expected = compute_signature(secret, raw_body)
# Constant-time compare; header may carry a prefix like "sha256=".
provided = header_signature.removeprefix("sha256=").lower()
if not hmac.compare_digest(expected, provided):
raise SignatureError("signature mismatch")
def verify_timestamp(
event_created_at: datetime,
*,
now: datetime | None = None,
) -> None:
now = now or datetime.now(timezone.utc)
age = (now - event_created_at).total_seconds()
if age > MAX_EVENT_AGE_SECONDS:
raise SignatureError(f"stale event: {age:.0f}s old")
if age < -MAX_EVENT_FUTURE_SKEW_SECONDS:
raise SignatureError(f"event timestamp in the future: {-age:.0f}s")
```
---
## `webhooks/registry.py`
```python
from __future__ import annotations
from collections.abc import Awaitable, Callable
from typing import TypeAlias
import asyncpg
from .models import InvoicePaidEvent, WebhookEvent
Handler: TypeAlias = Callable[[asyncpg.Pool, WebhookEvent], Awaitable[None]]
async def _handle_invoice_paid(pool: asyncpg.Pool, event: WebhookEvent) -> None:
parsed = InvoicePaidEvent.model_validate(event.model_dump())
await pool.execute(
"INSERT INTO invoices (id, amount) VALUES ($1, $2)",
parsed.data.id,
parsed.data.amount,
)
# Event type -> handler. Unknown types simply aren't in the map.
HANDLERS: dict[str, Handler] = {
"invoice.paid": _handle_invoice_paid,
}
```
---
## `webhooks/handler.py`
```python
from __future__ import annotations
import logging
from typing import Final
import asyncpg
from fastapi import APIRouter, Request, Response
from fastapi.responses import JSONResponse
from pydantic import ValidationError
from .models import WebhookEvent
from .registry import HANDLERS
from .signature import SignatureError, verify_signature, verify_timestamp
logger: Final = logging.getLogger(__name__)
router = APIRouter()
@router.post("/webhooks/payments")
async def payments_webhook(request: Request) -> Response:
raw_body: bytes = await request.body()
# 1. Authenticate before parsing anything.
try:
verify_signature(
secret=request.app.state.webhook_secret,
raw_body=raw_body,
header_signature=request.headers.get("X-Signature"),
)
except SignatureError as e该模型在此硬件上的更多运行
- 400tok/svllm · v0.1.dev21836+g6d66eed35 · NVFP4上下文 1024K · 深度 0 · 批大小 1已验证运行puretensor · 2026年10月31日
- 325tok/svllm · v0.1.dev21836+g6d66eed35 · NVFP4上下文 1024K · 深度 0 · 批大小 1已验证运行puretensor · 2026年10月31日
- 260tok/svllm · v0.1.dev21836+g6d66eed35 · NVFP4上下文 1024K · 深度 0 · 批大小 1已验证运行puretensor · 2026年10月31日
- 227tok/svllm · v0.1.dev21836+g6d66eed35 · NVFP4上下文 1024K · 深度 0 · 批大小 1已验证运行puretensor · 2026年10月31日
