Skip to main content

Exporting to Runtimes

hali manages models. Runtimes run them. Here's how to bridge the gap.


Which runtimes are supported?

RuntimeExport methodFile copy?Speed
OllamaManifest creationNoInstant
LM StudioFile copyYesDepends on size

Check what's installed on your machine:

hali runtime list
RUNTIME STATUS PATH
----------- ------- ----
Ollama running ~/.ollama
LM Studio stopped ~/.lmstudio

Ollama export

Creates an Ollama-compatible manifest that points at your cached GGUF. No file is copied. No symlinks. No duplicated disk usage. The manifest tells Ollama where the model lives in the hali cache.

hali export ollama mistral:7b:instruct:q4_k_m
Exported to Ollama:
model: mistral:7b:instruct:q4_k_m
path: ~/.ollama/models/manifests/mistral_7b_instruct_q4_k_m.json
status: created

After export, the model appears in ollama list immediately:

ollama list
NAME ID SIZE MODIFIED
mistral:7b:instruct:q4_k_m abc123def456 4.1 GB 2 minutes ago

Then use it:

ollama run mistral:7b:instruct:q4_k_m "Hello, world!"

Re-exporting is safe

Running hali export ollama again on the same model is idempotent:

Exported to Ollama:
model: mistral:7b:instruct:q4_k_m
path: ~/.ollama/models/manifests/mistral_7b_instruct_q4_k_m.json
status: up-to-date

It won't break anything or create duplicates.

Custom Ollama path

If your Ollama models directory isn't at the default location:

hali config set ollama_models_dir /custom/path/to/ollama/models

Or via environment variable:

export OLLAMA_HOME="/custom/path/to/ollama"

LM Studio export

Copies the GGUF file into LM Studio's local model directory. LM Studio expects models to live inside its own directory — hali accommodates this with a file copy.

hali export lmstudio mistral:7b:instruct:q4_k_m
Exported to LM Studio:
model: mistral:7b:instruct:q4_k_m
path: ~/.lmstudio/models/mistral-7b-instruct-v0.2.Q4_K_M.gguf
status: copied (4.14 GB)

The original stays in the hali cache. Both copies can coexist — hali keeps seeding from its cache while LM Studio loads the copy.

Custom LM Studio path

hali config set lmstudio_models_dir /custom/path/to/lmstudio/models

Or:

export LMSTUDIO_MODELS_DIR="/custom/path/to/lmstudio/models"

Export to everything

Don't overthink it — export to every detected runtime with one command:

hali export all mistral:7b:instruct:q4_k_m
Exported to Ollama:
model: mistral:7b:instruct:q4_k_m
status: created

Exported to LM Studio:
model: mistral:7b:instruct:q4_k_m
status: copied (4.14 GB)

How exports work

Ollama: The manifest is a JSON file that tells Ollama the model name, file path, and quantization. It's a pointer — Ollama reads the GGUF directly from the hali cache. If you delete the cached model, Ollama loses access to it (but you can re-export after re-downloading).

LM Studio: LM Studio doesn't support external model paths, so hali copies the file. This means the model uses double the disk space while it's in both locations. If you remove it from the hali cache, LM Studio keeps its copy.


Runtime auto-detection

hali runtime list automatically discovers runtimes by checking well-known paths:

  • Ollama — checks ~/.ollama/ (or OLLAMA_HOME)
  • LM Studio — checks ~/.lmstudio/models/ (or LMSTUDIO_MODELS_DIR)

On Windows, paths follow the standard user profile locations.

If a runtime isn't detected but you know it's installed, set the path manually via hali config set or the environment variable.