Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 18 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,7 @@
# Cortex Monorepo

This monorepo contains two projects: CortexJS and CortexCPP.

## CortexJS: Stateful Business Backend

* All of the stateful endpoints:
+ /threads
+ /messages
+ /models
+ /runs
+ /vector_store
+ /settings
+ /?auth
+ …
* Database & Filesystem
* API Gateway
* Authentication & Authorization
* Observability

## CortexCPP: Stateless Embedding Backend

* All of the high performance, stateless endpoints:
+ /chat/completion
+ /audio
+ /fine_tuning
+ /embeddings
+ /load_model
+ /unload_model
* Kernel - Hardware Recognition

## Project Structure

```
.
├── cortex-js/
│ ├── package.json
│ ├── README.md
│ ├── Dockerfile
│ ├── docker-compose.yml
│ ├── src/
│ │ ├── controllers/
│ │ ├── modules/
│ │ ├── services/
│ │ └── ...
│ └── ...
├── cortex-cpp/
│ ├── app/
│ │ ├── controllers/
│ │ ├── models/
│ │ ├── services/
│ │ ├── ?engines/
│ │ │ ├── llama.cpp
│ │ │ ├── tensorrt-llm
│ │ │ └── ...
│ │ └── ...
│ ├── CMakeLists.txt
│ ├── config.json
│ ├── Dockerfile
│ ├── docker-compose.yml
│ ├── README.md
│ └── ...
├── scripts/
│ └── ...
├── README.md
├── package.json
├── Dockerfile
├── docker-compose.yml
└── docs/
└── ...
```

# Install
# Installation

## Prerequisites

### **Dependencies**
Expand All @@ -91,17 +22,18 @@ Before installation, ensure that you have installed the following:
Ensure that your system meets the following requirements to run Cortex:

- **OS**:
- MacOSX 13.6 or higher.
- Windows 10 or higher.
- Ubuntu 12.04 and later.
- MacOSX 13.6 or higher.
- Windows 10 or higher.
- Ubuntu 12.04 and later.
- **RAM (CPU Mode):**
- 8GB for running up to 3B models.
- 16GB for running up to 7B models.
- 32GB for running up to 13B models.
- 8GB for running up to 3B models.
- 16GB for running up to 7B models.
- 32GB for running up to 13B models.
- **VRAM (GPU Mode):**
- 6GB can load the 3B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 8GB can load the 7B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 12GB can load the 13B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.

- 6GB can load the 3B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 8GB can load the 7B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 12GB can load the 13B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.

- **Disk**: At least 10GB for app and model download.

Expand Down Expand Up @@ -152,6 +84,7 @@ cortex init
> Nvidia
Others (Vulkan)
```

3. Select CPU instructions (will be deprecated soon).

```bash
Expand All @@ -165,22 +98,27 @@ cortex init
2. Once downloaded, Cortex is ready to use!

### Step 4: Pull a model

From HuggingFace

```bash
cortex pull janhq/phi-3-medium-128k-instruct-GGUF
```

From Jan Hub (TBD)

```bash
cortex pull llama3
```

### Step 5: Chat

```bash
cortex run janhq/phi-3-medium-128k-instruct-GGUF
```

## Run as an API server

```bash
cortex serve
```
Expand Down
28 changes: 18 additions & 10 deletions cortex-js/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Install
# Installation

## Prerequisites

### **Dependencies**
Expand All @@ -19,17 +20,18 @@ Before installation, ensure that you have installed the following:
Ensure that your system meets the following requirements to run Cortex:

- **OS**:
- MacOSX 13.6 or higher.
- Windows 10 or higher.
- Ubuntu 12.04 and later.
- MacOSX 13.6 or higher.
- Windows 10 or higher.
- Ubuntu 12.04 and later.
- **RAM (CPU Mode):**
- 8GB for running up to 3B models.
- 16GB for running up to 7B models.
- 32GB for running up to 13B models.
- 8GB for running up to 3B models.
- 16GB for running up to 7B models.
- 32GB for running up to 13B models.
- **VRAM (GPU Mode):**
- 6GB can load the 3B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 8GB can load the 7B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 12GB can load the 13B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.

- 6GB can load the 3B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 8GB can load the 7B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.
- 12GB can load the 13B model (int4) with `ngl` at 120 ~ full speed on CPU/ GPU.

- **Disk**: At least 10GB for app and model download.

Expand Down Expand Up @@ -80,6 +82,7 @@ cortex init
> Nvidia
Others (Vulkan)
```

3. Select CPU instructions (will be deprecated soon).

```bash
Expand All @@ -93,22 +96,27 @@ cortex init
2. Once downloaded, Cortex is ready to use!

### Step 4: Pull a model

From HuggingFace

```bash
cortex pull janhq/phi-3-medium-128k-instruct-GGUF
```

From Jan Hub (TBD)

```bash
cortex pull llama3
```

### Step 5: Chat

```bash
cortex run janhq/phi-3-medium-128k-instruct-GGUF
```

## Run as an API server

```bash
cortex serve
```
Expand Down