Test di velocità
Nanbeige4.3-33B-NVFP4
RTX PRO 6000 Blackwell Max-Q Workstation Edition 96GB · sglang · v0.5.21 · NVFP4
Decodifica
48.4tok/s
Prefill
10.6ktok/s
Tempo al primo token
277ms
Totale
185tok/s
VRAM di picco
—
Lunghezza del contesto
2K
Profondità KV
0
Dimensione batch
1
Concorrenza
1
Consumo energetico
—
Verifica
Non verificata — risultato sperimentale
Le esecuzioni verificate usano un prompt di test standard e registrano dati sufficienti per controllare il risultato.
- The run did not use one of the standard test prompts.
Comando di avvio
docker run -d --name maxxloop-tc3 --gpus '"device=3"' --ipc=host --shm-size 32g -p 127.0.0.1:8673:30000 -v /mnt/storage/models/hf:/models:ro -v /mnt/storage/maxxloop/cache-tc3-sgl:/root/.cache lmsysorg/sglang:v0.5.21-cu130 python3 -m sglang.launch_server --model-path /models/primitive-ai__Nanbeige4.3-33B-NVFP4 --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
Theoretical memory ceiling
105.8–108.6 tok/s
1,792 GB/s memory bandwidth (spec sheet) · 16.50 GB model weights · 16-bit KV cache · 1–2,048 tokens of context
45–46%
of the ceiling reached
Medium confidenceThe fastest this hardware's memory could serve a single request; real runs are slower. Model details from primitive-ai/Nanbeige4.3-33B-NVFP4; size from NVFP4 estimate. Hardware source · Open calculator
Hardware
- GPU
- RTX PRO 6000 Blackwell Max-Q Workstation Edition
- Conteggio
- 1
- VRAM
- 96 GB
- OS
- Ubuntu 26.04.1 LTS
Motore
- Motore
- sglang
- Versione
- 0.5.21
- Build
- lmsysorg/sglang@sha256:b1259f3ea3275f66237c498ea388919729018bc9f01c3d638391e06e2cf3f469
- Quant
- NVFP4
- Backend
- cuda
- TP
- 1
- KV cache
- bfloat16
- GPU mem util
- 0.88
- Chunked prefill
- sì
- Chunk prefill
- 2048
- Max running seqs
- 1
- Attn
- flashinfer
Configurazione run
- Contesto
- 2048 token
- Profondità
- 0 token
- Dimensione batch
- 1
- Token prompt
- 2924
- Prefill tok/s
- 10.6K tok/s
- Token output
- 1024
- Note
- 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. primitive-ai's NVFP4 (W4A4, compressed-tensors) 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. Engine defaults. 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).
Evidenze acquisite
- Hash del prompt (SHA-256)
- 5a6b7bc1cbbc…
Esempio di prompt · 2,000 chars
[LocalMaxxing cache-bust nonce: 760f9bbad7e96a8b57855044fdf068a4]
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 bodEsempio di output · 4,000 chars
Here is the complete rewrite of your webhook service as a proper, production-ready module.
---
### 1. Database Schema & SQL for Idempotency
Run this SQL to set up the idempotency table and ensure the `invoices` table has a unique constraint on `id`:
```sql
-- Idempotency table: tracks processed event IDs to prevent duplicate processing
CREATE TABLE IF NOT EXISTS webhook_events (
id VARCHAR PRIMARY KEY,
event_type VARCHAR NOT NULL,
processed_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
raw_payload JSONB NOT NULL
);
-- Ensure invoices table enforces uniqueness on id
ALTER TABLE invoices ADD CONSTRAINT IF NOT EXISTS uq_invoices_id ON invoices (id);
```
---
### 2. Module Implementation (`webhooks.py`)
This module includes:
- **Pydantic models** for strict payload validation.
- **HMAC-SHA256 signature verification** over the raw request body.
- **Timestamp freshness check** (configurable tolerance window).
- **Atomic idempotency check-and-insert** using `INSERT ... ON CONFLICT DO NOTHING`.
- **Event type registry** for clean extensibility without `if/else` chains.
- **2xx responses** for unhandled event types.
- **No bare `except` clauses**.
```python
from __future__ import annotations
import hmac
import hashlib
import os
from datetime import datetime, timezone, timedelta
from typing import Any, Callable, Dict, Final
from fastapi import APIRouter, Body, Header, HTTPException, Request
from pydantic import BaseModel, ConfigDict, Field, ValidationError
import asyncpg
# ---------------------------------------------------------------------------
# Configuration & Constants
# ---------------------------------------------------------------------------
WEBHOOK_SECRET: Final[str] = os.getenv("WEBHOOK_SECRET", "replace-with-a-secure-secret")
SIGNATURE_HEADER: Final[str] = "X-Signature"
TIMESTAMP_HEADER: Final[str] = "X-Webhook-Timestamp"
MAX_TIMESTAMP_AGE: Final[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
data: Dict[str, Any]
class InvoicePaidEvent(WebhookEnvelope):
type: Literal["invoice.paid"]
data: Dict[str, Any]
class WebhookPayload(BaseModel):
"""Unified payload model accepting any event type."""
type: str
data: Dict[str, Any]
# ---------------------------------------------------------------------------
# Exceptions
# ---------------------------------------------------------------------------
class WebhookSignatureError(Exception):
"""Raised when signature verification fails."""
class WebhookTimestampError(Exception):
"""Raised when event timestamp is stale or missing."""
class WebhookPayloadError(Exception):
"""Raised when payload validation fails."""
# ---------------------------------------------------------------------------
# Database Operations
# ---------------------------------------------------------------------------
async def record_event_idempotently(
pool: asyncpg.Pool, event_id: str, event_type: str, raw_payload: Dict[str, Any]
) -> None:
"""
Atomically record the event. If the event already exists, do nothing.
Raises asyncpg.UniqueViolationError only if concurrent race conditions fail.
"""
await pool.execute(
"""
INSERT INTO webhook_events (id, event_type, raw_payload)
VALUES ($1, $2, $3::jsonb)
ON CONFLICT (id) DO NOTHING;
""",
event_id,
event_type,
raw_payload,
)
async def insert_invoice(pool: asyncpg.Pool, invoice_id: str, amount: Decimal) -> None:
"""Insert an invoice row."""
await pool.execute(
"""
INSERT INTO invoices (id, amount)
VALUES ($1, $2)
ON CONFLICT (id) DO UPDATE SET amount = EXCAltri run di questo modello su questo hardware
- 105tok/ssglang · v0.5.21 · NVFP4Contesto 2K · profondità 0 · batch 1Esecuzione verificatapuretensor · 2 nov 2026
- 94.1tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · NVFP4Contesto 32K · profondità 0 · batch 1Esecuzione verificatapuretensor · 2 nov 2026
- 92.6tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · NVFP4Contesto 32K · profondità 0 · batch 1Esecuzione verificatapuretensor · 2 nov 2026
- 92.2tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · NVFP4Contesto 32K · profondità 0 · batch 1puretensor · 2 nov 2026
- 76.0tok/ssglang · v0.5.21 · NVFP4Contesto 2K · profondità 0 · batch 1puretensor · 2 nov 2026
- 71.5tok/ssglang · v0.5.21 · NVFP4Contesto 2K · profondità 0 · batch 1Esecuzione verificatapuretensor · 2 nov 2026
- 67.7tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · NVFP4Contesto 32K · profondità 0 · batch 1Esecuzione verificatapuretensor · 2 nov 2026
- 67.7tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · NVFP4Contesto 32K · profondità 0 · batch 1Esecuzione verificatapuretensor · 2 nov 2026
- 66.0tok/svllm · v0.33.0rc1.dev320+g335dd77b0 · NVFP4Contesto 32K · profondità 0 · batch 1puretensor · 2 nov 2026
- 49.8tok/ssglang · v0.5.21 · NVFP4Contesto 2K · profondità 0 · batch 1Esecuzione verificatapuretensor · 2 nov 2026
