ทดสอบความเร็ว
Kimi-K2.6-GGUF
RTX PRO 6000 Blackwell Max-Q Workstation Edition 96GB ×4 · llama.cpp · b8070 · UD-Q2_K_XL
puretensorยืนยันแล้ว22 ต.ค. 2569
Decode
48.3tok/s
Prefill
425tok/s
เวลาถึงโทเค็นแรก
6,051ms
รวม
95.3tok/s
VRAM สูงสุด
—
ความยาวบริบท
16K
ความลึก KV
0
ขนาด batch
1
การทำงานพร้อมกัน
1
การใช้พลังงาน
—
การตรวจสอบ
ยังไม่ตรวจสอบ — ผลลัพธ์เชิงทดลอง
การรันที่ตรวจสอบแล้วใช้พรอมต์ทดสอบมาตรฐานและบันทึกข้อมูลเพียงพอสำหรับตรวจสอบผลลัพธ์
- The run did not use one of the standard test prompts.
คำสั่งเริ่มรัน
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.
ฮาร์ดแวร์
- GPU
- RTX PRO 6000 Blackwell Max-Q Workstation Edition
- จำนวน
- 4
- VRAM
- 96 GB
- OS
- Ubuntu 26.04.1 LTS
Engine
- Engine
- llama.cpp
- เวอร์ชัน
- b8070
- Commit
- cc45f2ada
- Quant
- UD-Q2_K_XL
- Backend
- cuda
- TP
- 4
- GPU layers
- 999
- Flash Attn
- ใช่
Run config
- Context
- 16,384 tokens
- ความลึก
- 0 tokens
- Batch size
- 1
- Prompt tokens
- 2570
- Prefill tok/s
- 424.7 tok/s
- Output tokens
- 2048
- หมายเหตุ
- 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).
หลักฐานที่บันทึกไว้
- แฮชพรอมป์ต์ (SHA-256)
- 5a6b7bc1cbbc…
ตัวอย่างพรอมป์ต์ · 2,000 chars
[LocalMaxxing cache-bust nonce: 33b8b8f262eebd22e4cbd8c07b73f254]
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
I'll build a production-ready webhook handler module addressing all the issues. Here's the complete implementation:
## 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 for business logic)
CREATE TABLE invoices (
id TEXT PRIMARY KEY,
amount NUMERIC(20, 8) NOT NULL,
currency TEXT NOT NULL DEFAULT 'USD',
status TEXT NOT NULL DEFAULT 'pending',
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
paid_at TIMESTAMPTZ,
event_id TEXT NOT NULL REFERENCES webhook_events(event_id),
UNIQUE(event_id) -- ensures idempotency at the invoice level too
);
-- Index for efficient lookups
CREATE INDEX idx_webhook_events_type ON webhook_events(event_type, processed_at);
```
## Module: `webhooks/security.py`
```python
"""Webhook signature verification with HMAC-SHA256 and timestamp validation."""
import hashlib
import hmac
import time
from dataclasses import dataclass
from fastapi import HTTPException, Request, status
@dataclass(frozen=True)
class WebhookConfig:
secret: bytes
max_age_seconds: int = 300 # 5 minutes default
timestamp_tolerance_seconds: int = 30 # clock skew tolerance
class SignatureError(HTTPException):
"""Raised when signature verification fails."""
def __init__(self, detail: str) -> None:
super().__init__(
status_code=status.HTTP_401_UNAUTHORIZED,
detail=detail,
)
class TimestampError(HTTPException):
"""Raised when timestamp is stale or invalid."""
def __init__(self, detail: str) -> None:
super().__init__(
status_code=status.HTTP_401_UNAUTHORIZED,
detail=detail,
)
def _constant_time_compare(val1: bytes, val2: bytes) -> bool:
"""Prevent timing attacks with constant-time comparison."""
if len(val1) != len(val2):
return False
return hmac.compare_digest(val1, val2)
def _parse_signature_header(header: str) -> tuple[str, str]:
"""Parse 't=timestamp,v=signature' format."""
parts: dict[str, str] = {}
for item in header.split(","):
if "=" in item:
key, value = item.split("=", 1)
parts[key.strip()] = value.strip()
if "t" not in parts or "v" not in parts:
raise SignatureError("Malformed signature header: missing t or v")
return parts["t"], parts["v"]
def verify_signature(
body: bytes,
signature_header: str,
config: WebhookConfig,
) -> None:
"""
Verify HMAC-SHA256 signature over raw body with timestamp.
Expected header format: t=timestamp,v=hex_signature
Args:
body: Raw request body bytes
signature_header: The X-Signature header value
config: Webhook configuration with secret and timing parameters
Raises:
SignatureError: If signature is invalid or malformed
TimestampError: If timestamp is stale or in the future
"""
timestamp_str, expected_sig_hex = _parse_signature_header(signature_header)
# Validate timestamp
try:
timestamp = int(timestamp_str)
except ValueError as exc:
raise TimestampError(f"Invalid timestamp format: {timestamp_str}") from exc
now = int(time.time())
# Reject future timestamps beyond tolerance
if timestamp > now + config.timestamp_tolerance_seconds:
raise TimestampError(
f"Timestamp too far in future: {timestamp} > {now + config.timestamp_tolerance_seconds}"
)
# Reject stale timestamps
if now - timestamp > config.max_age_seconds + coRuns อื่นของโมเดลนี้บนฮาร์ดแวร์นี้
- 50.6tok/sllama.cpp · b8070 · UD-Q2_K_XLบริบท 16K · ความลึก 0 · batch 1การรันที่ตรวจสอบแล้วpuretensor · 22 ต.ค. 2569
- 49.9tok/sllama.cpp · b8070 · UD-Q2_K_XLบริบท 16K · ความลึก 0 · batch 1การรันที่ตรวจสอบแล้วpuretensor · 22 ต.ค. 2569
- 46.7tok/sllama.cpp · b8070 · UD-Q2_K_XLบริบท 16K · ความลึก 0 · batch 1puretensor · 22 ต.ค. 2569
