vllm.models.inkling2
¶
Inkling2: platform-specific implementations live under nvidia/; configs,
processing, quantization metadata and the DSpark speculator are shared.
Modules:
-
configs–Inkling2 model configs.
-
nvidia– -
processing–Inkling2 image preprocessing and vLLM multimodal processing.
-
quant_config–Per-tensor precision metadata of Inkling2 checkpoints (hf_quant_config.json).
-
speculator–DSpark speculator for the Inkling2 draft: stores the raw target features
Classes:
-
Inkling2DSparkModel–DSpark draft for Inkling2; plugged in by
Inkling2DSparkSpeculator. -
Inkling2LoopForConditionalGeneration–The
inkling2_loopcheckpoints' architecture name; the model is
Inkling2DSparkModel
¶
Bases: Module
DSpark draft for Inkling2; plugged in by Inkling2DSparkSpeculator.
Methods:
-
attach_target–Finish sharing the target's normalized embeddings and LM head (its
-
compute_base_logits–TP-local bf16 base logits (bf16 GEMM, as the reference).
-
compute_f_rnn–Recurrent-head context from the last committed token's features.
-
markov_argmax–markov_logits(...).argmax(-1), NaN as -inf. -
markov_logits–Full-vocab softcapped logits.
-
markov_step–Advance the recurrent head; return the state and TP-local bias.
-
refresh_derived_weights–Re-derive, in place, the weights computed from the target's LM head
Source code in vllm/models/inkling2/nvidia/dspark.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | |
attach_target(target_model)
¶
Finish sharing the target's normalized embeddings and LM head (its
embed_tokens and lm_head are aliased by load_dspark_model)
and derive the weights that depend on them.
Source code in vllm/models/inkling2/nvidia/dspark.py
compute_base_logits(hidden_states)
¶
TP-local bf16 base logits (bf16 GEMM, as the reference).
compute_f_rnn(features)
¶
Recurrent-head context from the last committed token's features.
markov_argmax(base_logits, bias)
¶
markov_logits(...).argmax(-1), NaN as -inf.
markov_logits(base_logits, bias)
¶
Full-vocab softcapped logits.
Source code in vllm/models/inkling2/nvidia/dspark.py
markov_step(state, prev_tokens, context)
¶
Advance the recurrent head; return the state and TP-local bias.
Source code in vllm/models/inkling2/nvidia/dspark.py
refresh_derived_weights()
¶
Re-derive, in place, the weights computed from the target's LM head and the draft's own weights; called again after the target's weights are replaced (reload, RL weight transfer).
Source code in vllm/models/inkling2/nvidia/dspark.py
Inkling2LoopForConditionalGeneration
¶
Bases: Inkling2ForConditionalGeneration
The inkling2_loop checkpoints' architecture name; the model is
Inkling2ForConditionalGeneration with an Inkling2LoopModel.