Host A Local Language Model

Run CHIM dialogue through a model hosted on your own PC or another computer on your local network. This guide covers KoboldCPP and LM Studio.

Before You Start

What this does: Local hosting keeps language-model requests on hardware you control. It avoids cloud usage costs, but response speed and quality depend on your computer and the model you choose.

  • Use an instruction or chat model that can follow structured requests reliably.
  • Start with one model and one CHIM profile while testing.
  • Make sure the model runs successfully in its own application before connecting CHIM.

Choose A Local Server

KoboldCPP

KoboldCPP runs GGUF models and provides an OpenAI-compatible API. Load your model, start KoboldCPP, and keep it running while you play.

Download KoboldCPP

The usual CHIM endpoint is:

http://<WINDOWS_IP>:5001/v1/chat/completions

LM Studio

LM Studio can download and run local models through its built-in server. Load a model, open the Developer page, and start the server before launching CHIM.

Download LM Studio

The usual CHIM endpoint is:

http://<WINDOWS_IP>:1234/v1/chat/completions

Find The Correct Address

With the normal DwemerDistro setup, HerikaServer runs inside WSL. Use the Windows IPv4 address instead of 127.0.0.1 so the server can reach the model application.

  1. Open Command Prompt on the computer running KoboldCPP or LM Studio.
  2. Run ipconfig.
  3. Find the IPv4 address for the active Ethernet or Wi-Fi connection.
  4. Replace <WINDOWS_IP> in the endpoint with that address.

For example:

http://192.168.1.25:5001/v1/chat/completions
http://192.168.1.25:1234/v1/chat/completions

If the model is on another PC, allow network connections in the model server and Windows Firewall. See the Remote Hosting Guide for the full two-PC setup.

Create The CHIM Connector

  1. Open the CHIM web interface and select LLM from the Configuration Hub.
  2. Select New Connector.
  3. Choose Custom as the service.
  4. Enter the full KoboldCPP or LM Studio URL in URL.
  5. Enter the exact model name shown by your local server in Model.
  6. Choose OpenAI JSON as the driver.
  7. Leave the API key unselected when your local server does not require one.
  8. Save the connector, then select Test.

The endpoint must end in /v1/chat/completions. A base address such as http://192.168.1.25:5001 is not enough.

Assign The Connector To A Profile

  1. Open Profiles in the Configuration Hub.
  2. Clone an existing profile or edit the profile you want to test.
  3. Set your local connector as the Response Connector.
  4. Save the profile and assign it to a test NPC.
  5. Start with a short conversation before assigning the connector to other profile jobs.

Local models do not all handle dialogue, memories, diaries, actions, and profile updates equally well. Keep a working cloud connector available while you test each role.

Local Model Tips

  • If replies are slow: use a smaller quantized model or reduce the model's context size.
  • If replies repeat: reduce the amount of conversation history sent to the model.
  • If actions fail: try a model with stronger instruction following and structured-output support.
  • If reasoning text appears: enable Reasoning Model Fix on the connector.
  • If streaming causes trouble: try Disable Streaming on the connector.

Troubleshooting

  • Connection refused: make sure the model and its API server are running.
  • Request timed out: confirm the Windows IP, port, firewall access, and model loading state.
  • Not found or 404: check that the URL ends in /v1/chat/completions.
  • The test works but the NPC uses another model: check which profile the NPC uses and which connector is assigned to its Response slot.
  • Another PC cannot connect: make sure the local server accepts network connections instead of listening only on localhost.

For additional community examples, see the CHIM Local LLM Discord thread.