/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
pytorch
Опубликована
1 ноя 2026

Thaki-MemoryPolicy-vLLM-Ranker

Классификация таблицTable → label3 профессии

Компактный офлайн-ранжировщик выбирает конфигурацию vLLM для заданной модели и нагрузки по признакам, известным до запуска сервера.

68скачиваний за 30 дней0лайковвеса обновлены2 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

ThakiCloud разработала Thaki-MemoryPolicy-vLLM-Ranker — компактный ранжировщик на PyTorch примерно с 10 тысячами параметров. Он оценивает 15 заранее заданных конфигураций обслуживания vLLM и выбирает одну для заданной модели и рабочей нагрузки по известным до запуска сервера признакам: архитектуре, длине промпта, бюджету генерации, доле общего префикса и параллелизму. Модель предназначена для офлайн-подбора настроек инференса, а не для обработки пользовательских запросов; оценка на CPU занимает около 0,15 мс.

Ранжировщик обучен на синтетических сценариях для семейства плотных Qwen3, с измерениями на одной B200 и vLLM 0.28. В тесте на ранее не использованных типах нагрузок, но на моделях, участвовавших в обучении, он показал паритет с настройками vLLM по доле нарушений SLO; доверительные интервалы прироста пропускной способности и goodput включали ноль. Хвостовая задержка TTFT оказалась хуже, чем у конфигурации по умолчанию. Лицензия — Apache-2.0.

Сценарии применения

  • офлайн-ранжирование настроек vLLM перед запуском сервера
  • подбор конфигурации vLLM по длине промпта и бюджету генерации
  • сравнение вариантов лимитов параллельных последовательностей и токенов батча
  • оценка настроек кэширования общего префикса для синтетических нагрузок

Ограничения

На тестовых сценариях модель не показала подтверждённого улучшения относительно настроек vLLM по умолчанию, а хвостовая задержка TTFT была хуже. Проверялась только на синтетических нагрузках, одной B200 и известных во время обучения моделях Qwen3; переносимость на другие модели, оборудование и реальные нагрузки не установлена.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Thaki-MemoryPolicy-vLLM-Ranker

🇰🇷 Korean card: MODEL_CARD.ko.md

Engineering blog: Can a 10K-Parameter Ranker Pick Better vLLM Settings Than the Defaults? (한국어: 블로그)

Research Preview · Offline Policy Ranker · not a production serving policy.

A 10K-parameter listwise ranker that picks one of 15 vLLM serving configurations (--max-num-seqs, --max-num-batched-tokens, --gpu-memory-utilization, prefix caching on/off) for a given model and workload, offline, before any server is started. It only reads facts that are known ahead of time: model architecture, prompt length, the max_new_tokens budget, the prefix-share ratio the workload is designed with, and concurrency.

Status: research preview. No significant improvement over vLLM's default configuration. The test covers 16 scenarios: Qwen3-1.7B and Qwen3-4B (both models also appear in training) on two workload families never used in training (agent, codeassist), concurrency 4–256, one B200 GPU. This measures generalisation to unseen workloads on known models, not to new models. On these scenarios SLO-violation rate is 0.25 for both the ranker and the default config (Δ 0.0, 95% CI [0, 0]). Goodput is +26.0 tok/s observed (bootstrap mean +26.6, 95% CI [−17.0, +77.7]), throughput is +19.0 tok/s (bootstrap mean +20.4, CI [−82.8, +119.9]). Neither CI excludes zero. All six pre-registered gates passed, but the gates require "not worse than default", so passing them here means parity, not improvement. The tail is worse: the 95th percentile of per-scenario p95 TTFT is 12.99 s vs 10.78 s for the default. Evaluation is offline only: every candidate was measured on its own fresh server, and switching configurations on a live server was never tested. Results from an earlier leaky version (v1) are invalid and are not used as evidence anywhere in this card.

0. How to use

from huggingface_hub import snapshot_download
import sys
path = snapshot_download("ThakiCloud/Thaki-MemoryPolicy-vLLM-Ranker")
sys.path.insert(0, path)
from memorypolicy import MemoryPolicy, arch_from_hf_config

mp = MemoryPolicy(path)
arch = arch_from_hf_config("/models/Qwen3-4B/config.json", weight_bytes=8.05e9)  # total *.safetensors bytes
print(mp.recommend(arch, prompt_len=3000, output_budget=256, prefix_share_spec=0.9, concurrency=64))
# {'config_id': 's512_b8192_g85', 'vllm_args': {'--max-num-seqs': 512, '--max-num-batched-tokens': 8192,
#   '--gpu-memory-utilization': 0.85, '--enable-prefix-caching': True}}

python memorypolicy.py prints recommendations for an illustrative 4B-class architecture. mp.scores(...) returns the ranker score for every candidate. Dependencies: torch, safetensors, numpy. Inference takes about 0.15 ms on CPU.

Input contract:

InputMeaningMust be
archweight size (GB), layers, hidden size, KV bytes per tokenfrom the model's config and file sizes
prompt_lenprompt tokens per requestthe designed length
output_budgetgenerated tokens per requestthe pre-specified max_new_tokens
prefix_share_specshare of the prompt common across requeststhe ratio your workload is built with, not a measured cache hit rate
concurrencyconcurrent requests4–256 was covered

1. What it was trained on

We ran a private vLLM 0.28 server per job on one B200 and swept 15 configurations × 6 synthetic workload families × 4 concurrency levels × 4 models (Qwen3-0.6B, 1.7B, 4B, 8B). That gives 1,440 measured cells, with no missing cells and no duplicates. Prompts are random token-id sequences with a fixed shared prefix. Each request generates exactly its budget (min_tokens = max_tokens, EOS ignored). No production traffic, no user prompts and no operational logs were used, and no shared serving endpoint was loaded.

SplitWorkload familiesModelsScenarios
trainchat (512→256), rag (6000→128, prefix 0.7), longgen (256→1024)all 448
dev (model selection)summarize (12000→256, prefix 0.1)all 416
test (evaluated once)agent (3000→256, prefix 0.9), codeassist (1500→512, prefix 0.5)1.7B, 4B16

Splits are at the scenario level. Feature normalisation statistics come from train only. An earlier run (v1) on the 8B/0.6B test scenarios fed the model post-run metrics from the default config (KV usage, queue length, prefix hit rate, TTFT/TPOT, SLO pass flag). That leaked the answer, so we discarded v1 and its test was not reused. For this version the training code refuses to run unless no forbidden field is an input and the state vector is identical across all 15 candidates of a scenario. That check passed.

Training: utility = throughput / scenario best if the config met the SLO, else −1; ListNet loss (softmax temperature 0.1), MLP 12→128→64→1, AdamW, 400 epochs, seed 0. SLO: p95 TTFT ≤ 3 s, p95 TPOT ≤ 60 ms, error rate ≤ 1%, server started.

2. Results

Dev (summarize, used to choose between the LightGBM and MLP policies; carries selection optimism):

PolicySLO violationFailureGoodput tok/sRegret vs oracle
vLLM default0.56250.3755930.194
Heuristic0.5000.1256820.024
LightGBM (classifier + regressor)0.3750.00010490.0091
This model (MLP ranker)0.3750.00010540.0063

The MLP was selected on dev by (violation rate, regret).

Test, evaluated once (16 scenarios; workload families not seen in training, on models 1.7B and 4B that were in training):

PolicySLO violationFailureMean tok/sGoodput tok/sThroughput ratio (both SLO-ok)p95 of per-scenario p95 TTFT
vLLM default0.2500.000948353431.00010.78 s
Heuristic0.2500.000817240900.76513.11 s
LightGBM (not selected)0.18750.000858058110.97710.43 s
This model0.2500.000950253691.00512.99 s

Paired comparison against the default, bootstrap over scenarios, B = 2000:

MetricObserved ΔBootstrap mean Δ95% CI
SLO violation rate0.00.0[0, 0]
Throughput tok/s+19.0+20.4[−82.8, +119.9]
Goodput tok/s+26.0+26.6[−17.0, +77.7]

Pre-registered gates (all must hold): violation ≤ default ✅, violation CI upper ≤ 0 ✅, throughput ratio ≥ 1 ✅, goodput Δ ≥ 0 ✅, failure rate 0 ✅, reload parity 1.0 ✅.

3. What we measured but do not claim

The non-selected LightGBM policy had a lower test violation rate (0.1875) and higher goodput (5811) than this model. It was not chosen on dev, and swapping it in after seeing the test would be post-hoc selection, so this release ships the dev-selected MLP. The LightGBM boosters (lgbm_slo.txt, lgbm_tput.txt) are included only so the dev comparison can be reproduced. The test violation-rate CI of [0, 0] means the ranker and the default violated the SLO in exactly the same scenarios; it is not evidence of a reduction.

4. Limitations

  • No demonstrated gain over the default on held-out data. Use it as a parity baseline or a starting point. Do not use it as a tuner that is known to improve serving.
  • p95 TTFT tail is worse than the default on test (12.99 s vs 10.78 s).
  • Coverage: one B200 GPU, vLLM 0.28, the Qwen3 dense family from 0.6B to 8B, BF16 weights, concurrency 4–256, and the 15 listed configurations. Other GPUs, engine versions, quantized weights, MoE models or tensor parallelism are out of distribution.
  • Workloads are synthetic, with fixed-length outputs and a fixed prefix ratio. Real traffic has variable lengths and arrival bursts that were not modelled.
  • Small test set (16 scenarios), so the CIs are wide.
  • The test models (1.7B, 4B) were also in the training set. Behaviour on an unseen model is untested.
  • Offline evaluation only. No live configuration switching, no online A/B test.
  • Not adopted as a serving policy in any product; this release is for research.
  • The "regret vs oracle" metric can be negative on test because the oracle only counts SLO-meeting configurations. It is reported for dev only.

5. Files

FilePurpose
mlp_ranker.safetensorsranker weights (the released policy)
config.jsoncandidate configurations, feature names and order, train-only normalisation, SLO, forbidden inputs
memorypolicy.pyinference code
lgbm_slo.txt, lgbm_tput.txtLightGBM baseline boosters (dev comparison only)
eval_summary.jsonaggregate dev/test metrics, gates, weight SHA-256

No training rows, benchmark rows, prompts or serving logs are published.

6. License

Apache-2.0 covers the weights, config.json and memorypolicy.py, all written and trained by ThakiCloud. The measured Qwen3 models (Apache-2.0) are not redistributed; only their public architecture numbers enter as features. The workloads are synthetic token sequences, so no third-party dataset is involved. LightGBM (MIT) and PyTorch (BSD-3) are runtime dependencies, not bundled.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch

Нельзя запустить

Табличные модели пока не поддерживаются рантаймом.

Ревизия весов
3bed238

0 моделей