mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-21 00:23:30 -05:00
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.)
44 lines
1.8 KiB
Plaintext
44 lines
1.8 KiB
Plaintext
# engine.solver.ScalingModel { #mlsysim.engine.solver.ScalingModel }
|
|
|
|
```python
|
|
engine.solver.ScalingModel()
|
|
```
|
|
|
|
Analyzes the 'Scaling Physics' of model training (Chinchilla Laws).
|
|
|
|
This model determines the optimal model size (P) and dataset size (D)
|
|
given a compute budget (C), following the compute-optimal training
|
|
regime where D ≈ 20P.
|
|
|
|
Literature Source:
|
|
1. Hoffmann et al. (2022), "Training Compute-Optimal Large Language Models."
|
|
2. Kaplan et al. (2020), "Scaling Laws for Neural Language Models."
|
|
3. McCandlish et al. (2018), "An Empirical Model of Large-Batch Training."
|
|
|
|
## Methods
|
|
|
|
| Name | Description |
|
|
| --- | --- |
|
|
| [solve](#mlsysim.engine.solver.ScalingModel.solve) | Solves for compute-optimal model and dataset parameters. |
|
|
|
|
### solve { #mlsysim.engine.solver.ScalingModel.solve }
|
|
|
|
```python
|
|
engine.solver.ScalingModel.solve(compute_budget, target_model_size=None)
|
|
```
|
|
|
|
Solves for compute-optimal model and dataset parameters.
|
|
|
|
#### Parameters {.doc-section .doc-section-parameters}
|
|
|
|
| Name | Type | Description | Default |
|
|
|-------------------|----------|---------------------------------------------------------------------------|------------|
|
|
| compute_budget | Quantity | Total training budget (e.g., in TFLOPs or H100-GPU-days). | _required_ |
|
|
| target_model_size | Quantity | If provided, calculates the required tokens for this specific model size. | `None` |
|
|
|
|
#### Returns {.doc-section .doc-section-returns}
|
|
|
|
| Name | Type | Description |
|
|
|--------|------------------|-------------------------------------------------------------------|
|
|
| | Dict\[str, Any\] | Optimal parameters, token count, and training duration estimates. |
|