Files
cs249r_book/mlsysim/docs/api/engine.solver.ContinuousBatchingModel.qmd
T
Vijay Janapa Reddi cb0ae4082f docs(mlsysim): regenerate quartodoc API stubs for the new module layout
Run quartodoc build against the refactored package (engine/ extracted from core/,
infra->infrastructure): regenerate the API reference so every stub points at the new
paths. Adds engine.*/infrastructure.* stubs, removes the 41 stale core.solver.* /
core.engine.* / core.scenarios.* / core.config.* / core.evaluation.* / infra*.qmd
orphans, and refreshes the package pages (core now primitives-only) + index.

Verified: all 47 documented symbols resolve in the new package; every index link
resolves; zero stale mlsysim.core.<engine-mod> / mlsysim.infra references anywhere in
docs/. (objects.json inventory is gitignored -- regenerated at build.)
2026-05-29 21:35:39 -04:00

40 lines
1.2 KiB
Plaintext

# engine.solver.ContinuousBatchingModel { #mlsysim.engine.solver.ContinuousBatchingModel }
```python
engine.solver.ContinuousBatchingModel()
```
Analyzes production LLM serving with Continuous Batching and PagedAttention.
Traditional static batching suffers from severe memory fragmentation and
padding waste. This model simulates the throughput improvements achieved by
iteration-level scheduling and non-contiguous KV cache allocation.
Literature Source:
1. Kwon et al. (2023), "Efficient Memory Management for Large Language Model
Serving with PagedAttention."
2. Yu et al. (2022), "ORCA: A Distributed Serving System for
Transformer-Based Generative Models."
## Methods
| Name | Description |
| --- | --- |
| [solve](#mlsysim.engine.solver.ContinuousBatchingModel.solve) | Calculates continuous batching throughput and PagedAttention memory. |
### solve { #mlsysim.engine.solver.ContinuousBatchingModel.solve }
```python
engine.solver.ContinuousBatchingModel.solve(
model,
hardware,
seq_len,
max_batch_size=1,
page_size=16,
precision='fp16',
efficiency=0.5,
)
```
Calculates continuous batching throughput and PagedAttention memory.