속도 테스트
Qwen4-35B-A3B-NVFP4
RTX PRO 6000 Blackwell Workstation Edition 96GB ×2 · sglang · v0.5.24.dev1+gcd1dc28 · NVFP4
디코드
509tok/s
프리필
21.8ktok/s
첫 토큰까지의 시간
130ms
합계
1.2ktok/s
최대 VRAM
—
컨텍스트 길이
40K
KV 깊이
0
배치 크기
1
동시성
1
소비 전력
—
검증
미검증 — 실험적 결과
검증된 실행은 표준 테스트 프롬프트를 사용하고 결과를 확인할 수 있을 만큼의 데이터를 기록합니다.
- The run did not use one of the standard test prompts.
실행 명령
docker run --gpus all --ipc=host --shm-size 32g lmsysorg/sglang:qwen4 python3 -m sglang.launch_server --model-path RadixArk/Qwen4-35B-A3B-NVFP4 --served-model-name RadixArk/Qwen4-35B-A3B-NVFP4 --trust-remote-code --tp-size 2 --mem-fraction-static 0.6 --disable-radix-cache --max-running-requests 64 --context-length 40960 --random-seed 42 --speculative-algorithm DFLASH --speculative-draft-model-path RadixArk/Qwen4-35B-A3B-Dflash2 --speculative-dflash-block-size 8 --speculative-draft-kv-cache-dtype bf16 --speculative-use-block-verification
Theoretical memory ceiling
6,771.0–7,604.2 tok/s
3,584 GB/s memory bandwidth (spec sheet) · 28.50 GB model weights · 16-bit KV cache · 1–2,833 tokens of context
Includes speculative decoding: 4.39 tokens accepted per model step on average (1,541.7–1,731.4 steps/s) · measured 115.8 steps/s
7–8%
of the ceiling reached
Medium confidenceThe fastest this hardware's memory could serve a single request; real runs are slower. Model details from RadixArk/Qwen4-35B-A3B-NVFP4; size from NVFP4 estimate. Hardware source · Open calculator
모델
- GPU
- RTX PRO 6000 Blackwell Workstation Edition
- 개수
- 2
- VRAM
- 96 GB
- OS
- Ubuntu 24.04.5 LTS
엔진
- 엔진
- sglang
- 버전
- 0.5.24.dev1+gcd1dc28
- Build
- lmsysorg/sglang:qwen4 (sha256:a574b8c4d271459718a64f9dacd5ba373fcd4e75ee99770abeab4203557eccbd)
- Commit
- cd1dc28
- 양자화
- NVFP4
- 백엔드
- cuda
- TP
- 2
- GPU 메모리 사용률
- 0.6
- 프리픽스 캐싱
- 아니요
- 최대 실행 시퀀스
- 64
- Spec decode
- 활성화됨
실행 설정
- 컨텍스트
- 40,960 토큰
- 깊이
- 0 토큰
- 배치 크기
- 1
- 프롬프트 토큰
- 2833
- 프리필 tok/s
- 21.8K tok/s
- 출력 토큰
- 2048
- 메모
- PureTensor lab, fox-n0: two RTX PRO 6000 Blackwell Workstation Edition cards (600 W limit), Threadripper 7970X, 256 GB RAM. SGLang official Qwen4 image, pinned by digest, TP2. Target RadixArk NVFP4 (W4A4 experts) with the RadixArk DFlash2 block drafter (BF16 draft, 8-token verify width, block verification). CPU in a performance window (boost on, performance governor, C2 off). Radix (prefix) cache off as in the drafter model card. A small reranker (2.3 GB) stayed loaded on GPU 0. Thinking off (enable_thinking=false). Batch 1, temperature 0, streamed; median of 5 runs after 2 warmup(s). 467 verify steps, 4.39 tokens/step, 8.6 ms/step.
추측 디코딩
- 방식
- DFlash
- 단계당 수락 수
- 4.39 토큰
- 수락률
- 48%
- 초안 토큰
- 3,269
- 수락된 토큰
- 1,584
기록된 증거
- 프롬프트 해시 (SHA-256)
- 5a6b7bc1cbbc…
프롬프트 샘플 · 2,000 chars
[LocalMaxxing cache-bust nonce: 1235d6b725e21cb51f4934cc906b7ca4]
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
# Production Webhook Handler
## 1. SQL — Idempotency Table
```sql
CREATE TABLE webhook_events (
event_id TEXT PRIMARY KEY,
event_type TEXT NOT NULL,
received_at TIMESTZONE NOT NULL DEFAULT now()
);
-- Optional: prune old events after 90 days
CREATE INDEX webhook_events_received_at_idx
ON webhook_events (received_at);
```
---
## 2. Full Module — `webhooks/payments.py`
```python
"""
Payment-provider webhook receiver.
Responsibilities:
1. Verify HMAC-SHA256 signature + reject stale timestamps.
2. Parse & validate payload via Pydantic.
3. Idempotent insert keyed on event_id.
4. Dispatch to registered handlers (no if-chains).
5. Always return 2xx for known-but-unhandled events.
"""
from __future__ import annotations
import hashlib
import hmac
import json
import logging
import time
from collections.abc import Awaitable, Callable
from typing import Any, Final
import asyncpg
from fastapi import APIRouter, HTTPException, Request, Response
from pydantic import BaseModel, Field, field_validator
logger = logging.getLogger(__name__)
# ---------------------------------------------------------------------------
# Configuration (inject via settings / env in production)
# ---------------------------------------------------------------------------
WEBHOOK_SECRET: Final[str] = "..." # loaded from env / vault
MAX_TIMESTAMP_AGE_SECONDS: Final[int] = 300 # 5 minutes
# ---------------------------------------------------------------------------
# Pydantic models
# ---------------------------------------------------------------------------
class WebhookEvent(BaseModel):
"""Envelope for every incoming payment-provider event."""
id: str = Field(..., description="Unique event ID (idempotency key)")
type: str = Field(..., description="Event type, e.g. 'invoice.paid'")
created_at: int = Field(
..., description="Unix timestamp set by the provider"
)
data: dict[str, Any] = Field(
..., description="Event-specific payload"
)
@field_validator("id")
@classmethod
def id_must_be_non_empty(cls, v: str) -> str:
if not v.strip():
raise ValueError("event id must not be empty")
return v
class InvoicePaidData(BaseModel):
"""Validated payload for invoice.paid events."""
invoice_id: str
amount: int # cents
currency: str = "usd"
# ---------------------------------------------------------------------------
# Signature verification
# ---------------------------------------------------------------------------
def verify_signature(
*,
raw_body: bytes,
signature_header: str,
timestamp_header: str,
secret: str = WEBHOOK_SECRET,
max_age: int = MAX_TIMESTAMP_AGE_SECONDS,
) -> None:
"""
Verify HMAC-SHA256 signature and reject stale timestamps.
Expected headers:
X-Timestamp: unix seconds
X-Signature: hex-encoded HMAC-SHA256 of "{timestamp}.{raw_body}"
Raises HTTPException(403) on failure.
"""
# --- timestamp freshness ---
try:
ts: int = int(timestamp_header)
except (TypeError, ValueError):
raise HTTPException(status_code=403, detail="Invalid timestamp header")
now: int = int(time.time())
if abs(now - ts) > max_age:
raise HTTPException(status_code=403, detail="Timestamp too old or future")
# --- HMAC comparison ---
signed_payload: bytes = f"{timestamp_header}.".encode() + raw_body
computed: bytes = hmac.new(
secret.encode(),
signed_payload,
hashlib.sha256,
).digest()
try:
provided: bytes = bytes.fromhex(signature_header)
except ValueError:
raise HTTPException(status_code=403, detail="Malformed signature header")
if not hmac.compare_digest(computed, provided):
raise HTTPException(status_code=403, detail="Signature mismatch")
# ---------------------------------------------------------------------------
# Handler registry
# --------이 하드웨어에서 이 모델의 다른 실행
- 543tok/ssglang · v0.5.24.dev1+gcd1dc28 · NVFP4컨텍스트 40K · 깊이 0 · 배치 1검증된 실행puretensor · 2026. 12. 5.
- 321tok/ssglang · v0.5.24.dev1+gcd1dc28 · NVFP4컨텍스트 40K · 깊이 0 · 배치 1검증된 실행puretensor · 2026. 12. 5.
- 213tok/ssglang · v0.5.24.dev1+gcd1dc28 · NVFP4컨텍스트 40K · 깊이 0 · 배치 1검증된 실행puretensor · 2026. 12. 5.
- 213tok/ssglang · v0.5.24.dev1+gcd1dc28 · NVFP4컨텍스트 40K · 깊이 0 · 배치 1검증된 실행puretensor · 2026. 12. 5.
- 209tok/ssglang · v0.5.24.dev1+gcd1dc28 · NVFP4컨텍스트 40K · 깊이 0 · 배치 1puretensor · 2026. 12. 5.
