速度測試
Nanbeige4.3-33B-FP8
RTX PRO 6000 Blackwell Max-Q Workstation Edition 96GB · sglang · v0.5.21 · FP8
puretensor已驗證2026年11月2日
解碼
68.3tok/s
預填
6.2ktok/s
首個 token 延遲
472ms
總計
255tok/s
峰值 VRAM
—
上下文長度
2K
KV 深度
0
批次大小
1
並行數
1
功耗
—
驗證
未驗證 — 實驗性結果
已驗證的執行使用標準測試提示詞,並記錄足夠的資料以核對結果。
- The run did not use one of the standard test prompts.
啟動命令
docker run -d --name maxxloop-tc2 --gpus '"device=2"' --ipc=host --shm-size 32g -p 127.0.0.1:8672:30000 -v /mnt/storage/models/hf:/models:ro -v /mnt/storage/maxxloop/cache-tc2-sgl:/root/.cache lmsysorg/sglang:v0.5.21-cu130 python3 -m sglang.launch_server --model-path /models/Nanbeige__Nanbeige4.3-33B-FP8 --served-model-name nanbeige43-33b --host 0.0.0.0 --port 30000 --trust-remote-code --enable-metrics --context-length 16384 --mem-fraction-static 0.88 --max-running-requests 1 --chunked-prefill-size 2048 --attention-backend flashinfer --kv-cache-dtype bfloat16 --disable-radix-cache --speculative-algorithm DFLASH --speculative-draft-model-path /models/ProCreations__Nanbeige4.3-33B-DFlash2 --speculative-draft-attention-backend flashinfer --speculative-draft-kv-cache-dtype bfloat16 --speculative-num-draft-tokens 8
Theoretical memory ceiling
53.6–54.3 tok/s
1,792 GB/s memory bandwidth (spec sheet) · 33.00 GB model weights · 16-bit KV cache · 1–2,048 tokens of context
126–127%
of the ceiling reached
Medium confidenceThe fastest this hardware's memory could serve a single request; real runs are slower. Model details from Nanbeige/Nanbeige4.3-33B-FP8; size from FP8 estimate. Hardware source · Open calculator
模型
- GPU
- RTX PRO 6000 Blackwell Max-Q Workstation Edition
- 數量
- 1
- VRAM
- 96 GB
- OS
- Ubuntu 26.04.1 LTS
引擎
- 引擎
- sglang
- 版本
- 0.5.21
- Build
- lmsysorg/sglang@sha256:b1259f3ea3275f66237c498ea388919729018bc9f01c3d638391e06e2cf3f469
- 量化
- FP8
- 後端
- cuda
- TP
- 1
- KV 快取
- bfloat16
- GPU mem util
- 0.88
- Chunked prefill
- 是
- Prefill chunk
- 2048
- Max running seqs
- 1
- Attn
- flashinfer
執行設定
- 上下文
- 2,048 個 token
- 深度
- 0 個 token
- 批次大小
- 1
- 提示詞 token
- 2923
- 預填 tok/s
- 6,191.3 tok/s
- 輸出 token
- 1024
- 備註
- PureTensor lab, tensor-core: one RTX PRO 6000 Blackwell Max-Q Workstation Edition (325 W cap), the whole card, Threadripper PRO 9975WX, 512 GB RAM. Nanbeige's official FP8 checkpoint on SGLang 0.5.21 (lmsysorg/sglang:v0.5.21-cu130, Docker). Thinking off. Draft model: ProCreations/Nanbeige4.3-33B-DFlash2 (block-diffusion, 3 layers, 0.98B), per its model card. Config found by our maxxloop tuning harness: one-variable sweeps, quality and degeneration gates, interleaved fresh-boot confirms. Confirmed x1.788 [95% CI 1.752-1.819] over the engine defaults in 3+3 interleaved boots. Engine config vs its defaults: spec='--speculative-algorithm DFLASH --speculative-draft-model-path /models/ProCreations__Nanbeige4.3-33B-DFlash2 --speculative-draft-attention-backend flashinfer --speculative-draft-kv-cache-dtype bfloat16 --speculative-num-draft-tokens 8'. Image lmsysorg/sglang@sha256:b1259f3ea3275f66237c498ea388919729018bc9f01c3d638391e06e2cf3f469. CPU in a performance window (performance governor, C2 off, boost on). Thinking off. Batch 1, temperature 0, streamed; median of 5 runs after 2 warmup(s).
已記錄的證據
- 提示詞雜湊(SHA-256)
- 5a6b7bc1cbbc…
提示詞樣本 · 2,000 chars
[LocalMaxxing cache-bust nonce: caf9940c31c4001f0080d0cc222374f4]
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
Here is the complete rewrite of your webhook handler into a production-grade module, followed by the idempotency SQL, a pytest test suite, and an alert failure-modes checklist.
---
### 1. Database Schema & Idempotency SQL
Run this migration to create the idempotency table. It uses a unique constraint on `event_id` to guarantee atomic deduplication at the database level.
```sql
-- Idempotency table for webhook events
CREATE TABLE IF NOT EXISTS webhook_idempotency (
event_id TEXT PRIMARY KEY,
processed_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
status TEXT NOT NULL CHECK (status IN ('SUCCESS', 'FAILED'))
);
-- Index for fast lookups if querying by timestamp
CREATE INDEX IF NOT EXISTS idx_webhook_idempotency_processed_at
ON webhook_idempotency (processed_at);
-- Example invoices table (assumed existing or reference)
CREATE TABLE IF NOT EXISTS invoices (
id TEXT PRIMARY KEY,
amount NUMERIC(12, 2) NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
```
---
### 2. Module Implementation (`webhooks.py`)
This module includes:
- **HMAC-SHA256 signature verification** over the raw request body bytes.
- **Timestamp freshness validation** (rejects stale/future timestamps).
- **Idempotent inserts** using `INSERT ... ON CONFLICT DO NOTHING`.
- **Event type registry** replacing `if/else` chains.
- **Pydantic models** with full type hints.
- **No bare `except` blocks**; explicit exception handling throughout.
```python
import hmac
import hashlib
import os
from datetime import datetime, timezone, timedelta
from typing import Any, Callable, Dict, Optional, TypeVar
import asyncpg
from fastapi import APIRouter, Depends, Header, HTTPException, Request
from pydantic import BaseModel, ConfigDict, Field, ValidationError
# ---------------------------------------------------------------------------
# Configuration & Constants
# ---------------------------------------------------------------------------
WEBHOOK_SECRET: str = os.getenv("WEBHOOK_SIGNING_SECRET", "dev-insecure-secret-change-me")
MAX_TIMESTAMP_SKEW_SECONDS: int = 300 # Reject events older than 5 minutes
router = APIRouter(prefix="/webhooks", tags=["webhooks"])
# ---------------------------------------------------------------------------
# Pydantic Models
# ---------------------------------------------------------------------------
class WebhookEnvelope(BaseModel):
model_config = ConfigDict(extra="allow")
type: str
event_id: str
timestamp: datetime
data: Dict[str, Any]
class InvoicePaidData(BaseModel):
id: str
amount: float
class InvoicePaidEvent(WebhookEnvelope):
data: InvoicePaidData
class WebhookResponse(BaseModel):
status: str
event_type: Optional[str] = None
message: Optional[str] = None
# ---------------------------------------------------------------------------
# Event Dispatcher Registry
# ---------------------------------------------------------------------------
F = TypeVar("F", bound=Callable[..., Any])
class EventRegistry:
"""Registry mapping event types to async handlers."""
def __init__(self) -> None:
self._handlers: Dict[str, F] = {}
def register(self, event_type: str) -> Callable[[F], F]:
def decorator(func: F) -> F:
if event_type in self._handlers:
raise ValueError(f"Duplicate event type registered: {event_type}")
self._handlers[event_type] = func
return func
return decorator
def dispatch(self, event_type: str, payload: WebhookEnvelope, db: asyncpg.Pool) -> WebhookResponse:
handler = self._handlers.get(event_type)
if handler is None:
# Requirement: return 2xx for unhandled event types
return WebhookResponse(
status="ok",
event_type=event_type,
message="Event type not configured; acknowledged.",
)
try:
result = handler(payload, db)
return result
此模型在此硬體上的更多執行
- 93.4tok/ssglang · v0.5.21 · FP8上下文 2K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 66.4tok/ssglang · v0.5.21 · FP8上下文 2K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 60.0tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · FP8上下文 32K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 58.1tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · FP8上下文 32K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 56.9tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · FP8上下文 32K · 深度 0 · 批次 1puretensor · 2026年11月2日
- 43.6tok/ssglang · v0.5.21 · FP8上下文 2K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 43.5tok/ssglang · v0.5.21 · FP8上下文 2K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 42.9tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · FP8上下文 32K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 42.9tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · FP8上下文 32K · 深度 0 · 批次 1已驗證執行puretensor · 2026年11月2日
- 42.8tok/ssglang · v0.5.21 · FP8上下文 2K · 深度 0 · 批次 1puretensor · 2026年11月2日
