속도 테스트모델벤치마크렌탈리포트하드웨어디코드 계산기조직ProAPI 문서제출
언어
Actual Computer — Every computer, one endpoint

속도 테스트

Inkling-2-Mini

RTX 5090 32GB ×2 · sglang · v0.0.0.dev1+inkling2 · NVFP4

finnff검증됨2026. 11. 21.

디코드

392tok/s

프리필

12.3ktok/s

첫 토큰까지의 시간

255ms

합계

950tok/s

최대 VRAM

—

컨텍스트 길이

256K

KV 깊이

0

배치 크기

1

동시성

1

소비 전력

—

검증

미검증 — 실험적 결과

검증된 실행은 표준 테스트 프롬프트를 사용하고 결과를 확인할 수 있을 만큼의 데이터를 기록합니다.

  • The run did not use one of the standard test prompts.

실행 명령

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.

모델

GPU
RTX 5090
개수
2
VRAM
32 GB
OS
Ubuntu 24.04.3 LTS

엔진

엔진
sglang
버전
0.0.0.dev1+inkling2
Build
lmsysorg/sglang:inkling-2-mini
Commit
03fde9cc392a5f84a54a365635ffed0061cdf1b8
양자화
NVFP4
TP
2
GPU 메모리 사용률
0.86
프리픽스 캐싱
예
최대 실행 시퀀스
6
Attn
fa4
Spec decode
활성화됨

실행 설정

컨텍스트
262,144 토큰
깊이
0 토큰
배치 크기
1
프롬프트 토큰
3144
프리필 tok/s
12.3K tok/s
출력 토큰
2048
제출 도구
lmx dev speed-test submit
메모
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).

추측 디코딩

방식
dspark
단계당 수락 수
3.46 토큰
수락률
35%
초안 토큰
4,144
수락된 토큰
1,456

기록된 증거

프롬프트 해시 (SHA-256)
7ae06c0001c6…
프롬프트 샘플 · 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 tim
출력 샘플 · 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 —

이 하드웨어에서 이 모델의 다른 실행