> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/workflows/blocks/blocks/run-a-model/cog-vlm.md).

# CogVLM

DEPRECATED! Run a self-hosted vision language model.

{% hint style="warning" %}
**CogVLM reached End Of Life**

Due to dependencies conflicts with newer models and security vulnerabilities discovered in `transformers` library patched in the versions of library incompatible with the model we announced End Of Life for CogVLM support in `inference`, effective since release `0.38.0`.

We are leaving this block in ecosystem until release `0.42.0` for clients to get informed about change that was introduced.

Starting as of now, all Workflows using the block stop being functional (runtime error will be raised), after inference release `0.42.0` - this block will be removed and Execution Engine will raise compilation error seeing the block in Workflow definition.
{% endhint %}

Ask a question to CogVLM, an open source vision-language model.

This model requires a GPU and can only be run on self-hosted devices, and is not available on the Roboflow Hosted API.

*This model was previously part of the LMM block.*

### Type identifier

Use the following identifier in step `"type"` field: `roboflow_core/cog_vlm@v1` to add the block as a step in your workflow.

### Properties

| **Name**             | **Type**         | **Description**                                                                 | Refs |
| -------------------- | ---------------- | ------------------------------------------------------------------------------- | ---- |
| `name`               | `str`            | Enter a unique identifier for this step..                                       | ❌    |
| `prompt`             | `str`            | Text prompt to the CogVLM model.                                                | ✅    |
| `json_output_format` | `Dict[str, str]` | Holds dictionary that maps name of requested output field into its description. | ❌    |

The **Refs** column marks possibility to parametrise the property with dynamic values available in `workflow` runtime. See *Bindings* for more info.

### Runtime compatibility

`requires_internet` - air-gapped / offline deployments : This block depends on a service that is not reachable from fully offline / air-gapped deployments.

`hard` - runtime `self_hosted_cpu`; execution `local` : Requires a GPU; run\_locally() loads a model that needs CUDA.

`hard` - runtime `hosted_serverless`; execution `remote` : LMM\_ENABLED=False on Roboflow Hosted Serverless: the /llm\_v1 and /infer/cog\_vlm endpoints are not registered, so run\_remotely() returns 404.

### Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds `CogVLM` in version `v1` has.

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the CogVLM model.
* output
  * `parent_id` ([`parent_id`](/workflows/developer-guide/developer-guide/kinds/parent-id.md)): Identifier of parent for step output.
  * `root_parent_id` ([`parent_id`](/workflows/developer-guide/developer-guide/kinds/parent-id.md)): Identifier of parent for step output.
  * `image` ([`image_metadata`](/workflows/developer-guide/developer-guide/kinds/image-metadata.md)): Dictionary with image metadata required by supervision.
  * `structured_output` ([`dictionary`](/workflows/developer-guide/developer-guide/kinds/dictionary.md)): Dictionary.
  * `raw_output` ([`string`](/workflows/developer-guide/developer-guide/kinds/string.md)): String value.
  * `*` ([`*`](/workflows/developer-guide/developer-guide/kinds/wildcard.md)): Equivalent of any element.

</details>

<details>

<summary>Example JSON definition</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/cog_vlm@v1",
	    "images": "$inputs.image",
	    "prompt": "my prompt",
	    "json_output_format": {
	        "count": "number of cats in the picture"
	    }
	}
```

</details>
