KvHistoryScenario
Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/proposers.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Key-value cache for history_window of retained context at history_rate beside machine’s weights.
Notes
Equation: retained KV bytes = rounded(history rate * window) * per-step KV bytes; combined = weights + retained KV.
Assumptions: Frames retain the full declared context independently; history rate and window use compatible units.
Excludes: Cache sharing between frames, eviction policy, activations, allocator reserve, and memory-access latency.
References
Derivation: retained KV bytes = rounded(history rate window) per-step KV bytes; combined = weights + retained KV. The individual properties state units and intermediate accounting; this class introduces no fitted coefficient.
Examples
The named scenario supplies illustrative inputs; the output is calculated.
>>> from mlsysim import Scenarios
>>> case = Scenarios.ThreeViewKvHistory
>>> round(float(case.frames), 3)
50.0Attributes
| Name | Description |
|---|---|
| combined | Weight plus retained full-context key-value memory in GB; runtime workspace is |
| combined_share | Fraction of application-processor memory occupied by weights and retained history. |
| frames | Retained frame count, rounding history duration times sampling rate. |
| history | Retained full-context key-value history in GB. |
| history_rate | |
| history_window | |
| kv_per_frame | Visual key-value memory per multi-view frame in MB. |
| kv_per_step | Key-value memory for the full declared context of one step in MB. |
| machine | |
| module_memory | Application-processor memory capacity in GB from the hardware specification. |
| tokens | |
| visual_history | Retained visual-only key-value history in GB. |
| weight_bytes_per_param | |
| weights | Intent-model weight memory in GB at the stipulated storage precision. |
tokens
Type: VlaTokenBudgetScenario.
Declared default: required.
machine
Type: Any.
Declared default: required.
history_window
Type: Quantity.
Declared default: required.
history_rate
Type: Quantity.
Declared default: required.
weight_bytes_per_param
Type: Quantity.
Declared default: required.
frames
engine.scenario_types.KvHistoryScenario.frames
Retained frame count, rounding history duration times sampling rate.
Equation: return round((history_window * history_rate).to('').magnitude).
kv_per_frame
engine.scenario_types.KvHistoryScenario.kv_per_frame
Visual key-value memory per multi-view frame in MB.
Equation: return (tokens.kv_per_token * tokens.visual_tokens).to('MB').
kv_per_step
engine.scenario_types.KvHistoryScenario.kv_per_step
Key-value memory for the full declared context of one step in MB.
Equation: return (tokens.kv_per_token * tokens.context_tokens).to('MB').
visual_history
engine.scenario_types.KvHistoryScenario.visual_history
Retained visual-only key-value history in GB.
Equation: return (kv_per_frame * frames).to('GB').
history
engine.scenario_types.KvHistoryScenario.history
Retained full-context key-value history in GB.
Equation: return (kv_per_step * frames).to('GB').
weights
engine.scenario_types.KvHistoryScenario.weights
Intent-model weight memory in GB at the stipulated storage precision.
Equation: return (machine.intent_model.parameters * weight_bytes_per_param).to('GB').
combined
engine.scenario_types.KvHistoryScenario.combined
Weight plus retained full-context key-value memory in GB; runtime workspace is excluded.
Equation: return (weights + history).to('GB').
module_memory
engine.scenario_types.KvHistoryScenario.module_memory
Application-processor memory capacity in GB from the hardware specification.
Equation: return machine.brain_soc.memory.capacity.to('GB').