Diagnose a CUDA OOM
diagnose_oomCall after a CUDA OOM, before changing batch size: the one cause (too big, fragmented, another process, undeclared memory) and fixes, least invasive first.
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": {
"error": "<error>"
},
"name": "diagnose_oom"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | No | ||
| batch | No | ||
| error | Yes | The OOM text as printed. | |
| hf_id | No | ||
| seq_len | No | The prompt, if inference. | |
| attention | No | ||
| inference | No | Generation, not training. | |
| gen_tokens | No | Default 256. | |
| model_path | No | File, zoo:<id>, hf:<org/name> | |
| model_source | No | Optional: answer about model text passed inline (a .neurarch.json document or PyTorch source). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cause | Yes | ||
| fixes | Yes | ||
| summary | Yes |