# Local AI model + OpenCode

You can set up capable AI on your own PC. This requires an Nvidia GPU with at least 8GB (ideally 16GB) VRAM and sufficient RAM.

<span style="background-color: rgb(241, 196, 15);">If you are are a member of HKI use our LLM gateway that provides access to more powerful models (information requires login).</span>

### Install and start local AI

We provide two models:

<table border="1" id="bkmrk-model-requirements-q" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50.0596%;"></col><col style="width: 50.0596%;"></col></colgroup><tbody><tr><td>**Model**</td><td>**Requirements**</td></tr><tr><td>Qwen 3.5 9b</td><td>&lt;=8GB VRAM, ~8GB RAM</td></tr><tr><td>Qwen 3.6 35b a3b</td><td>&gt;12GB VRAM, ~25GB RAM</td></tr></tbody></table>

#### Linux

This will build llama-cpp on your system. Additional build tools may be required, including nvidia-cuda-toolkit.

Paste the following command into the terminal:

Small model:

```bash
curl -fsSL https://asb-git.hki-jena.de/RGerst/asb-opencode-installers/-/raw/main/local_llm/run-qwen35-9b-linux.sh -o run-qwen35-9b-linux.sh
bash run-qwen35-9b-linux.sh
```

Large model:

```
curl -fsSL https://asb-git.hki-jena.de/RGerst/asb-opencode-installers/-/raw/main/local_llm/run-qwen36-35b-a3b-linux.sh -o run-qwen36-35b-a3b-linux.sh
bash run-qwen36-35b-a3b-linux.sh
```

#### Windows

Small model:

```powershell
irm https://asb-git.hki-jena.de/RGerst/asb-opencode-installers/-/raw/main/local_llm/run-qwen35-9b-windows.ps1 -OutFile run-qwen35-9b-windows.ps1
powershell -ExecutionPolicy Bypass -File .\run-qwen35-9b-windows.ps1
```

Large model:

```
irm https://asb-git.hki-jena.de/RGerst/asb-opencode-installers/-/raw/main/local_llm/run-qwen36-35b-a3b-windows.ps1 -OutFile run-qwen36-35b-a3b-windows.ps1
powershell -ExecutionPolicy Bypass -File .\run-qwen36-35b-a3b-windows.ps1
```

### OpenCode setup

Our OpenCode setup scripts directly bind against the local LLM. On launching OpenCode you'll be able to directly start coding with the model if it's running.

Web search (daedra), Library documentation (context7), and cross-session memory (deja-vu) are automatically installed.

<span style="background-color: rgb(241, 196, 15);">If you used the HKI-specific OpenCode setup scripts: newer versions provide local model access.</span>

#### Linux

```bash
curl -fsSL https://asb-git.hki-jena.de/RGerst/asb-opencode-installers/-/raw/main/local/install-update-opencode-local-linux.sh | bash
```

#### Windows

```
irm https://asb-git.hki-jena.de/RGerst/asb-opencode-installers/-/raw/main/local/install-update-opencode-local-windows.ps1 | iex
```