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
Мультимодальность починена: зрительная башня переведена в FP8
Browse filesКартинка убивала движок: cuFuncSetAttribute -> CUDA_ERROR_INVALID_VALUE в
humming_gemm. Слои зрения были квантованы целочисленным pack-quantized с
группой 16, а на Blackwell её принимает только ядро humming, которое там не
запускается. Остальные отказываются: Marlin берёт -1/32/64/128, Conch -1/128,
Machete и CUTLASS требуют Hopper, AllSpark не знает sm_120.
Просто перейти на группу 128 нельзя: у linear_fc2 вход 4304 = 16 x 269.
Лестница схем, замерено на живой карте:
int g16 (было) 331 МБ — движок падает
NVFP4 g16 254 МиБ — жив, ответ мусор
FP8 поканально 445 МиБ — РАБОТАЕТ
BF16 879 МиБ — работает, подробнее
Выбран FP8: вдвое дешевле BF16 при верном ответе. Модель описывает картинку:
'LOMONOSOV ZENIT logo with a stylized emblem and text on a dark background'.
Миллион при этом сохраняется — проверено сквозным прогоном без флагов на
пустой 5090: веса 16.31 ГиБ, кэш 1 017 164 токена, выбрано окно 1 010 001,
модель отвечает.
- config.json +25 -58
- model-vision.safetensors +2 -2
- model.safetensors.index.json +0 -0
|
@@ -261,74 +261,41 @@
|
|
| 261 |
"zp_dtype": null
|
| 262 |
}
|
| 263 |
},
|
| 264 |
-
"
|
| 265 |
-
"format": "
|
| 266 |
-
"input_activations": null,
|
| 267 |
-
"output_activations": null,
|
| 268 |
"targets": [
|
|
|
|
| 269 |
"re:^model\\.visual\\.blocks\\.\\d+\\.attn\\.(?:qkv|proj)$",
|
| 270 |
-
"re:^visual\\.blocks\\.\\d+\\.
|
|
|
|
|
|
|
|
|
|
| 271 |
],
|
| 272 |
"weights": {
|
| 273 |
-
"actorder": null,
|
| 274 |
-
"block_structure": null,
|
| 275 |
-
"dynamic": false,
|
| 276 |
-
"group_size": 16,
|
| 277 |
"num_bits": 8,
|
| 278 |
-
"
|
| 279 |
-
"observer_kwargs": {},
|
| 280 |
-
"scale_dtype": null,
|
| 281 |
-
"strategy": "group",
|
| 282 |
"symmetric": true,
|
| 283 |
-
"
|
| 284 |
-
"
|
| 285 |
-
}
|
| 286 |
-
},
|
| 287 |
-
"vision_mlp_w4a16_g128": {
|
| 288 |
-
"format": "pack-quantized",
|
| 289 |
-
"input_activations": null,
|
| 290 |
-
"output_activations": null,
|
| 291 |
-
"targets": [
|
| 292 |
-
"re:^model\\.visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$",
|
| 293 |
-
"re:^visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$"
|
| 294 |
-
],
|
| 295 |
-
"weights": {
|
| 296 |
-
"actorder": null,
|
| 297 |
-
"block_structure": null,
|
| 298 |
"dynamic": false,
|
| 299 |
-
"
|
| 300 |
-
"num_bits": 4,
|
| 301 |
-
"observer": "memoryless_minmax",
|
| 302 |
"observer_kwargs": {},
|
| 303 |
-
"scale_dtype": null,
|
| 304 |
-
"strategy": "group",
|
| 305 |
-
"symmetric": true,
|
| 306 |
-
"type": "int",
|
| 307 |
-
"zp_dtype": null
|
| 308 |
-
}
|
| 309 |
-
},
|
| 310 |
-
"vision_mlp_w4a16_g16": {
|
| 311 |
-
"format": "pack-quantized",
|
| 312 |
-
"input_activations": null,
|
| 313 |
-
"output_activations": null,
|
| 314 |
-
"targets": [
|
| 315 |
-
"re:^model\\.visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$",
|
| 316 |
-
"re:^visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$"
|
| 317 |
-
],
|
| 318 |
-
"weights": {
|
| 319 |
"actorder": null,
|
| 320 |
-
"block_structure": null
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
"num_bits":
|
| 324 |
-
"
|
| 325 |
-
"observer_kwargs": {},
|
| 326 |
-
"scale_dtype": null,
|
| 327 |
-
"strategy": "group",
|
| 328 |
"symmetric": true,
|
| 329 |
-
"
|
| 330 |
-
"
|
| 331 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
}
|
| 333 |
},
|
| 334 |
"format": "mixed-precision",
|
|
|
|
| 261 |
"zp_dtype": null
|
| 262 |
}
|
| 263 |
},
|
| 264 |
+
"vision_fp8": {
|
| 265 |
+
"format": "float-quantized",
|
|
|
|
|
|
|
| 266 |
"targets": [
|
| 267 |
+
"re:^model\\.visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$",
|
| 268 |
"re:^model\\.visual\\.blocks\\.\\d+\\.attn\\.(?:qkv|proj)$",
|
| 269 |
+
"re:^model\\.visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$",
|
| 270 |
+
"re:^visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$",
|
| 271 |
+
"re:^visual\\.blocks\\.\\d+\\.attn\\.(?:qkv|proj)$",
|
| 272 |
+
"re:^visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$"
|
| 273 |
],
|
| 274 |
"weights": {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
"num_bits": 8,
|
| 276 |
+
"type": "float",
|
|
|
|
|
|
|
|
|
|
| 277 |
"symmetric": true,
|
| 278 |
+
"strategy": "channel",
|
| 279 |
+
"group_size": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
"dynamic": false,
|
| 281 |
+
"observer": "minmax",
|
|
|
|
|
|
|
| 282 |
"observer_kwargs": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
"actorder": null,
|
| 284 |
+
"block_structure": null
|
| 285 |
+
},
|
| 286 |
+
"input_activations": {
|
| 287 |
+
"num_bits": 8,
|
| 288 |
+
"type": "float",
|
|
|
|
|
|
|
|
|
|
| 289 |
"symmetric": true,
|
| 290 |
+
"strategy": "token",
|
| 291 |
+
"group_size": null,
|
| 292 |
+
"dynamic": true,
|
| 293 |
+
"observer": null,
|
| 294 |
+
"observer_kwargs": {},
|
| 295 |
+
"actorder": null,
|
| 296 |
+
"block_structure": null
|
| 297 |
+
},
|
| 298 |
+
"output_activations": null
|
| 299 |
}
|
| 300 |
},
|
| 301 |
"format": "mixed-precision",
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06410afac298f1d1efadbbd34855e5233180d1c37faae662f3449ef7c4ff24ec
|
| 3 |
+
size 466737968
|
|
The diff for this file is too large to render.
See raw diff
|
|
|