Instructions to use Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV", trust_remote_code=True, device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV
- SGLang
How to use Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV with Docker Model Runner:
docker model run hf.co/Ddavidich/LOMONOSOV-ZENIT-27B-1M-INDEV
Новые планы позиций во всех трёх профилях: от четырёх до десяти закладок
Browse filesПланы позиций заменены, для каждого профиля свой, и кривая переснята на них же — на той же карте, том же корпусе и той же пробой, что и прежняя.
токенов было стало
34 140 87.5% 87.5% план на этой длине не активен
101 140 79.2% 91.7%
201 140 66.7% 87.5%
263 140 60.4% 68.8%
401 140 58.3% 77.1%
1 006 140 2.1% 18.8%
На 201 140 токенах модель теперь держит столько же, сколько на 34 140. Прежний спад на этом промежутке выглядел свойством модели, а оказался в основном свойством плана: его ступени начинались с 196 608 и почти нигде не работали.
Планы не подобраны, а выведены. Перебор старта средней полосы частот (пары 15–21) на 401 140 дал однозначный внутренний оптимум по фазе крайней пары: 0.739 → 31/48, 0.805 → 34/48, 0.872 → 37/48, 0.938 → 33/48, прежний план 1.071 → 28/48 при обученном пределе 1.063. У каждого профиля план проверен на своё окно: отображённая позиция последнего токена остаётся внутри обученных 262 144, и на коротких промптах ступени не срабатывают вовсе.
Миллион вдевятеро лучше и всё равно не окно поиска: девять закладок из сорока восьми, вторая половина почти пуста, потому что за 212 000 шестнадцать соседних токенов делят одну позицию. В карточке это сказано прямо.
Также: проверка обученного диапазона теперь сверяется с окном обслуживания, а не с длиной таблицы углов — при mrope та вчетверо шире и давала ложную тревогу на любом плане. Окно сообщает профиль.
Сквозной прогон на релизе с новыми планами: движок 37.6 с, ответ получен, жалоб на выход за обученный диапазон ноль.
- README.md +76 -52
- config.json +12 -15
- custom_generate/positional_extension.py +21 -1
- custom_generate/serving_profiles.py +5 -0
- receipts/release_smoke_new_position_plans.json +7 -0
|
@@ -60,23 +60,23 @@ model-index:
|
|
| 60 |
verified: false
|
| 61 |
- type: accuracy
|
| 62 |
name: Retrieval at 101,140 tokens (48 needles)
|
| 63 |
-
value:
|
| 64 |
verified: false
|
| 65 |
- type: accuracy
|
| 66 |
name: Retrieval at 201,140 tokens (48 needles)
|
| 67 |
-
value:
|
| 68 |
verified: false
|
| 69 |
- type: accuracy
|
| 70 |
name: Retrieval at 263,140 tokens (48 needles, 3 runs)
|
| 71 |
-
value:
|
| 72 |
verified: false
|
| 73 |
- type: accuracy
|
| 74 |
-
name: Retrieval at 401,140 tokens (48 needles)
|
| 75 |
-
value:
|
| 76 |
verified: false
|
| 77 |
- type: accuracy
|
| 78 |
name: Retrieval at 1,006,140 tokens (48 needles)
|
| 79 |
-
value:
|
| 80 |
verified: false
|
| 81 |
- task:
|
| 82 |
type: text-generation
|
|
@@ -462,14 +462,14 @@ them returned 9/14 and 7/14. Those numbers are gone, not adjusted — a differen
|
|
| 462 |
instrument is not a correction of the same figure. Method:
|
| 463 |
`PROBE_NONDETERMINISM_FINDING.md`.
|
| 464 |
|
| 465 |
-
| context | needles found | runs | first half | second half |
|
| 466 |
-
|---:|---:|---:|---:|---:|
|
| 467 |
-
| 34,140 | 42/48 = **87.5%** | 3, identical | 66/72 | 60/72 |
|
| 468 |
-
| 101,140 |
|
| 469 |
-
| 201,140 |
|
| 470 |
-
| 263,140 |
|
| 471 |
-
| 401,140 |
|
| 472 |
-
| 1,006,140 |
|
| 473 |
|
| 474 |
Rented RTX 5090, three-bit KV, the shipped position plan. Where a row was run
|
| 475 |
three times the count came out **identical every time** — on one machine and one
|
|
@@ -477,21 +477,34 @@ arena this probe reproduces exactly, which is a stronger statement than any erro
|
|
| 477 |
bar. Rows run once are marked once. Between *different* machines the same plan can
|
| 478 |
differ by up to four needles, so the host is named on purpose.
|
| 479 |
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 495 |
|
| 496 |
Needle density is not constant across rows: the corpus holds 48 needles at every
|
| 497 |
length, so it is 140.6 facts per 100K tokens at 34,140 and 12.0 at 401,140. Length
|
|
@@ -1276,14 +1289,14 @@ RTX 4090: 32 768 токенов за 38 с (861 т/с).
|
|
| 1276 |
числа не поправлены, а убраны — другой инструмент это не уточнение той же
|
| 1277 |
величины. Метод: `PROBE_NONDETERMINISM_FINDING.md`.
|
| 1278 |
|
| 1279 |
-
| контекст | найдено закладок | прогонов | первая половина | вторая |
|
| 1280 |
-
|---:|---:|---:|---:|---:|
|
| 1281 |
-
| 34 140 | 42/48 = **87.5%** | 3, совпали | 66/72 | 60/72 |
|
| 1282 |
-
| 101 140 |
|
| 1283 |
-
| 201 140 |
|
| 1284 |
-
| 263 140 |
|
| 1285 |
-
| 401 140 |
|
| 1286 |
-
| 1 006 140 |
|
| 1287 |
|
| 1288 |
Арендованная RTX 5090, трёхбитный кэш, отгружаемый план позиций. Там, где строка
|
| 1289 |
снята трижды, счёт совпал **точно во всех прогонах** — на одной машине и одной
|
|
@@ -1291,21 +1304,32 @@ RTX 4090: 32 768 токенов за 38 с (861 т/с).
|
|
| 1291 |
Одиночные прогоны помечены одиночными. Между **разными** машинами один и тот же
|
| 1292 |
план расходится до четырёх закладок, поэтому хост назван намеренно.
|
| 1293 |
|
| 1294 |
-
|
| 1295 |
-
|
| 1296 |
-
**
|
| 1297 |
-
|
| 1298 |
-
|
| 1299 |
-
|
| 1300 |
-
|
| 1301 |
-
|
| 1302 |
-
|
| 1303 |
-
|
| 1304 |
-
|
| 1305 |
-
|
| 1306 |
-
|
| 1307 |
-
|
| 1308 |
-
пре
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1309 |
|
| 1310 |
Плотность закладок по строкам не постоянна: их всегда сорок восемь, поэтому на
|
| 1311 |
34 140 это 140.6 факта на 100К токенов, а на 401 140 — 12.0. Длина и плотность в
|
|
|
|
| 60 |
verified: false
|
| 61 |
- type: accuracy
|
| 62 |
name: Retrieval at 101,140 tokens (48 needles)
|
| 63 |
+
value: 91.7
|
| 64 |
verified: false
|
| 65 |
- type: accuracy
|
| 66 |
name: Retrieval at 201,140 tokens (48 needles)
|
| 67 |
+
value: 87.5
|
| 68 |
verified: false
|
| 69 |
- type: accuracy
|
| 70 |
name: Retrieval at 263,140 tokens (48 needles, 3 runs)
|
| 71 |
+
value: 68.8
|
| 72 |
verified: false
|
| 73 |
- type: accuracy
|
| 74 |
+
name: Retrieval at 401,140 tokens (48 needles, 2 runs)
|
| 75 |
+
value: 77.1
|
| 76 |
verified: false
|
| 77 |
- type: accuracy
|
| 78 |
name: Retrieval at 1,006,140 tokens (48 needles)
|
| 79 |
+
value: 18.8
|
| 80 |
verified: false
|
| 81 |
- task:
|
| 82 |
type: text-generation
|
|
|
|
| 462 |
instrument is not a correction of the same figure. Method:
|
| 463 |
`PROBE_NONDETERMINISM_FINDING.md`.
|
| 464 |
|
| 465 |
+
| context | needles found | runs | first half | second half | previous plan |
|
| 466 |
+
|---:|---:|---:|---:|---:|---:|
|
| 467 |
+
| 34,140 | 42/48 = **87.5%** | 3, identical | 66/72 | 60/72 | 87.5% *(plan inactive)* |
|
| 468 |
+
| 101,140 | 44/48 = **91.7%** | 1 | 22/24 | 22/24 | 79.2% |
|
| 469 |
+
| 201,140 | 42/48 = **87.5%** | 1 | 20/24 | 22/24 | 66.7% |
|
| 470 |
+
| 263,140 | 33/48 = **68.8%** | 3, identical | 51/72 | 48/72 | 60.4% |
|
| 471 |
+
| 401,140 | 37/48 = **77.1%** | 2, identical | 34/48 | 40/48 | 58.3% |
|
| 472 |
+
| 1,006,140 | 9/48 = **18.8%** | 1 | 8/24 | 1/24 | 2.1% |
|
| 473 |
|
| 474 |
Rented RTX 5090, three-bit KV, the shipped position plan. Where a row was run
|
| 475 |
three times the count came out **identical every time** — on one machine and one
|
|
|
|
| 477 |
bar. Rows run once are marked once. Between *different* machines the same plan can
|
| 478 |
differ by up to four needles, so the host is named on purpose.
|
| 479 |
|
| 480 |
+
The rightmost column is the plan this model shipped with until 2026-07-26. The
|
| 481 |
+
position plans were replaced that day, per profile, and the gain is **four to ten
|
| 482 |
+
needles wherever the plan is active**. Both columns are the same corpus, the same
|
| 483 |
+
machine, the same probe; only the position plan differs.
|
| 484 |
+
|
| 485 |
+
Three things this table says.
|
| 486 |
+
|
| 487 |
+
**Retention does not fall with length the way the old curve suggested.** At
|
| 488 |
+
201,140 tokens the model now holds 87.5% — the same as at 34,140. The earlier
|
| 489 |
+
decline from 87.5% to 66.7% across that span looked like a property of the model;
|
| 490 |
+
most of it was a property of the position plan, whose stages started at 196,608
|
| 491 |
+
and so did nothing over most of that range. The new plan for that window
|
| 492 |
+
compresses the middle frequency band from 65,536 onward.
|
| 493 |
+
|
| 494 |
+
**The million is still not a retrieval window,** even at nine times the old score.
|
| 495 |
+
Nine needles out of forty-eight. Treat the million as a prefill and throughput
|
| 496 |
+
capability — the model does ingest 1,006,140 tokens and answer — but do not expect
|
| 497 |
+
it to find a fact you planted in the middle. The plan that reaches 18.8% divides
|
| 498 |
+
positions by sixteen beyond 212,000, which is why its second half is nearly empty:
|
| 499 |
+
sixteen adjacent tokens share one position out there, and nothing distinguishes
|
| 500 |
+
them.
|
| 501 |
+
|
| 502 |
+
**One row of the table is measured just outside its own window.** The 263,140
|
| 503 |
+
corpus is about a thousand tokens past the 262,144 window of the `long_262k`
|
| 504 |
+
profile, whose plan has no all-pairs stage; beyond 262,144 the uncompressed pairs
|
| 505 |
+
leave the trained range. A prompt that stops at the window itself sits on the
|
| 506 |
+
boundary rather than past it. The row is reported as measured, and this is why it
|
| 507 |
+
dips below its neighbours.
|
| 508 |
|
| 509 |
Needle density is not constant across rows: the corpus holds 48 needles at every
|
| 510 |
length, so it is 140.6 facts per 100K tokens at 34,140 and 12.0 at 401,140. Length
|
|
|
|
| 1289 |
числа не поправлены, а убраны — другой инструмент это не уточнение той же
|
| 1290 |
величины. Метод: `PROBE_NONDETERMINISM_FINDING.md`.
|
| 1291 |
|
| 1292 |
+
| контекст | найдено закладок | прогонов | первая половина | вторая | прежний план |
|
| 1293 |
+
|---:|---:|---:|---:|---:|---:|
|
| 1294 |
+
| 34 140 | 42/48 = **87.5%** | 3, совпали | 66/72 | 60/72 | 87.5% *(план не активен)* |
|
| 1295 |
+
| 101 140 | 44/48 = **91.7%** | 1 | 22/24 | 22/24 | 79.2% |
|
| 1296 |
+
| 201 140 | 42/48 = **87.5%** | 1 | 20/24 | 22/24 | 66.7% |
|
| 1297 |
+
| 263 140 | 33/48 = **68.8%** | 3, совпали | 51/72 | 48/72 | 60.4% |
|
| 1298 |
+
| 401 140 | 37/48 = **77.1%** | 2, совпали | 34/48 | 40/48 | 58.3% |
|
| 1299 |
+
| 1 006 140 | 9/48 = **18.8%** | 1 | 8/24 | 1/24 | 2.1% |
|
| 1300 |
|
| 1301 |
Арендованная RTX 5090, трёхбитный кэш, отгружаемый план позиций. Там, где строка
|
| 1302 |
снята трижды, счёт совпал **точно во всех прогонах** — на одной машине и одной
|
|
|
|
| 1304 |
Одиночные прогоны помечены одиночными. Между **разными** машинами один и тот же
|
| 1305 |
план расходится до четырёх закладок, поэтому хост назван намеренно.
|
| 1306 |
|
| 1307 |
+
Крайний правый столбец — план, с которым модель отгружалась до 26.07.2026. В тот
|
| 1308 |
+
день планы позиций заменены, для каждого профиля свой, и прибавка составила
|
| 1309 |
+
**от четырёх до десяти закладок везде, где план работает**. Оба столбца сняты на
|
| 1310 |
+
одном корпусе, одной машине и одной пробой; различается только план.
|
| 1311 |
+
|
| 1312 |
+
Три вещи, которые говорит эта таблица.
|
| 1313 |
+
|
| 1314 |
+
**Удержание падает с длиной не так, как показывала прежняя кривая.** На 201 140
|
| 1315 |
+
токенах модель держит 87.5% — столько же, сколько на 34 140. Прежний спад с 87.5%
|
| 1316 |
+
до 66.7% на этом промежутке выглядел свойством модели; в основном он оказался
|
| 1317 |
+
свойством плана, чьи ступени начинались с 196 608 и на большей части промежутка
|
| 1318 |
+
не делали ничего. Новый план для этого окна сжимает среднюю полосу частот начиная
|
| 1319 |
+
с 65 536.
|
| 1320 |
+
|
| 1321 |
+
**Миллион по-прежнему не окно поиска**, даже вдевятеро лучше прежнего. Девять
|
| 1322 |
+
закладок из сорока восьми. Считайте миллион возможностью префилла и пропускной
|
| 1323 |
+
способности: модель действительно принимает 1 006 140 токенов и отвечает, но не
|
| 1324 |
+
ждите, что она найдёт факт, положенный в середину. План, дающий 18.8%, делит
|
| 1325 |
+
позиции на шестнадцать за отметкой 212 000 — оттого его вторая половина почти
|
| 1326 |
+
пуста: там шестнадцать соседних токенов делят одну позицию, и различить их нечем.
|
| 1327 |
+
|
| 1328 |
+
**Одна строка таблицы снята чуть за пределами своего окна.** Корпус на 263 140
|
| 1329 |
+
примерно на тысячу токенов длиннее окна 262 144 профиля `long_262k`, у плана
|
| 1330 |
+
которого нет ступени на все пары; за 262 144 несжатые пары выходят из обученного
|
| 1331 |
+
диапазона. Промпт, останавливающийся ровно на окне, стоит на границе, а не за
|
| 1332 |
+
ней. Строка приведена как снята, и провал в ней объясняется этим.
|
| 1333 |
|
| 1334 |
Плотность закладок по строкам не постоянна: их всегда сорок восемь, поэтому на
|
| 1335 |
34 140 это 140.6 факта на 100К токенов, а на 401 140 — 12.0. Длина и плотность в
|
|
@@ -57,18 +57,13 @@
|
|
| 57 |
"position_plan": {
|
| 58 |
"stages": [
|
| 59 |
{
|
| 60 |
-
"from":
|
| 61 |
"group": 2,
|
| 62 |
"first_pair": 15,
|
| 63 |
"last_pair": 21
|
| 64 |
-
},
|
| 65 |
-
{
|
| 66 |
-
"from": 262144,
|
| 67 |
-
"group": 4,
|
| 68 |
-
"first_pair": 0,
|
| 69 |
-
"last_pair": 31
|
| 70 |
}
|
| 71 |
-
]
|
|
|
|
| 72 |
}
|
| 73 |
},
|
| 74 |
"long_393k": {
|
|
@@ -87,18 +82,19 @@
|
|
| 87 |
"position_plan": {
|
| 88 |
"stages": [
|
| 89 |
{
|
| 90 |
-
"from":
|
| 91 |
"group": 2,
|
| 92 |
"first_pair": 15,
|
| 93 |
"last_pair": 21
|
| 94 |
},
|
| 95 |
{
|
| 96 |
-
"from":
|
| 97 |
"group": 4,
|
| 98 |
"first_pair": 0,
|
| 99 |
"last_pair": 31
|
| 100 |
}
|
| 101 |
-
]
|
|
|
|
| 102 |
}
|
| 103 |
},
|
| 104 |
"raw_1010k": {
|
|
@@ -116,18 +112,19 @@
|
|
| 116 |
"position_plan": {
|
| 117 |
"stages": [
|
| 118 |
{
|
| 119 |
-
"from":
|
| 120 |
"group": 2,
|
| 121 |
"first_pair": 15,
|
| 122 |
"last_pair": 21
|
| 123 |
},
|
| 124 |
{
|
| 125 |
-
"from":
|
| 126 |
-
"group":
|
| 127 |
"first_pair": 0,
|
| 128 |
"last_pair": 31
|
| 129 |
}
|
| 130 |
-
]
|
|
|
|
| 131 |
},
|
| 132 |
"provenance": "The arena is deliberately larger than the window. Pinning it to exactly 1,010,001 tokens - which is what the earlier profile did - leaves the scheduler no free blocks, and vLLM's engine loop then spends 69 to 72 per cent of its wall clock in an idle branch with the GPU at 13 to 21 per cent. The trigger was isolated by a controlled pair at 262,144 tokens: a roomy arena gave 147.9 s at 99 per cent GPU, an arena sized exactly to the window was still running after 385 s at 0 per cent. With spare blocks the full million-token prefill runs at 54 to 99 per cent utilisation. Chunk 1024 is the largest that fits beside this arena; 8192 and 16384 run out of memory during vLLM's profiling forward pass. Чанк 4096, не 1024: измерено 1318 с против 1558 на миллионе (на 15% быстрее) и это минимум, при котором vLLM разрешает prefix caching — при меньшем чанке срабатывает ассерт выравнивания mamba-кэша (block_size 2064). Карта позиций: точные до 262 144, floor(p/4) за ними. Замерено на 1 005 334 токенах, четырнадцать закладок, одна машина: YaRN 0/14, floor(p/4) по всем парам 3/14, по медленным 2/14, floor(p/8) 2/14, floor(p/16) 1/14, зажим пар 22-31 0/14. Внутри обученного окна карта тождественна, поэтому короткий и средний запрос не теряет ничего по построению. Температура проверена и отвергнута: tau=1.2890 дала 2/14 против 3/14 без неё.",
|
| 133 |
"requires_free_bytes": 32344621711,
|
|
|
|
| 57 |
"position_plan": {
|
| 58 |
"stages": [
|
| 59 |
{
|
| 60 |
+
"from": 65536,
|
| 61 |
"group": 2,
|
| 62 |
"first_pair": 15,
|
| 63 |
"last_pair": 21
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
}
|
| 65 |
+
],
|
| 66 |
+
"measured": "Замерено 26.07.2026 на 263 140 токенах, 48 закладок, локальная RTX 5090: релизный план 30/48, эта полоса 35/48. Перебор старта полосы: 65 536 → 35/48 лучше, чем 166 867 → 29/48. Ступень начинается с 65 536, поэтому промпты короче этого не затронуты вовсе."
|
| 67 |
}
|
| 68 |
},
|
| 69 |
"long_393k": {
|
|
|
|
| 82 |
"position_plan": {
|
| 83 |
"stages": [
|
| 84 |
{
|
| 85 |
+
"from": 131072,
|
| 86 |
"group": 2,
|
| 87 |
"first_pair": 15,
|
| 88 |
"last_pair": 21
|
| 89 |
},
|
| 90 |
{
|
| 91 |
+
"from": 196608,
|
| 92 |
"group": 4,
|
| 93 |
"first_pair": 0,
|
| 94 |
"last_pair": 31
|
| 95 |
}
|
| 96 |
+
],
|
| 97 |
+
"measured": "Замерено 26.07.2026 на 401 140 токенах, 48 закладок, арендованная RTX 5090: релизный план 28/48, эта карта 37/48 (снято дважды). Перебор старта полосы дал внутренний оптимум: 65 536 → 31/48, 98 304 → 34/48, 131 072 → 37/48, 163 840 → 33/48. Вторая ступень нужна, чтобы отображённая позиция последнего токена окна осталась внутри обученных 262 144 (f = 247 741)."
|
| 98 |
}
|
| 99 |
},
|
| 100 |
"raw_1010k": {
|
|
|
|
| 112 |
"position_plan": {
|
| 113 |
"stages": [
|
| 114 |
{
|
| 115 |
+
"from": 118700,
|
| 116 |
"group": 2,
|
| 117 |
"first_pair": 15,
|
| 118 |
"last_pair": 21
|
| 119 |
},
|
| 120 |
{
|
| 121 |
+
"from": 212000,
|
| 122 |
+
"group": 16,
|
| 123 |
"first_pair": 0,
|
| 124 |
"last_pair": 31
|
| 125 |
}
|
| 126 |
+
],
|
| 127 |
+
"measured": "Замерено 26.07.2026 на 1 006 140 токенах, 48 закладок, арендованная RTX 5090: прежний план 1/48 = 2.1%, этот 9/48 = 18.8%. Прежний промахивался мимо обученного окна на 71% (последний токен уезжал в 447 858). Условие «влезть» P + (L-P)//g <= 262 144 при этой длине допускает только группу 8 или 16; группа 4 требовала бы верного префикса не больше 14 525. Здесь f = 261 633. ВАЖНО: 18.8% — это не окно поиска. Одна закладка из пяти. Миллион остаётся возможностью префилла, и в карточке это сказано прямо."
|
| 128 |
},
|
| 129 |
"provenance": "The arena is deliberately larger than the window. Pinning it to exactly 1,010,001 tokens - which is what the earlier profile did - leaves the scheduler no free blocks, and vLLM's engine loop then spends 69 to 72 per cent of its wall clock in an idle branch with the GPU at 13 to 21 per cent. The trigger was isolated by a controlled pair at 262,144 tokens: a roomy arena gave 147.9 s at 99 per cent GPU, an arena sized exactly to the window was still running after 385 s at 0 per cent. With spare blocks the full million-token prefill runs at 54 to 99 per cent utilisation. Chunk 1024 is the largest that fits beside this arena; 8192 and 16384 run out of memory during vLLM's profiling forward pass. Чанк 4096, не 1024: измерено 1318 с против 1558 на миллионе (на 15% быстрее) и это минимум, при котором vLLM разрешает prefix caching — при меньшем чанке срабатывает ассерт выравнивания mamba-кэша (block_size 2064). Карта позиций: точные до 262 144, floor(p/4) за ними. Замерено на 1 005 334 токенах, четырнадцать закладок, одна машина: YaRN 0/14, floor(p/4) по всем парам 3/14, по медленным 2/14, floor(p/8) 2/14, floor(p/16) 1/14, зажим пар 22-31 0/14. Внутри обученного окна карта тождественна, поэтому короткий и средний запрос не теряет ничего по построению. Температура проверена и отвергнута: tau=1.2890 дала 2/14 против 3/14 без неё.",
|
| 130 |
"requires_free_bytes": 32344621711,
|
|
@@ -78,6 +78,10 @@ CHUNK_POSITIONS = 262_144
|
|
| 78 |
TRAINED_POSITIONS = 262_144
|
| 79 |
ENV_TRAINED = "ZENIT_TRAINED_POSITIONS"
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
_installed = False
|
| 82 |
_original_compute = None
|
| 83 |
|
|
@@ -189,7 +193,20 @@ def check_trained_span(by_set: dict[tuple, list[int]], stages: list[dict],
|
|
| 189 |
trained = _read_int(ENV_TRAINED, TRAINED_POSITIONS)
|
| 190 |
if trained <= 0 or positions <= 0:
|
| 191 |
return []
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
complaints = []
|
| 194 |
for key, cols in sorted(by_set.items(), key=lambda kv: min(kv[1])):
|
| 195 |
if not key:
|
|
@@ -202,6 +219,9 @@ def check_trained_span(by_set: dict[tuple, list[int]], stages: list[dict],
|
|
| 202 |
line = (f"pairs {min(cols)}..{max(cols)}: f({last:,}) = {mapped:,}, "
|
| 203 |
f"beyond the trained {trained:,} by {over:,} "
|
| 204 |
f"({100.0 * over / trained:.0f}%)")
|
|
|
|
|
|
|
|
|
|
| 205 |
# Подсказка, а не догадка: при группе g последней ступени верный
|
| 206 |
# префикс P должен удовлетворять P + (L-P)//g <= trained.
|
| 207 |
if key:
|
|
|
|
| 78 |
TRAINED_POSITIONS = 262_144
|
| 79 |
ENV_TRAINED = "ZENIT_TRAINED_POSITIONS"
|
| 80 |
|
| 81 |
+
# Фактическое окно обслуживания. Выставляет `serving_profiles.apply_profile`;
|
| 82 |
+
# нужно только проверке `check_trained_span`, на построение таблицы не влияет.
|
| 83 |
+
ENV_WINDOW_HINT = "ZENIT_EFFECTIVE_MAX_MODEL_LEN"
|
| 84 |
+
|
| 85 |
_installed = False
|
| 86 |
_original_compute = None
|
| 87 |
|
|
|
|
| 193 |
trained = _read_int(ENV_TRAINED, TRAINED_POSITIONS)
|
| 194 |
if trained <= 0 or positions <= 0:
|
| 195 |
return []
|
| 196 |
+
# Сверяться надо с окном, а не с длиной таблицы. Замерено 26.07.2026: при
|
| 197 |
+
# mrope таблица строится на 4 040 004 позиции, то есть вчетверо шире окна
|
| 198 |
+
# 1 010 001, и первая редакция этой проверки жаловалась на ЛЮБОЙ план,
|
| 199 |
+
# включая верный (f(4 040 003) «за обученными на 1441%»). Ни один промпт до
|
| 200 |
+
# таких позиций не доходит: их занимают три секции mrope.
|
| 201 |
+
#
|
| 202 |
+
# Окно приходит из профиля через `ZENIT_EFFECTIVE_MAX_MODEL_LEN`. Если его
|
| 203 |
+
# нет — сверяемся по длине таблицы и говорим об этом в жалобе, чтобы
|
| 204 |
+
# завышенный процент нельзя было принять за настоящий.
|
| 205 |
+
window = _read_int(ENV_WINDOW_HINT)
|
| 206 |
+
by_table = window <= 0
|
| 207 |
+
if by_table:
|
| 208 |
+
window = positions
|
| 209 |
+
last = window - 1
|
| 210 |
complaints = []
|
| 211 |
for key, cols in sorted(by_set.items(), key=lambda kv: min(kv[1])):
|
| 212 |
if not key:
|
|
|
|
| 219 |
line = (f"pairs {min(cols)}..{max(cols)}: f({last:,}) = {mapped:,}, "
|
| 220 |
f"beyond the trained {trained:,} by {over:,} "
|
| 221 |
f"({100.0 * over / trained:.0f}%)")
|
| 222 |
+
if by_table:
|
| 223 |
+
line += ("; measured against the ROPE TABLE length, not the serving "
|
| 224 |
+
"window - set ZENIT_EFFECTIVE_MAX_MODEL_LEN for an exact check")
|
| 225 |
# Подсказка, а не догадка: при группе g последней ступени верный
|
| 226 |
# префикс P должен удовлетворять P + (L-P)//g <= trained.
|
| 227 |
if key:
|
|
@@ -343,6 +343,11 @@ def apply_profile(engine_args: Any, name: str, body: dict[str, Any]) -> list[str
|
|
| 343 |
from vllm.engine.arg_utils import EngineArgs
|
| 344 |
|
| 345 |
applied: list[str] = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 346 |
for field, sentinel in _FILLABLE:
|
| 347 |
if field not in body:
|
| 348 |
continue
|
|
|
|
| 343 |
from vllm.engine.arg_utils import EngineArgs
|
| 344 |
|
| 345 |
applied: list[str] = []
|
| 346 |
+
# Окно нужно проверке позиционного плана: она иначе сверяется с длиной
|
| 347 |
+
# таблицы углов, а та при mrope вчетверо шире окна и даёт ложную тревогу.
|
| 348 |
+
window = body.get("max_model_len") or getattr(engine_args, "max_model_len", None)
|
| 349 |
+
if window:
|
| 350 |
+
os.environ.setdefault("ZENIT_EFFECTIVE_MAX_MODEL_LEN", str(int(window)))
|
| 351 |
for field, sentinel in _FILLABLE:
|
| 352 |
if field not in body:
|
| 353 |
continue
|
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "zenit_vllm_smoke_v1",
|
| 3 |
+
"question": "не сломала ли правка config.json (auto_map) путь vLLM",
|
| 4 |
+
"engine_seconds": 37.6,
|
| 5 |
+
"generated": "<think>\n\n</think>\n\nДА",
|
| 6 |
+
"status": "PASS"
|
| 7 |
+
}
|