Test di velocità
Kimi-K2.6-GGUF
RTX PRO 6000 Blackwell Max-Q Workstation Edition 96GB ×4 · llama.cpp · b8070 · UD-Q2_K_XL
puretensorVerificato22 ott 2026
Decodifica
46.7tok/s
Prefill
415tok/s
Tempo al primo token
19.012ms
Totale
158tok/s
VRAM di picco
—
Lunghezza del contesto
16K
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
llama-server -m Kimi-K2.6-UD-Q2_K_XL-00001-of-00008.gguf -ngl 999 -sm layer -c 16384 -fa on --jinja -np 1 -t 32
Theoretical memory ceiling
This mixture-of-experts model doesn't list how many parameters are used per token, so a ceiling can't be estimated.
Hardware
- GPU
- RTX PRO 6000 Blackwell Max-Q Workstation Edition
- Conteggio
- 4
- VRAM
- 96 GB
- OS
- Ubuntu 26.04.1 LTS
Motore
- Motore
- llama.cpp
- Versione
- b8070
- Commit
- cc45f2ada
- Quant
- UD-Q2_K_XL
- Backend
- cuda
- TP
- 4
- GPU layers
- 999
- Flash Attn
- sì
Configurazione run
- Contesto
- 16.384 token
- Profondità
- 0 token
- Dimensione batch
- 1
- Token prompt
- 7881
- Prefill tok/s
- 414.5 tok/s
- Token output
- 2048
- Note
- PureTensor lab, tensor-core: RTX PRO 6000 Blackwell Max-Q (300 W) cards on PCIe 5.0 x16, Threadripper PRO 9975WX, 512 GB DDR5. Host P2P settings (amd_iommu=off, NVIDIA P2P registry keys). CPU in a performance window (boost on, performance governor, C2 off). Thinking off. llama.cpp b8070 (cc45f2ada), CUDA, all layers on 4 GPU(s), layer split, flash attention, one slot, no speculative decoding. Batch 1, temperature 0, streamed; median of 3 runs after 1 warmup(s).
Evidenze acquisite
- Hash del prompt (SHA-256)
- ea528ad859a0…
Esempio di prompt · 2,000 chars
[LocalMaxxing cache-bust nonce: de56cebb1a4003d675c0be2a315aa7bc]
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
I'll build a production-grade webhook handler addressing all the issues. Here's the complete module:
## SQL Schema
```sql
-- Idempotency and event tracking table
CREATE TABLE webhook_events (
event_id TEXT PRIMARY KEY,
event_type TEXT NOT NULL,
received_at TIMESTAMPTZ NOT NULL DEFAULT now(),
processed_at TIMESTAMPTZ,
signature_valid BOOLEAN NOT NULL DEFAULT false,
payload_hash TEXT NOT NULL,
error_message TEXT,
retry_count INTEGER NOT NULL DEFAULT 0
);
-- Invoices table (separate from events, idempotent via event_id FK)
CREATE TABLE invoices (
id TEXT PRIMARY KEY,
event_id TEXT NOT NULL REFERENCES webhook_events(event_id),
amount NUMERIC(20, 8) NOT NULL,
currency TEXT NOT NULL DEFAULT 'USD',
status TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
-- Index for efficient event lookups
CREATE INDEX idx_webhook_events_type ON webhook_events(event_type, processed_at);
```
## Module: `webhooks.py`
```python
"""
Production-grade payment webhook handler with HMAC verification,
idempotency, registry-based dispatch, and graceful degradation.
"""
from __future__ import annotations
import hashlib
import hmac
import json
import logging
import time
from collections.abc import Awaitable, Callable
from dataclasses import dataclass
from typing import Any, ClassVar, Final, TypeVar
import asyncpg
from fastapi import FastAPI, Header, HTTPException, Request, status
from pydantic import BaseModel, Field, ValidationError, validator
logger = logging.getLogger(__name__)
# ---------------------------------------------------------------------------
# Configuration
# ---------------------------------------------------------------------------
WEBHOOK_SECRET: Final[bytes] = b"your-secret-key-from-env" # Load from secure source
MAX_TIMESTAMP_AGE_SEC: Final[int] = 300 # 5 minutes
TIMESTAMP_TOLERANCE_SEC: Final[int] = 30 # Clock skew tolerance
# ---------------------------------------------------------------------------
# Exceptions
# ---------------------------------------------------------------------------
class WebhookError(Exception):
"""Base exception for webhook processing failures."""
pass
class SignatureError(WebhookError):
"""HMAC signature verification failed."""
pass
class TimestampError(WebhookError):
"""Event timestamp is stale or from future."""
pass
class DuplicateEventError(WebhookError):
"""Event has already been processed."""
pass
class EventTypeError(WebhookError):
"""Unknown or unsupported event type."""
pass
# ---------------------------------------------------------------------------
# Pydantic Models
# ---------------------------------------------------------------------------
class InvoiceData(BaseModel):
"""Nested invoice data from payment provider."""
id: str
amount: int # cents
currency: str = "USD"
status: str
@validator("amount")
@classmethod
def amount_must_be_positive(cls, v: int) -> int:
if v <= 0:
raise ValueError("amount must be positive")
return v
class WebhookPayload(BaseModel):
"""Validated webhook payload structure."""
type: str
id: str = Field(..., description="Unique event ID from provider")
created_at: int = Field(..., description="Unix timestamp of event creation")
data: dict[str, Any]
@validator("created_at")
@classmethod
def timestamp_not_in_future(cls, v: int) -> int:
now: int = int(time.time())
if v > now + TIMESTAMP_TOLERANCE_SEC:
raise ValueError("timestamp is in the future")
return v
class InvoicePaidPayload(WebhookPayload):
"""Specific payload for invoice.paid events."""
type: str = Field("invoice.paid", const=True)
data: InvoiceData
# ---------------------------------------------------------------------------
# Registry and Handler Types
# --------Altri run di questo modello su questo hardware
- 50.6tok/sllama.cpp · b8070 · UD-Q2_K_XLContesto 16K · profondità 0 · batch 1Esecuzione verificatapuretensor · 22 ott 2026
- 49.9tok/sllama.cpp · b8070 · UD-Q2_K_XLContesto 16K · profondità 0 · batch 1Esecuzione verificatapuretensor · 22 ott 2026
- 48.3tok/sllama.cpp · b8070 · UD-Q2_K_XLContesto 16K · profondità 0 · batch 1puretensor · 22 ott 2026
