Skip to main content
Glama

model_sleep

Suspend the inference engine to free GPU memory between bursts, stopping requests until woken. Choose weight offload to CPU or discard for reload from disk.

Instructions

[WRITE][risk=high] Suspend the engine via Sleep Mode (it stops serving requests).

Frees GPU memory between bursts. level=1 offloads the weights to CPU RAM and wakes fast; level=2 discards them, so waking reloads from disk. The engine serves nothing until model_wake. Pass dry_run=True to preview.

Sleep Mode exists only on servers started with VLLM_SERVER_DEV_MODE=1; on any other server this reports that the route is absent rather than failing vaguely.

Args: level: 1 to offload weights to CPU RAM, 2 to discard them (default 1). dry_run: If True, preview without suspending. target: Inference target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNo
targetNo
dry_runNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that it stops requests, frees memory, and details the two sleep levels and their wake behavior. It also notes the dev mode requirement. Missing info on active request handling, but covers key effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a header, body, and args section. Every sentence adds value and there is no redundancy. Efficient and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description covers the purpose, behavior, parameters, and a critical environment condition. Missing return value and error scenarios, but sufficient for an AI agent to understand and use the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains all three parameters: level (1 or 2 with effects), dry_run (preview), target (inference target). This adds meaningful context beyond the schema's types and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it suspends the engine via Sleep Mode, stopping request serving. It distinguishes from sibling tools like model_wake (wakes) and model_is_sleeping (check status).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains when to use (free GPU memory between bursts) and the prerequisite (server started with VLLM_SERVER_DEV_MODE=1). It mentions the complementary model_wake, but does not explicitly contrast with alternatives like scale_to_zero.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/Inference-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server