LM Studio: estimate memory
estimate_loadEstimates model memory requirements before loading so you can avoid out-of-memory issues when selecting large models or adjusting context length.
Instructions
Estimate the memory a model needs before loading it (lms load --estimate-only; nothing is loaded). Use it before loading large models.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>"
},
"name": "estimate_load"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpu | No | GPU offload: "off", "max" or a ratio such as "0.5". | |
| model | Yes | Model key from list_models. | |
| context_length | No | Context length to estimate for. Default: the model's saved default. Leave it out unless the user asks for a specific context: a saved default is the user's choice for this model. |