Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: installation #1621

Merged
merged 10 commits into from
Nov 5, 2024
Prev Previous commit
Next Next commit
docs: update cortex folder session
hiento09 committed Nov 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 6a36e90b6cfb682c5c7c572993d397aaff716aba
46 changes: 28 additions & 18 deletions docs/docs/architecture/cortexrc.mdx
Original file line number Diff line number Diff line change
@@ -14,32 +14,42 @@ import TabItem from "@theme/TabItem";
Cortex.cpp supports reading its configuration from a file called `.cortexrc`. Using this file, you can also change the data folder, Cortex.cpp API server port, and host.

## File Location

The configuration file is stored in the following locations:

- **Windows**:
- Stable: `C:\Users\<username>\.cortexrc`
- Beta: `C:\Users\<username>\.cortexrc-beta`
- Nighty: `C:\Users\<username>\.cortexrc-nightly`
- **Linux**:
- Stable: `/home/<username>/.cortexrc`
- Beta: `/home/<username>/.cortexrc-beta`
- Nighty: `/home/<username>/.cortexrc-nightly`
- **macOS**:
- Stable: `/Users/<username>/.cortexrc`
- Beta: `/Users/<username>/.cortexrc-beta`
- Nighty: `/Users/<username>/.cortexrc-nightly`
- **Windows**: `C:\Users\<username>\.cortexrc`
- **Linux**: `/home/<username>/.cortexrc`
- **macOS**: `/Users/<username>/.cortexrc`

## Configuration Parameters

You can configure the following parameters in the `.cortexrc` file:
| Parameter | Description | Default Value |
| Parameter | Description | Default Value |
|------------------|--------------------------------------------------|--------------------------------|
| `dataFolderPath` | Path to the folder where `.cortexrc` located. | User's home folder. |
| `apiServerHost` | Host address for the Cortex.cpp API server. | `127.0.0.1` |
| `apiServerPort` | Port number for the Cortex.cpp API server. | `39281` |
| `dataFolderPath` | Path to the folder where `.cortexrc` located. | User's home folder. |
| `apiServerHost` | Host address for the Cortex.cpp API server. | `127.0.0.1` |
| `apiServerPort` | Port number for the Cortex.cpp API server. | `39281` |
| `logFolderPath` | Path to the folder where Cortex.cpp logs are stored. | `C:\Users\<username>\cortexcpp-nightly` |
| `logLlamaCppPath` | Path to the folder where LlamaCpp logs are stored. | `./logs/cortex.log` |
| `logTensorrtLLMPath` | Path to the folder where TensorRT logs are stored. | `./logs/cortex.log` |
| `logOnnxPath` | Path to the folder where ONNX logs are stored. | `./logs/cortex.log` |
| `maxLogLines` | Maximum number of lines in the log file. | `100000` |
| `checkedForUpdateAt` | Timestamp of the last update check. | `0` |
| `latestRelease` | Latest release version. | `""` |
| `huggingFaceToken` | Hugging Face API token. Use to download private models from Hugging Face. | `""` |

Example of the `.cortexrc` file:

```
dataFolderPath: /Users/<username>/cortexcpp
logFolderPath: C:\Users\<username>\cortexcpp
logLlamaCppPath: ./logs/cortex.log
logTensorrtLLMPath: ./logs/cortex.log
logOnnxPath: ./logs/cortex.log
dataFolderPath: C:\Users\username\cortexcpp
maxLogLines: 100000
apiServerHost: 127.0.0.1
apiServerPort: 39281
```
checkedForUpdateAt: 1730363971
latestRelease: v1.0.1
huggingFaceToken: ""
```
92 changes: 16 additions & 76 deletions docs/docs/architecture/data-folder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Data Folder
description: Cortex.cpp's data folder.
title: Data Folder and App Folder
description: Cortex.cpp's data folder and app folder.
slug: "data-folder"
---

@@ -17,37 +17,25 @@ When you install Cortex.cpp, three types of files will be generated on your devi
- **Configuration Files**
- **Data Folder**

## Binary Files
## 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**: `.exe`
- Stable: `C:\Users\<username>\AppData\Local\cortexcpp\cortex.exe`
- Beta: `C:\Users\<username>\AppData\Local\cortexcpp-beta\cortex-beta.exe`
- Nighty: `C:\Users\<username>\AppData\Local\cortexcpp-nightly\cortex-nightly.exe`
- **Linux**: `.deb` or `.fedora`
- Stable: `/usr/bin/cortexcpp`
- Beta: `/usr/bin/cortexcpp-beta`
- Nighty: `/usr/bin/cortexcpp-nightly`
- **macOS**: `.pkg`
- Stable: `/usr/local/bin/cortexcpp`
- Beta: `/home/<username>/.cortexrc-beta`
- Nighty: `/home/<username>/.cortexrc-nightly`
- **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.cpp Data Folder
The data folder stores the engines, models, and logs required by Cortex.cpp. This folder is located at:

- **Windows**:
- Stable: `C:\Users\<username>\.cortexcpp`
- Beta: `C:\Users\<username>\.cortexcpp-beta`
- Nighty: `C:\Users\<username>\.cortexcpp-nightly`
- **Linux**:
- Stable: `/home/<username>/.cortexcpp<env>`
- Beta: `/home/<username>/.cortexcpp-beta`
- Nighty: `/home/<username>/.cortexcpp-nightly`
- **macOS**:
- Stable: `/Users/<username>\.cortexcpp<env>`
- Beta: `/Users/<username>/.cortexcpp-beta`
- Nighty: `/Users/<username>/.cortexcpp-nightly`
- **Windows**: `C:\Users\<username>\cortexcpp`
- **Linux**: `/home/<username>/cortexcpp`
- **macOS**: `/Users/<username>\cortexcpp`

### Folder Structure
The Cortex.cpp data folder typically follows this structure:
@@ -77,57 +65,9 @@ The Cortex.cpp data folder typically follows this structure:
└── llamacpp
```
</TabItem>
<TabItem value="Beta" label="Beta">
```yaml
~/.cortex-beta
├── models/
│ └── model.list
│ └── huggingface.co/
│ └── <repo_name>/
└── <branch_name>/
└── model.yaml
└── model.gguf
│ └── cortex.so/
│ └── <repo_name>/
│ └── <branch_name>/
└── ...engine_files
└── model.yaml
│ └── imported/
└── imported_model.yaml
├── logs/
│ └── cortex.txt
└── cortex-cli.txt
└── engines/
└── llamacpp
```
</TabItem>
<TabItem value="Nightly" label="Nightly">
```yaml
~/.cortex-nightly
├── models/
│ └── model.list
│ └── huggingface.co/
│ └── <repo_name>/
└── <branch_name>/
└── model.yaml
└── model.gguf
│ └── cortex.so/
│ └── <repo_name>/
│ └── <branch_name>/
└── ...engine_files
└── model.yaml
│ └── imported/
└── imported_model.yaml
├── logs/
│ └── cortex.txt
└── cortex-cli.txt
└── engines/
└── llamacpp
```
</TabItem>
</Tabs>

#### `.cortexcpp<env>`
#### `cortexcpp`
The main directory that stores all Cortex-related files, located in the user's home directory.
#### `models/`
Contains the AI models used by Cortex for processing and generating responses.