> For the complete documentation index, see [llms.txt](https://support.spiderpool.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.spiderpool.com/ai/models.md). Agents can also search and read this documentation through its [MCP server](https://support.spiderpool.com/~gitbook/mcp).

# Models

Platform-hosted model weights - the Models page, choosing models when you create an instance, where they appear in the container, downloads and caching, the vLLM inference API and ComfyUI, and model-r

**Rent → Models** ([go there](https://www.spiderpool.com/ai/models)) lists the model weights hosted by the platform. The note at the top reads: "Model weights are hosted by the platform. Select models when you create an instance and the machine downloads the weights into a shared cache, mounted read-only in the container at /models/. Models do not use the instance disk, and download time is not billed."

Why use platform models: you do not have to download tens of GB of weights yourself, they do not use your instance disk, and a model already cached on a machine is ready immediately. Platform models cost nothing extra.

## The Models page

Models are grouped by type, each group title followed by a count, for example "Language models · 3". The types are language models, embedding models, image models, audio models and other models. Without any published models the page says "No models available yet".

Fields on each card:

| Field                             | Meaning                                                                                                                                                         |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name and description              | The model's name and summary.                                                                                                                                   |
| Repository                        | The model's repository name (for example `org/model-name`); **Copy** copies it. Hover to see the version of these weights.                                      |
| Type                              | LLM, Embedding, Image, Audio or Other. Decides which templates can use it.                                                                                      |
| Parameters                        | For example 8B.                                                                                                                                                 |
| Size                              | Total size of the weights (decimal GB).                                                                                                                         |
| License                           | The model's license, a link when one is registered. Follow the license when you use the model.                                                                  |
| Suggested VRAM                    | The GPU memory suggested for running the model ("≥ N GB"). It is a guideline that the platform does not check; with too little VRAM the model may fail to load. |
| Mount path                        | Where the model appears in the container, `/models/<repo>`; **Copy** copies it.                                                                                 |
| **Find machines with this model** | Opens **Find GPUs** showing only machines that can mount this model.                                                                                            |

## Choosing models for an instance

1. Click **Find machines with this model** on the Models page, or open **Find GPUs** directly.
2. Click **Rent** on a machine. A model you brought from the Models page is preselected in the drawer's **Model** step if the template accepts it.
3. Tick models in the **Model** step, finish the other steps and create the instance.

Rules:

* **How many**: an instance can mount up to the smaller of the template's limit and the platform's limit, as shown in the drawer as "required · up to N" or "optional · up to N". The platform's limit is 4 by default.
* **The template decides what you can pick**:

  | Template           | Models                               |
  | ------------------ | ------------------------------------ |
  | cuda-base, pytorch | Optional, any type                   |
  | comfyui            | Optional, image models only          |
  | vllm               | Required, exactly one language model |

  The drawer always shows the rule that applies.
* **The machine must support models**: machines with an older agent or without a model cache cannot mount models, and the selected models together must fit in the machine's model cache. When you search with a model filter, machines that do not qualify are not listed.
* **Order**: the first model you pick is the container's default model (`MODEL_ID` and `SPIDER_MODEL_PATH` point to it).
* **Fixed after creation**: you cannot add or remove models on an existing instance. Create a new instance if you need different models.
* **Pinned version**: an instance uses the version of the weights from its creation. If the platform later updates the model, existing instances keep their version across stop and start.

## Using models in the container

Selected models are mounted read-only at `/models/<repo>`. The **Models** card on the instance page lists each model's name, repository, size and mount path (copyable), with the note "Models are mounted read-only at the paths above inside the container and do not use the instance disk."

Model-related environment variables in the container:

| Variable            | Value                                                                                                 |
| ------------------- | ----------------------------------------------------------------------------------------------------- |
| `SPIDER_MODELS_DIR` | `/models`, the root of all model mounts                                                               |
| `SPIDER_MODEL_IDS`  | Repositories of the selected models, comma-separated; empty without models                            |
| `SPIDER_MODEL_PATH` | Mount path of the first model, for example `/models/<repo>`; set only with models                     |
| `MODEL_ID`          | Repository of the first model; set only with models (a `MODEL_ID` set by the template itself is kept) |

For example, to list the first model's files over SSH:

```bash
ls "$SPIDER_MODEL_PATH"
```

Load the model from that local path in your code; no download is needed. `/models` is read-only: to change weights (for example to fine-tune), copy the files you need into `/workspace` first, which uses instance disk, and save your results to `/workspace` as well.

## Downloads and caching

* **Shared cache**: each machine that supports models has cache space for platform models, shared by the instances on it. It does not use your instance disk.
* **Cached models**: marked **cached** in the drawer; nothing to download.
* **First use**: models marked **needs download** are downloaded while the instance is created; the instance shows "Creating · downloading model" with a percentage. Download time is not billed. How long it takes depends on the model size and the machine's network; the drawer shows an estimate based on the platform's measured download speed (not shown for machines without a measurement).
* **Integrity check**: every downloaded file is checked against the checksum the platform registered; on a mismatch the instance does not start (see `model_verify_failed` below).
* **When the cache is full**: the machine automatically removes the least recently used models that no instance is using. Models used by your instances, stopped ones included, are never removed.

## vLLM inference API

The vllm template runs vLLM automatically when the instance starts. It loads the model you selected and serves an OpenAI-compatible API on port 8000 inside the container:

* The model name in requests is the model's repository (the value of `MODEL_ID`).
* On a multi-GPU instance the model is spread over all GPUs automatically (tensor parallelism).
* After the instance reaches **Running**, vLLM still needs some time to load the model; requests fail until it is ready.

For now the inference API is reachable only through an SSH tunnel. The **Connect** card on the instance page has an **Inference API** section:

1. Open the tunnel on your computer (copy the command from the Console; it has the right port and host):

   ```bash
   ssh -p <ssh-port> -L 8000:localhost:8000 root@<instance-id>.i.spiderpool.com
   ```
2. Keep that window open and send requests from another terminal on your computer:

   ```bash
   curl http://localhost:8000/v1/models
   ```
3. A chat request:

   ```bash
   curl http://localhost:8000/v1/chat/completions \
     -H "Content-Type: application/json" \
     -d '{"model": "<repo>", "messages": [{"role": "user", "content": "Hello"}]}'
   ```

The service's output is logged in the container at `/var/log/spider-serve.log`. If the service exits (for example out of GPU memory or because of a bad argument) it is not restarted automatically; the instance and SSH keep working. After checking the log you can run `/opt/spiderpool/serve.sh` again yourself, preferably inside `tmux`. To pass extra arguments to vLLM, stop the running vLLM first (if it is still running) and rerun with the `VLLM_ARGS` environment variable, for example:

```bash
pkill -f "vllm serve"
VLLM_ARGS="--max-model-len 8192" /opt/spiderpool/serve.sh
```

The next time the instance starts, the service runs with its default arguments again.

## ComfyUI

The comfyui template accepts image models only. The image models you select appear automatically in ComfyUI's model lists; your own models, custom nodes, inputs, outputs and settings live under `/workspace/ComfyUI` and survive a stop. ComfyUI listens on port 8188 inside the container and is reachable only through an SSH tunnel: with the tunnel up, open `http://localhost:8188` in your browser. The exact command is in the **ComfyUI** section of the **Connect** card; see also [Connect to an instance](https://support.spiderpool.com/ai/connect.md).

## Model-related messages

Messages on the search page and in the create drawer ("not supported on this machine", "This template requires a model.", "The selected models total X, more than this machine's model cache of Y…" and so on) are explained in [Find GPUs and create an instance](https://support.spiderpool.com/ai/search.md).

When an instance cannot start because of its models, it ends up **Failed** with one of these reasons:

| Reason (as shown in the Console)                                                                                                                                      | What to do                                                                                  |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| "The model could not be downloaded on that machine, so the instance could not start. Delete it and create it again, or try another machine."                          | Delete and create again; if it keeps happening, use another machine.                        |
| "The downloaded model files failed the integrity check, so the instance could not start. Delete it and create it again; contact support if it keeps happening."       | Delete and create again; contact support if it repeats.                                     |
| "The machine's model cache has no room for the selected models, so the instance could not start. Delete it and create it on another machine, or with fewer models."   | The cache is full of models other instances are using. Use another machine or fewer models. |
| "The machine did not accept the selected models, so the instance could not start. Delete it and create it on another machine; contact support if it keeps happening." | Use another machine.                                                                        |

When you start a stopped instance on a machine that can no longer mount models, you see "This machine cannot mount models right now, so an instance that uses models cannot start. Try again later, or delete it and create it on another machine."

Failed instances are not billed; delete them to free your quota. Other failure reasons are in [Manage instances](https://support.spiderpool.com/ai/instances.md).

## FAQ

**Can I add a model to an existing instance?** No. Models are chosen at creation only; create a new instance for different models.

**Can I use a model that is not in the catalog?** You can download it into `/workspace` yourself, but it uses instance disk and the download time is billed like any other running time. Platform models use no disk and their download is not billed.

**Do models use my disk?** No. Platform models live in the machine's shared cache, so you do not need to size the disk for them.

**Why do some search results say "not supported on this machine"?** That machine cannot mount models (its agent is older, or the host has not enabled the model cache). Pick a machine that supports them.

**Can I reach the inference API from the internet?** Not yet; only through an SSH tunnel. That also means only people who can SSH into the instance can use it.

## Related

* [Find GPUs and create an instance](https://support.spiderpool.com/ai/search.md)
* [Templates](https://support.spiderpool.com/ai/templates.md)
* [Connect to an instance](https://support.spiderpool.com/ai/connect.md)
* [Manage instances](https://support.spiderpool.com/ai/instances.md)
