Hız testi
Qwen4-35B-A3B
RTX PRO 6000 Blackwell Max-Q Workstation Edition 96GB ×4 · vllm · v0.1.dev26393+gf247de72b · BF16
Decode
364tok/s
Prefill
24.5ktok/s
İlk token süresi
116ms
Toplam
852tok/s
En yüksek VRAM
—
Bağlam uzunluğu
1024K
KV derinliği
0
Batch boyutu
1
Eşzamanlılık
1
Güç tüketimi
—
Doğrulama
Doğrulanmadı — deneysel sonuç
Doğrulanmış çalıştırmalar standart bir test istemi kullanır ve sonucu kontrol etmeye yetecek veriyi kaydeder.
- The run did not use one of the standard test prompts.
Komutu başlat
docker run --gpus all --ipc=host -e VLLM_USE_RUST_FRONTEND=1 vllm/vllm-openai:qwen4 /models/Qwen4-35B-A3B --served-model-name Qwen/Qwen4-35B-A3B --trust-remote-code --enable-prefix-caching --tensor-parallel-size 4 --gpu-memory-utilization 0.85 --max-model-len auto --disable-flashinfer-autotune --kv-cache-dtype nvfp4 --attention-config.indexer_kv_dtype fp8 --enable-auto-tool-choice --tool-call-parser qwen4 --reasoning-parser qwen4 --speculative-config '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":true}'Theoretical memory ceiling
3,063.7–3,082.8 tok/s
7,168 GB/s memory bandwidth (spec sheet) · 114.00 GB model weights · 4-bit KV cache · 1–2,834 tokens of context
Includes speculative decoding: 2.73 tokens accepted per model step on average (1,121.0–1,128.0 steps/s) · measured 133.4 steps/s
12–12%
of the ceiling reached
Medium confidenceThe fastest this hardware's memory could serve a single request; real runs are slower. Model details from Qwen/Qwen4-35B-A3B; size from BF16 estimate. Hardware source · Open calculator
Donanım
- GPU
- RTX PRO 6000 Blackwell Max-Q Workstation Edition
- Saymak
- 4
- VRAM
- 96 GB
- OS
- Ubuntu 26.04.1 LTS
Motor
- Motor
- vllm
- Sürüm
- 0.1.dev26393+gf247de72b
- Build
- vllm/vllm-openai:qwen4 (sha256:63a160daa7b2c7eac713d2097c6d84d52d4ccf9a935788acdd610a563d39d286)
- Commit
- f247de72b
- miktar
- BF16
- Arka uç
- cuda
- TP
- 4
- KV önbellek
- nvfp4
- Kullandığım GPU
- 0.85
- Önek önbelleğe alma
- Evet
- Özel kod çözme
- etkinleştirilmiş
- MTP
- etkinleştirilmiş
Yapılandırmayı çalıştır
- Bağlam
- 1.048.576 jetonları
- Derinlik
- 0 jetonları
- Parti boyutu
- 1
- İstem jetonları
- 2834
- tok/s'yi önceden doldurun
- 24.5K tok/s
- Çıkış jetonları
- 2048
- Revizyon
- c06f0c19
- Notlar
- PureTensor lab: four RTX PRO 6000 Blackwell Max-Q cards (325 W limit) on PCIe 5.0 x16, Threadripper PRO 9975WX, 512 GB DDR5. One model instance split across the four cards with tensor parallel 4; this is not a published recipe configuration (the vLLM recipe lists one GPU, TP1). Host P2P settings (amd_iommu=off, NVIDIA P2P registry keys). CPU in a performance window (boost on, performance governor, C2 off). Image pinned by digest. A small embedding server (12 GB) stayed loaded on GPU 0 and was idle. MTP speculative decoding, 3 draft tokens. Thinking off (enable_thinking=false). Batch 1, temperature 0, streamed; median of 5 runs after 2 warmup(s). 749 verify steps, 2.73 tokens/step, 7.5 ms/step.
Spekülatif decoding
- Yöntem
- MTP
- Adım başına kabul edilen
- 2,73 token
- Kabul oranı
- %58
- Taslak token'lar
- 2.247
- Kabul edilen token'lar
- 1.298
Kaydedilen kanıtlar
- İstem karması (SHA-256)
- 5a6b7bc1cbbc…
İstem örneği · 2,000 chars
[LocalMaxxing cache-bust nonce: 4680b25c85db9f36d6f8d6a198191bf3]
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Çıktı örneği · 4,000 chars
# Production-Grade Payment Webhook Handler
## SQL: Idempotency Table
```sql
CREATE TABLE IF NOT EXISTS webhook_events (
event_id TEXT PRIMARY KEY,
event_type TEXT NOT NULL,
received_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
-- Optional: prune old events after 30 days
CREATE INDEX IF NOT EXISTS idx_webhook_events_received_at
ON webhook_events (received_at);
```
---
## Full Module: `webhooks/payments.py`
```python
"""
Payment webhook receiver.
- Verifies HMAC-SHA256 signature over raw body
- Rejects stale timestamps (replay protection)
- Idempotent inserts via webhook_events table
- Event-type dispatch through a registry
- Returns 2xx for unhandled event types (stops retries)
"""
from __future__ import annotations
import hashlib
import hmac
import logging
import time
from collections.abc import Awaitable, Callable
from typing import Any
import asyncpg
from fastapi import APIRouter, Header, HTTPException, Request, Response
from pydantic import BaseModel, Field, field_validator
logger = logging.getLogger(__name__)
# ---------------------------------------------------------------------------
# Configuration
# ---------------------------------------------------------------------------
WEBHOOK_SECRET: str = "" # Inject via settings/env
MAX_TIMESTAMP_AGE_SECONDS: int = 300 # 5 minutes
def configure_webhook(secret: str, max_age: int = 300) -> None:
global WEBHOOK_SECRET, MAX_TIMESTAMP_AGE_SECONDS
WEBHOOK_SECRET = secret
MAX_TIMESTAMP_AGE_SECONDS = max_age
# ---------------------------------------------------------------------------
# Pydantic Models
# ---------------------------------------------------------------------------
class WebhookEvent(BaseModel):
"""Top-level envelope from the payment provider."""
id: str = Field(..., description="Unique event ID for idempotency")
type: str = Field(..., description="Event type, e.g. invoice.paid")
created: int = Field(..., description="Unix timestamp of event creation")
data: dict[str, Any] = Field(..., description="Event 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):
"""Parsed data block for invoice.paid events."""
id: str
amount: int # cents
currency: str = "usd"
customer_id: str | None = None
# ---------------------------------------------------------------------------
# Signature Verification
# ---------------------------------------------------------------------------
def compute_signature(secret: str, timestamp: str, body: bytes) -> str:
"""
Compute HMAC-SHA256 over '{timestamp}.{body}'.
The provider signs the concatenation of timestamp and raw body
with a dot separator (common pattern: Stripe-style).
"""
signed_payload = f"{timestamp}.{body.decode('utf-8')}"
return hmac.new(
secret.encode("utf-8"),
signed_payload.encode("utf-8"),
hashlib.sha256,
).hexdigest()
def verify_signature(
*,
secret: str,
signature_header: str,
timestamp_header: str,
body: bytes,
max_age_seconds: int = MAX_TIMESTAMP_AGE_SECONDS,
) -> None:
"""
Verify the webhook signature and timestamp freshness.
Raises HTTPException(403) on failure.
"""
# --- Timestamp freshness check ---
try:
event_timestamp = int(timestamp_header)
except (ValueError, TypeError) as exc:
raise HTTPException(
status_code=403, detail="Invalid timestamp header"
) from exc
current_time = int(time.time())
if abs(current_time - event_timestamp) > max_age_seconds:
raise HTTPException(
status_code=403, detail="Timestamp outside acceptable window"
)
# --- HMAC verification ---
expected = compute_signature(secret, timestamp_header, body)
if not hmac.comparBu modelin bu donanımdaki diğer çalıştırmaları
- 477tok/ssglang · v0.5.24.dev1+gcd1dc28 · BF1640K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
- 429tok/ssglang · v0.5.24.dev1+gcd1dc28 · BF1640K bağlam · 0 derinlik · batch 1puretensor · 4 Ara 2026
- 410tok/ssglang · v0.5.24.dev1+gcd1dc28 · BF1640K bağlam · 0 derinlik · batch 1puretensor · 4 Ara 2026
- 368tok/svllm · v0.1.dev26393+gf247de72b · BF161024K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
- 353tok/svllm · v0.1.dev26393+gf247de72b · BF161024K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
- 305tok/svllm · v0.1.dev26393+gf247de72b · BF161024K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
- 298tok/svllm · v0.1.dev26393+gf247de72b · BF161024K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
- 283tok/ssglang · v0.5.24.dev1+gcd1dc28 · BF1640K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
- 198tok/ssglang · v0.5.24.dev1+gcd1dc28 · BF1640K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
- 197tok/ssglang · v0.5.24.dev1+gcd1dc28 · BF1640K bağlam · 0 derinlik · batch 1Doğrulanmış çalıştırmapuretensor · 4 Ara 2026
