Documentation
¶
Overview ¶
Package blisvllm is a Go model of the vLLM inference engine's scheduling, KV-cache, connector and metrics behaviour, for a discrete-event simulator to call through the engine-neutral contract in github.com/inference-sim/blis-schemas/engine.
One build of this module models one vLLM release, Upstream. Its behaviour is checked against that release's own code in CI (see docs/testing.md): the same inputs, fed to the real vLLM classes in Python and to this module in Go, must make the same decisions step by step.
The simulator owns time. Nothing in this module reads a clock or starts a goroutine: every call carries the simulated instant as a value, and where a vLLM rule makes work wait until a later instant, the engine reports that instant through NextWake.
Index ¶
Constants ¶
const Kind = "vllm"
Kind is the engine kind this module registers with blis-schemas' engine factory.
const ModulePath = "github.com/inference-sim/blis-vllm"
ModulePath is this module's import path.
Variables ¶
var Upstream = UpstreamRelease{
Version: "0.32.0",
Tag: "v0.32.0",
Commit: "5df63a7203cdb9328d824a27b682e77c7b9928be",
}
Upstream identifies the vLLM release this build models.
Functions ¶
This section is empty.
Types ¶
type Provenance ¶
type Provenance struct {
EngineKind string `json:"engine_kind" yaml:"engine_kind"`
UpstreamVersion string `json:"upstream_version" yaml:"upstream_version"`
UpstreamCommit string `json:"upstream_commit" yaml:"upstream_commit"`
// Module is this module's version as the build recorded it: a release tag, or a
// pseudo-version naming the commit; "(devel)" in a build of this repository itself.
Module string `json:"module" yaml:"module"`
// Behaviour names the behaviour the engine executes: "vllm-0.32.0", or a compatibility
// behaviour a scenario selected (see Compat).
Behaviour string `json:"behaviour" yaml:"behaviour"`
}
Provenance is what a run must record to be reproduced: the engine kind, the upstream release it models and this module's own revision. A simulator writes it into its results beside the kernel's provenance.
func ProvenanceFor ¶
func ProvenanceFor(behaviour string) Provenance
ProvenanceFor returns the provenance of an engine executing behaviour.
type UpstreamRelease ¶
UpstreamRelease is one vLLM release.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
metricsmanifest
command
Command metricsmanifest lists every vllm:* metric family a vLLM release defines, from the release's own source, and writes it as docs/metrics-manifest.json with each family's class: exact (blis-vllm computes it from the decisions it makes), derived (it needs inputs the simulator supplies, such as time or transfer outcomes, and is reported given them) or unavailable (it needs real hardware, a process or a feature outside the simulation).
|
Command metricsmanifest lists every vllm:* metric family a vLLM release defines, from the release's own source, and writes it as docs/metrics-manifest.json with each family's class: exact (blis-vllm computes it from the decisions it makes), derived (it needs inputs the simulator supplies, such as time or transfer outcomes, and is reported given them) or unavailable (it needs real hardware, a process or a feature outside the simulation). |
|
provenance
command
Command provenance prints, as JSON, the Go side of a CI run's provenance: blis-vllm's identity as the build records it (blisvllm.ProvenanceFor), the commit the run checks, the Go toolchain and the platform.
|
Command provenance prints, as JSON, the Go side of a CI run's provenance: blis-vllm's identity as the build records it (blisvllm.ProvenanceFor), the commit the run checks, the Go toolchain and the platform. |
|
compat
|
|
|
build
Package build is the compatibility engine's configuration: it decodes and resolves the engine-side blocks of a scenario (its KV offload block, its engine and pools) and the command-line restatements of them, so the simulator hands them over unread (#2021 B2, B6).
|
Package build is the compatibility engine's configuration: it decodes and resolves the engine-side blocks of a scenario (its KV offload block, its engine and pools) and the command-line restatements of them, so the simulator hands them over unread (#2021 B2, B6). |
|
contract
Package contract puts the compatibility engine (compat/engine) behind blis-schemas' engine.Engine, the contract blis-vllm's v0.32.0 engine (core/vllm) implements, so a simulator drives every release through one driver (inference-sim GOAL.md phase 2c).
|
Package contract puts the compatibility engine (compat/engine) behind blis-schemas' engine.Engine, the contract blis-vllm's v0.32.0 engine (core/vllm) implements, so a simulator drives every release through one driver (inference-sim GOAL.md phase 2c). |
|
dplb
Package dplb is the compatibility engine's model of vLLM's internal data-parallel load balancer, the front-end rule that sends a request reaching a data-parallel replica's endpoint to one of its engine ranks.
|
Package dplb is the compatibility engine's model of vLLM's internal data-parallel load balancer, the front-end rule that sends a request reaching a data-parallel replica's endpoint to one of its engine ranks. |
|
engine
A data-parallel wave's continuation rule: whether a lockstep group runs another step.
|
A data-parallel wave's continuation rule: whether a lockstep group runs another step. |
|
internal/util
Package util provides generic utility functions shared across sim/ sub-packages.
|
Package util provides generic utility functions shared across sim/ sub-packages. |
|
kernelmodel
capacity.go derives the KV-block budget from the kernel's own memory methods.
|
capacity.go derives the KV-block budget from the kernel's own memory methods. |
|
kv
Package kv implements block-based KV cache management for the BLIS simulator.
|
Package kv implements block-based KV cache management for the BLIS simulator. |
|
kvkey
Package kvkey is the single gated home for KV cache block keying: deriving hierarchical content keys at a chosen stride, and interning those keys to compact integer handles.
|
Package kvkey is the single gated home for KV cache block keying: deriving hierarchical content keys at a chosen stride, and interning those keys to compact integer handles. |
|
kvtransfer
Package kvtransfer models vLLM's KV-offload I/O thread pool as a bounded priority queueing station with N servers per storage tier.
|
Package kvtransfer models vLLM's KV-offload I/O thread pool as a bounded priority queueing station with N servers per storage tier. |
|
lora
Package lora implements the LoRA (Low-Rank Adaptation) control-plane subsystem for BLIS: adapter identity, a pre-declared adapter registry (id → rank), a per-instance resident-adapter set with LRU eviction, and the three Digital-Twin adapter cost terms (cold-load latency, per-step compute overhead, HBM footprint).
|
Package lora implements the LoRA (Low-Rank Adaptation) control-plane subsystem for BLIS: adapter identity, a pre-declared adapter registry (id → rank), a per-instance resident-adapter set with LRU eviction, and the three Digital-Twin adapter cost terms (cold-load latency, per-step compute overhead, HBM footprint). |
|
nixl
Package nixl is the compatibility engine's model of vLLM's NIXL connector rules that a P/D simulator's cluster applies around a KV handoff: how long a prefill engine holds a finished request's KV for the decode side's pull (#1934, INV-PD-7).
|
Package nixl is the compatibility engine's model of vLLM's NIXL connector rules that a P/D simulator's cluster applies around a KV handoff: how long a prefill engine holds a finished request's KV for the decode side's pull (#1934, INV-PD-7). |
|
prefix
Package hash provides SHA256 hashing utilities for KV cache prefix matching and routing prefix affinity.
|
Package hash provides SHA256 hashing utilities for KV cache prefix matching and routing prefix affinity. |
|
tokenid
Package tokenid defines the simulator's compact token-ID type.
|
Package tokenid defines the simulator's compact token-ID type. |
|
vllmsettings
Package vllmsettings converts a vLLM engine block into the engine settings the kernel prices (blis-latency-kernel/enginesettings).
|
Package vllmsettings converts a vLLM engine block into the engine settings the kernel prices (blis-latency-kernel/enginesettings). |
|
core
|
|
|
connector/nixl
Package nixl is the scheduler side of vLLM's NIXL connector in its pull mode (NixlConnector = NixlPullConnector, vllm/distributed/kv_transfer/kv_connector/factory.py: 177-189@5df63a72): what the engine decides about a P/D request.
|
Package nixl is the scheduler side of vLLM's NIXL connector in its pull mode (NixlConnector = NixlPullConnector, vllm/distributed/kv_transfer/kv_connector/factory.py: 177-189@5df63a72): what the engine decides about a P/D request. |
|
engine
Package engine is vLLM's EngineCore over core/sched: the batch queue that keeps up to max_concurrent_batches batches in flight (step_with_batch_queue), the plain step() for a queue of one, and the data-parallel wave bookkeeping (DPEngineCoreProc's step counter, sync interval and prefill throttling).
|
Package engine is vLLM's EngineCore over core/sched: the batch queue that keeps up to max_concurrent_batches batches in flight (step_with_batch_queue), the plain step() for a queue of one, and the data-parallel wave bookkeeping (DPEngineCoreProc's step counter, sync interval and prefill throttling). |
|
kv
Package kv is vLLM's KV-cache bookkeeping: the block pool, its free queue, prefix-cache block hashing and the per-request block tables, for full-attention models.
|
Package kv is vLLM's KV-cache bookkeeping: the block pool, its free queue, prefix-cache block hashing and the per-request block tables, for full-attention models. |
|
metrics
Package metrics is vLLM's Prometheus stat logger for the vllm:* families whose values the scheduler alone decides (class "exact" in docs/metrics-manifest.json): request counts, KV usage, prefix-cache queries and hits, preemptions, prompt and generation tokens, finished requests by reason, and tokens per step.
|
Package metrics is vLLM's Prometheus stat logger for the vllm:* families whose values the scheduler alone decides (class "exact" in docs/metrics-manifest.json): request counts, KV usage, prefix-cache queries and hits, preemptions, prompt and generation tokens, finished requests by reason, and tokens per step. |
|
sched
Package sched is vLLM's v1 Scheduler: schedule() and update_from_output() for a full-attention model, with chunked prefill, the long-prefill cap, FCFS and priority policies, recompute preemption, prefix caching, speculative decoding (acceptance supplied) and the max_loras batch limit, and the AsyncScheduler's output placeholders and pipeline-parallel decode spacing (Config.Async).
|
Package sched is vLLM's v1 Scheduler: schedule() and update_from_output() for a full-attention model, with chunked prefill, the long-prefill cap, FCFS and priority policies, recompute preemption, prefix caching, speculative decoding (acceptance supplied) and the max_loras batch limit, and the AsyncScheduler's output placeholders and pipeline-parallel decode spacing (Config.Async). |
|
vllm
Package vllm is vLLM v0.32.0's engine behind blis-schemas' engine.Engine: core/sched's Scheduler, core/engine's batch queue and core/metrics' stat logger, driven by a simulator through the engine-neutral contract instead of by vLLM's EngineCore loop.
|
Package vllm is vLLM v0.32.0's engine behind blis-schemas' engine.Engine: core/sched's Scheduler, core/engine's batch queue and core/metrics' stat logger, driven by a simulator through the engine-neutral contract instead of by vLLM's EngineCore loop. |
|
kerneltests
|
|
|
cmd/bandprobe
command
Command bandprobe prices one step per line of a CSV and prints both band edges.
|
Command bandprobe prices one step per line of a CSV and prints both band edges. |
|
cmd/overlap-probe
command
Command overlap-probe answers one question: does the per-layer overlap term change the SHAPE of the concurrency response, or only its level?
|
Command overlap-probe answers one question: does the per-layer overlap term change the SHAPE of the concurrency response, or only its level? |
|
cmd/score
command
Command score reports how well the kernel predicts published measurements.
|
Command score reports how well the kernel predicts published measurements. |
|
cmd/shape
command
Command shape scores this kernel's concurrency response against NVIDIA's end-to-end accuracy snapshot, along AISimulate's own published error on the same points.
|
Command shape scores this kernel's concurrency response against NVIDIA's end-to-end accuracy snapshot, along AISimulate's own published error on the same points. |
|
cmd/worked-table
command
Command worked-table prints a worked step-time table, computed by the kernel itself from the committed catalog and registry.
|
Command worked-table prints a worked step-time table, computed by the kernel itself from the committed catalog and registry. |
|
internal/artifacttest
Package artifacttest holds the rule every test package uses to decide whether a failure to load a catalog or registry artifact is a skip or a failure.
|
Package artifacttest holds the rule every test package uses to decide whether a failure to load a catalog or registry artifact is a skip or a failure. |
|
internal/docgen
command
Command docgen writes the generated parts of the documentation into docs/generated/:
|
Command docgen writes the generated parts of the documentation into docs/generated/: |
|
internal/harness
Package harness holds what this repository's scoring and reporting commands share: opening a kernel from a scenario file, and building the batch shapes a comparison prices.
|
Package harness holds what this repository's scoring and reporting commands share: opening a kernel from a scenario file, and building the batch shapes a comparison prices. |
|
Package registry holds the vLLM entries of the KV-connector registry (blis-schemas spec/connector, inference-sim/inference-sim#2021 B10): which connector names a deployment may use, and which engine model in this module reproduces each.
|
Package registry holds the vLLM entries of the KV-connector registry (blis-schemas spec/connector, inference-sim/inference-sim#2021 B10): which connector names a deployment may use, and which engine model in this module reproduces each. |
|
Package rules holds the vLLM rules packs: one per vLLM release, each the release's accepted values, its defaults and its version-scoped checks, implementing blis-schemas' rules.EngineRules.
|
Package rules holds the vLLM rules packs: one per vLLM release, each the release's accepted values, its defaults and its version-scoped checks, implementing blis-schemas' rules.EngineRules. |
|
engineconfig
Package engineconfig is vLLM's engine configuration, the keys a deployment pool's engine: block states for a vLLM release: the Engine struct, its YAML decoding (Decode, Encode), its defaults and its release-independent field checks (Validate).
|
Package engineconfig is vLLM's engine configuration, the keys a deployment pool's engine: block states for a vLLM release: the Engine struct, its YAML decoding (Decode, Encode), its defaults and its release-independent field checks (Validate). |
|
pack
Package pack is the shape of a vLLM rules pack: one release's accepted values, its defaults and its version-scoped checks, as data (Pack), and the behaviour a consumer resolves against it.
|
Package pack is the shape of a vLLM rules pack: one release's accepted values, its defaults and its version-scoped checks, as data (Pack), and the behaviour a consumer resolves against it. |
|
v0_29
Package v0_29 is the rules pack for vLLM 0.29.x.
|
Package v0_29 is the rules pack for vLLM 0.29.x. |
|
v0_31
Package v0_31 is the rules pack for vLLM 0.31.0 (tag v0.31.0, commit db9527a468), the release blis-latency-kernel encodes.
|
Package v0_31 is the rules pack for vLLM 0.31.0 (tag v0.31.0, commit db9527a468), the release blis-latency-kernel encodes. |
|
v0_32
Package v0_32 is the rules pack for vLLM 0.32.0 (tag v0.32.0, commit 5df63a72), the release blis-vllm executes.
|
Package v0_32 is the rules pack for vLLM 0.32.0 (tag v0.32.0, commit 5df63a72), the release blis-vllm executes. |
|
Package vllmengine is how a simulator gets blis-vllm's vLLM v0.32.0 engine (core/vllm) without naming any of its packages: Register makes Kind "vllm" available in blis-schemas' engine registry, built from nothing but an engine.Spec, and the simulator drives it through engine.Engine.
|
Package vllmengine is how a simulator gets blis-vllm's vLLM v0.32.0 engine (core/vllm) without naming any of its packages: Register makes Kind "vllm" available in blis-schemas' engine registry, built from nothing but an engine.Spec, and the simulator drives it through engine.Engine. |