Snelheidstest
Inkling-2-Mini
RTX 5090 32GB ×2 · sglang · v0.0.0.dev1+inkling2 · NVFP4
finnffGeverifieerd21 nov 2026
Decode
392tok/s
Prefill
12.3ktok/s
Tijd tot eerste token
255ms
Totaal
950tok/s
Piek-VRAM
—
Contextlengte
256K
KV-diepte
0
Batchgrootte
1
Gelijktijdigheid
1
Stroomverbruik
—
Verificatie
Niet geverifieerd — experimenteel resultaat
Geverifieerde runs gebruiken een standaard testprompt en leggen genoeg gegevens vast om het resultaat te controleren.
- The run did not use one of the standard test prompts.
Startcommando
SGLANG_OPT_INKLING2_VERIFY_REL_BIAS_KERNEL=1 SGLANG_OPT_DSV41_DSPARK_MID_FOLD=1 SGLANG_OPT_DSV41_DSPARK_PREPARE_INPUTS_ONCE=1 SGLANG_OPT_DSV41_DSPARK_SKIP_PREFILLED_INPUTS=1 sglang serve --model-path thinkingmachines/Inkling-2-Mini --served-model-name inkling-2-mini --tp 2 --ep 2 --attention-backend fa4 --dtype bfloat16 --page-size 128 --context-length 262144 --max-running-requests 6 --mem-fraction-static 0.86 --grammar-backend xgrammar --reasoning-parser inkling --tool-call-parser inkling2 --swa-full-tokens-ratio 0.05 --mamba-full-memory-ratio 0.04 --schedule-policy lpm --enable-hierarchical-cache --hicache-ratio 2 --hicache-write-policy write_through --speculative-algorithm DSPARK --speculative-num-draft-tokens 8 --disable-prefill-cuda-graph --enable-multimodal --enable-metrics --enable-cache-report --sleep-on-idle
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 5090
- Aantal
- 2
- VRAM
- 32 GB
- OS
- Ubuntu 24.04.3 LTS
Engine
- Engine
- sglang
- Versie
- 0.0.0.dev1+inkling2
- Build
- lmsysorg/sglang:inkling-2-mini
- Commit
- 03fde9cc392a5f84a54a365635ffed0061cdf1b8
- Quant
- NVFP4
- TP
- 2
- GPU mem util
- 0.86
- Prefix caching
- ja
- Max running seqs
- 6
- Attn
- fa4
- Spec decode
- ingeschakeld
Run config
- Context
- 262.144 tokens
- Diepte
- 0 tokens
- Batchgrootte
- 1
- Prompttokens
- 3144
- Prefill tok/s
- 12.3K tok/s
- Outputtokens
- 2048
- Ingediend met
- lmx dev speed-test submit
- Notities
- 2x RTX 5090, TP2/EP2 over PCIe P2P, lmsysorg/sglang:inkling-2-mini image plus two small local patches (sm120 attn_res memory fix, verify-kernel limit 48). Greedy, cold prefill (nonce per request); best of 3 runs, each the median of 7 x 2,048 tokens. Draft/accepted counts are from the last timed request (405.9 t/s).
Speculatieve decodering
- Methode
- dspark
- Geaccepteerd per stap
- 3,46 tokens
- Acceptatiegraad
- 35%
- Drafttokens
- 4.144
- Geaccepteerde tokens
- 1.456
Vastgelegd bewijs
- Prompt-hash (SHA-256)
- 7ae06c0001c6…
Promptvoorbeeld · 2,000 chars
[LocalMaxxing cache-bust nonce: 12dbee8c5e59faf680b969e80dccdc2a]
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, returning a single python file: 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.
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, returning a single python file: verify the signature with HMAC-SHA256 over the raw body and reject stale timUitvoervoorbeeld · 4,000 chars
The user pasted a repeated prompt many times. The actual task is legitimate: rewrite a FastAPI webhook handler. This is a benign coding task. The repeated text is just duplication. I should answer once, not be confused.
Need to produce a single python file with:
- HMAC-SHA256 signature verification over raw body
- reject stale timestamps
- idempotent inserts on event id
- registry dispatch
- 2xx for unhandled event types
- pydantic models, full type hints, no bare except
- SQL for idempotency table
- pytest test for signature check
Design:
Signature header format: e.g. `t=<timestamp>,v1=<hex hmac>` (Stripe-style). Verify:
- parse header
- timestamp within tolerance (e.g. 300s)
- compute HMAC over f"{timestamp}.{body}" and compare with hmac.compare_digest
Idempotency: table `processed_events(event_id text primary key, processed_at timestamptz default now())`. In handler, within transaction: INSERT INTO processed_events ... ON CONFLICT DO NOTHING; if no row inserted, return 200 already processed. Then dispatch handler.
Registry: dict[str, Callable[[WebhookEvent, Pool], Awaitable[None]]].
Error handling: signature failure -> 401; stale timestamp -> 401/400; validation error -> 400; unknown event type -> 200 {"status": "ignored"}; handler exceptions -> let them propagate? The problem says "any exception returns a 500 so the provider retries forever". Hmm — actually for transient DB errors, 500 is correct so provider retries. But the complaint is that any exception returns 500. The fix: catch expected errors (validation, signature) and return 4xx; for unexpected errors, we could return 500 so provider retries — that's actually correct behavior. But the user says "any exception returns a 500 so the provider retries forever" — meaning e.g. a malformed payload causes 500 and infinite retries. So we should return 4xx for permanent errors (bad signature, stale timestamp, invalid payload, unknown type) and only 500 for transient errors. Also maybe catch handler errors and return 500 deliberately.
Let me write the code.
```python
"""FastAPI webhook receiver for payment provider events."""
from __future__ import annotations
import hashlib
import hmac
import json
import logging
import time
from typing import Any, Awaitable, Callable
import asyncpg
from fastapi import FastAPI, Request, Response
from fastapi.responses import JSONResponse
from pydantic import BaseModel, Field, ValidationError
logger = logging.getLogger(__name__)
# ---------- config ----------
WEBHOOK_SECRET = "whsec_..." # from env
TIMESTAMP_TOLERANCE_SECONDS = 300
# ---------- models ----------
class InvoicePaidData(BaseModel):
id: str
amount: int
class WebhookEvent(BaseModel):
id: str
type: str
data: dict[str, Any] # or discriminated union
```
Better: discriminated union on type. Use `data: InvoicePaidData` for invoice.paid. Could do a registry of handlers each with its own model. Simpler: WebhookEvent with id, type, data: dict[str, Any]; handlers parse data
…
it? In asyncpg, returning from inside `async with conn.transaction()` — the context manager's __exit__ runs on return, committing. Actually yes, `return` inside the with block triggers __exit__ which commits. But if we return "duplicate" after inserting nothing... wait, in duplicate case we did INSERT ... ON CONFLICT DO NOTHING which inserted nothing, so commit is fine.
But careful: if handler raises, transaction rolls back, then we return 500. We should catch the exception and return 500 JSONResponse rather than let it propagate (FastAPI would return 500 anyway but with default handler). Catching and returning 500 with detail is fine. But "no bare except" — catching `Exception` is not bare; but is it acceptable? The user said no bare except. Catching Exception and returning 500 is deliberate. Alternatively let it propagate. I'll catch `Exception` and return 500 with a generic detail, logging the exception. That's not bare.
Actually, should we return 500 for handler failure? Yes —Meer runs van dit model op deze hardware
- 526tok/scustom · v0.5.6 · NVFP4256K context · 0 diepte · batch 1Geverifieerde runAnoniem · 24 nov 2026
- 489tok/scustom · v0.5.5 · NVFP42K context · 0 diepte · batch 1Geverifieerde runThomukas1 · 23 nov 2026
- 481tok/scustom · v0.5.6 · NVFP4256K context · 0 diepte · batch 1Geverifieerde runAnoniem · 24 nov 2026
- 441tok/ssglang · v0.0.0.dev1+inkling2 · NVFP4256K context · 0 diepte · batch 1Geverifieerde runfinnff · 21 nov 2026
- 414tok/ssglang · v0.0.0.dev1+inkling2 · NVFP4256K context · 0 diepte · batch 1Geverifieerde runfinnff · 21 nov 2026
