Test di velocità
Qwen4-35B-A3B-GGUF
RTX 3060 12GB ×3 · strata · q4_lite PR tree 22a9714 (Strata PR #7774), served via terminal/serve/server.py · UD-IQ4_XS
Decodifica
106tok/s
Prefill
384tok/s
Tempo al primo token
662ms
Totale
109tok/s
VRAM di picco
9,7GB
Lunghezza del contesto
256K
Profondità KV
0
Dimensione batch
1
Concorrenza
1
Consumo energetico
243W
Verifica
Esecuzione verificataComando di avvio
python3 serve/server.py --engine strata --port 8098 --host 0.0.0.0 --config q4lite-8098.json # strata q4_lite tree @22a9714 (Strata PR #7774 port of qwen4exp 35B-A3B); engine args: --pack pack-trunk40-iq4xs --native trunk40-iq4xs.gguf --ple-gguf Qwen4-35B-A3B-UD-IQ4_XS-00002-of-00002.gguf --expert-cache auto --prefill 4096 --max-context 262144 --kv q4_0 --spec 4 --spec-min-p 0.35 --mtp MTP/rt-q4exp --mtp-hnorm stream --vram-reserve-mib 512 --vision --gpu 0,1,2 --serve --layer-split 12,28 --split-device 1,2
Theoretical memory ceiling
439.8–440.6 tok/s
360 GB/s memory bandwidth (spec sheet) · 32.06 GB model weights · 4.5-bit KV cache · 1–254 tokens of context
Includes speculative decoding: 2.46 tokens accepted per model step on average (179.1–179.5 steps/s) · measured 43.2 steps/s
24–24%
of the ceiling reached
Medium confidenceThe fastest this hardware's memory could serve a single request; real runs are slower. Model details from Qwen/Qwen4-35B-A3B; size from UD-IQ4_XS estimate. Hardware source · Open calculator
Hardware
- GPU
- RTX 3060
- Conteggio
- 3
- VRAM
- 12 GB
- OS
- Ubuntu 24.04
Motore
- Motore
- strata
- Versione
- q4_lite PR tree 22a9714 (Strata PR #7774), served via terminal/serve/server.py
- Repository
- https://github.com/Niko1221/Strata
- Build
- linux-x86_64-cuda12-sm86
- Quant
- UD-IQ4_XS
- Backend
- cuda
- TP
- 1
- KV cache
- q4_0
- Spec decode
- abilitato
- MTP
- abilitato
Configurazione run
- Contesto
- 262.144 token
- Profondità
- 0 token
- Dimensione batch
- 1
- Token prompt
- 254
- Prefill tok/s
- 383.7 tok/s
- Consumo energetico
- 243 W (69 + 69 + 106 W)
- Token output
- 6714
- Note
- 3x RTX 3060 12GB (36 GB VRAM), layer split 12/16/12; tensor parallel 1, so no all-reduce. qwen4exp 35B-A3B: 40 trunk layers + 1 MTP block, 256 experts top-8 (+1 shared), ~3.8B active per token. UD-IQ4_XS of unsloth/Qwen4-35B-A3B-GGUF; the 2-file layout keeps the ~11.5 GB engram (file 2) in page cache via lazy tensor reads, not VRAM. 262144 context with q4_0 KV. Strata cannot run the shipped 0.2.19 CLI on this pack (it rejects the 'qwen4' tokenizer rule), so serving is the PR tree's own terminal/serve/server.py. MTP drafter on (the draft layer's experts packed q4_0, 432 MiB vs 855 MB native); draft and accepted counts reported so the decode ceiling can be scaled by mean accepted length. --spec-min-p 0.35 and --mtp-hnorm stream lifted acceptance 0.56 -> 0.72 on this box. The image encoder (mmproj-BF16.gguf, qwen3vl_merger) runs on the CPU in its own process at 0 MiB VRAM, so /v1 takes images too and the text path is unchanged; this run is text-only.
Decodifica speculativa
- Metodo
- MTP drafter (runtime sidecar), --spec 4
- Accettati per passo
- 2,46 token
- Tasso di accettazione
- 73%
- Token di bozza
- 5487
- Token accettati
- 3979
Evidenze acquisite
- Hash del prompt (SHA-256)
- a737db738bd4…
Esempio di prompt · 760 chars
Implement a small command-line tool in Python called `logtally`. Requirements: - It reads newline-delimited JSON log records from stdin. Each record has `ts` (ISO-8601 string), `level` (one of DEBUG, INFO, WARN, ERROR), `service` (string), and optional `latency_ms` (number). - It prints, per service, the count of records by level and the p50 and p95 of `latency_ms` (ignore records without latency). - Malformed lines must be counted and reported at the end, never crash the program. - Support a `--since <ISO timestamp>` flag that drops earlier records. - Use only the standard library. After the code, explain in two or three sentences how you computed percentiles and why you chose that method, then list three edge cases a unit test suite should cover.
Esempio di output · 4,000 chars
## `logtally.py`
```python
#!/usr/bin/env python3
"""
logtally -- aggregate newline-delimited JSON log records read from stdin.
Usage:
producer | logtally [--since 2024-05-01T00:00:00Z]
Each input line must be a JSON object with:
ts ISO-8601 timestamp string
level one of DEBUG, INFO, WARN, ERROR
service non-empty string
latency_ms optional non-negative finite number
Lines that cannot be interpreted are counted by reason and reported at the
end; the tool never aborts on bad input.
"""
from __future__ import annotations
import argparse
import json
import math
import sys
from collections import Counter, defaultdict
from datetime import datetime, timezone
LEVELS = ("DEBUG", "INFO", "WARN", "ERROR")
# Only used when datetime.fromisoformat() rejects a value (older Pythons,
# or timestamps with more than 6 fractional digits).
_FALLBACK_TS_FORMATS = (
"%Y-%m-%dT%H:%M:%S",
"%Y-%m-%dT%H:%M:%S.%f",
"%Y-%m-%d %H:%M:%S",
"%Y-%m-%d",
)
class Malformed(Exception):
"""A line that could not be turned into a usable record."""
def __init__(self, reason: str) -> None:
super().__init__(reason)
self.reason = reason
# --------------------------------------------------------------------------
# Parsing
# --------------------------------------------------------------------------
def parse_timestamp(value: object) -> datetime:
"""Parse an ISO-8601 string into a timezone-aware datetime (UTC assumed
when no offset is given). Raises Malformed('bad_ts') otherwise."""
if not isinstance(value, str) or not value.strip():
raise Malformed("bad_ts")
text = value.strip()
if text[-1] in "Zz":
text = text[:-1] + "+00:00"
dt = None
try:
dt = datetime.fromisoformat(text)
except ValueError:
for fmt in _FALLBACK_TS_FORMATS:
try:
dt = datetime.strptime(text, fmt)
break
except ValueError:
continue
if dt is None:
raise Malformed("bad_ts")
if dt.tzinfo is None:
dt = dt.replace(tzinfo=timezone.utc)
return dt
def parse_record(line: str) -> tuple[datetime, str, str, float | None]:
"""Validate one JSON line. Returns (ts, level, service, latency_or_None)."""
try:
obj = json.loads(line)
except ValueError:
raise Malformed("bad_json") from None
if not isinstance(obj, dict):
raise Malformed("not_an_object")
service = obj.get("service")
if not isinstance(service, str) or not service.strip():
raise Malformed("bad_service")
level = obj.get("level")
if not isinstance(level, str) or level.strip().upper() not in LEVELS:
raise Malformed("bad_level")
level = level.strip().upper()
ts = parse_timestamp(obj.get("ts"))
# A missing or null latency_ms simply means "no latency data".
latency = None
raw = obj.get("latency_ms")
if raw is not None:
if isinstance(raw, bool) or not isinstance(raw, (int, float)):
raise Malformed("bad_latency")
if not math.isfinite(raw) or raw < 0:
raise Malformed("bad_latency")
latency = float(raw)
return ts, level, service.strip(), latency
# --------------------------------------------------------------------------
# Aggregation
# --------------------------------------------------------------------------
class ServiceStats:
__slots__ = ("counts", "latencies")
def __init__(self) -> None:
self.counts: Counter[str] = Counter()
# NOTE: latencies are kept in memory so percentiles are exact. For
# streams too large for RAM, swap this list for a bounded sketch
# (t-digest / DDSketch) or a fixed-bucket histogram.
self.latencies: list[float] = []
def add(self, level: str, latency: float | None) -> None:
self.counts[level] += 1
if latency is not None:
self.latencies.append(latency)
Altri run di questo modello su questo hardware
- 110tok/sstrata · Strata 0.2.27 (Control 0.1.74.2), official strata-q4-lite engine 0.1.74 · UD-IQ4_XSContesto 256K · profondità 0 · batch 1Esecuzione verificata369sasasavic-dotcom · 4 dic 2026
- 109tok/sstrata · Strata 0.2.27 (Control 0.1.74.2), official strata-q4-lite engine 0.1.74 · UD-IQ4_XSContesto 256K · profondità 0 · batch 1Esecuzione verificata369sasasavic-dotcom · 4 dic 2026
- 106tok/sstrata · q4_lite PR tree 22a9714 (Strata PR #7774), served via terminal/serve/server.py · UD-IQ4_XSContesto 256K · profondità 0 · batch 1Esecuzione verificata369sasasavic-dotcom · 4 dic 2026
