---
title: "Environment variables"
description: "Configure caches, transport behavior, native execution, sampling, sessions, and Hugging Face progress."
canonical: "https://www.fermionresearch.com/docs/environment-variables/"
source: "Fermion Research"
---

Docs / Reference

# Environment variables

Configure caches, transport behavior, native execution, sampling, sessions, and Hugging Face progress.

## Complete public inventory

| Variable | Effect |
| --- | --- |
| `FERMION_CACHE_DIR` | Move model downloads made by the fermion CLI. |
| `HF_HOME` | Move the complete Hugging Face cache. |
| `FERMION_KEEP_TRANSPORT=1` | Keep the coded transport after verified local expansion. |
| `FERMION_DOWNLOAD_ALL=1` | Download the entire model repository without filtering. |
| `FERMION_NO_TV4Z=1` | Skip coded transport and download the raw container. |
| `FERMION_TV4Z=/path` | Use an explicit transport decoder. |
| `FERMION_NATIVE_BIN=/path` | Use an explicit native runner. |
| `FERMION_THREADS=N` | Set the native decode thread count. |
| `FERMION_MAX_THREADS=N` | Raise the default hard thread ceiling of 16. |
| `FERMION_SEED=N` | Pin the native seed for sampled decoding. |
| `FERMION_SESSION=0` | Disable the resident session runner. |
| `FERMION_SESSION_CTX=N` | Override the resident session KV capacity. |
| `HF_HUB_DISABLE_PROGRESS_BARS` | Honor the Hugging Face progress-bar preference. |

## Example configuration

```text
export FERMION_CACHE_DIR=/mnt/models/fermion
export FERMION_THREADS=12
export FERMION_SESSION_CTX=16384

fermion serve
```

Source: [https://www.fermionresearch.com/docs/environment-variables/](https://www.fermionresearch.com/docs/environment-variables/)
