Skip to main content

Data and App Directories

When you install Cortex.cpp, three types of files will be generated on your device:

  • Binary Files
  • Configuration Files
  • A Data Directory

Binary Files - under the App Folder

These are the executable files of the Cortex.cpp application. The file format varies depending on the operating system:

  • Windows:
    • cli: C:\Users\<username>\AppData\Local\cortexcpp\cortex.exe
    • server: C:\Users\<username>\AppData\Local\cortexcpp\cortex-server.exe
  • Linux:
    • cli: /usr/bin/cortex
    • server: /usr/bin/cortex-server
  • macOS:
    • cli: /usr/local/bin/cortex
    • server: /usr/local/bin/cortex-server

Cortex Data Directory

The data DIRECTORY stores the engines, models used by Cortex and the logs generated by the server and CLI. The data directory is located at:

  • Windows: C:\Users\<username>\cortexcpp
  • Linux: /home/<username>/cortexcpp
  • macOS: /Users/<username>\cortexcpp

Directory Structure

The Cortex data directory can be found in the user's home directory, and it typically follows the structure below:


~/cortexcpp
├── cortex.db
├── engines/
│   ├── cortex.llamacpp/
│   ├── deps/
│   │   ├── libcublasLt.so.12
│   │   └── libcudart.so.12
│   └── linux-amd64-avx2-cuda-12-0/
│   └── ...
├── files
├── logs/
│   ├── cortex-cli.log
│   └── cortex.log
├── models/
│   ├── cortex.so/
│   │   ├── deepseek-r1-distill-llama-8b/
│   │   │   └── 8b-gguf-q2-k/
│   │   │   ├── metadata.yml
│   │   │   ├── model.gguf
│   │   │   └── model.yml
│   │   └── ...
│   └── huggingface.co/
│   ├── bartowski/
│   │   └── phi-4-GGUF/
│   │   ├── phi-4-Q3_K_S.gguf
│   │   └── phi-4-Q3_K_S.yml
│   └── unsloth/
│   └── DeepSeek-R1-Distill-Qwen-1.5B-GGUF/
│   ├── DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf
│   └── DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.yml
└── threads

models/

Contains all of the models used by Cortex for processing and generating responses. These models can come from anywhere in the HuggingFace model Hub or the Cortex model Hub.

info

For more information regarding the model.list and model.yaml, please see here.

logs/

Stores log files from the Cortex server and CLI. These are essential for troubleshooting and monitoring performance.

We use Trantor for logging, which ensures non-blocking, thread-safe, and multi-stream file logging without affecting your system's performance. Trantor automatically creates a new log file for each server session based on the date and time, simplifying debugging. It also supports setting limits on log file size and the number of log files per session.

engines/

Stores the necessary dependencies and engine files needed to run run models on via the supported engines.