> For the complete documentation index, see [llms.txt](https://docs.heyamica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heyamica.com/connecting-multi-modal-modules/using-llava.md).

# Using LLaVA

LLaVA / BakLLaVA can be used with [LLaMA.cpp](https://github.com/ggerganov/llama.cpp).

You can find the full llama.cpp documentation [here](https://github.com/ggerganov/llama.cpp/blob/master/README.md).

### Step 1 - Clone the repo

```bash
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
```

### Step 2 - Download the model

For example, we will use BakLLaVA-1 model, which is what is used on the demo instance.

Navigate to [mys/ggml\_bakllava-1](https://huggingface.co/mys/ggml_bakllava-1) and download either `q4` or `q5` quant, as well as the `mmproj-model-f16.gguf` file.

The `mmproj-model-f16.gguf` file is necessary for the vision model.

### Step 3 - Build the server

```bash
make server
```

### Step 4 - Run the server

Read the [llama.cpp](https://github.com/ggerganov/llama.cpp/blob/master/README.md) documentation for more information on the server options. Or run `./server --help`.

```bash
./server -t 4 -c 4096 -ngl 35 -b 512 --mlock -m models/openchat_3.5.Q5_K_M.gguf --mmproj models/mmproj-model-f16.gguf
```

### Step 5 - Enable the server in the client

```md
settings -> Vision -> Vision Backend -> LLaMA.cpp
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.heyamica.com/connecting-multi-modal-modules/using-llava.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
