Quickstart
Local Installation
Cortex has an Local Installer that packages all required dependencies, so that no internet connection is required during the installation process.
Start Cortex.cpp API Server
This command starts the Cortex.cpp API server at localhost:39281
.
- MacOs/Linux
- Windows
cortex start
cortex.exe start
Pull a Model & Select Quantization
This command allows users to download a model from these Model Hubs:
- Cortex Built-in Models
- Hugging Face (GGUF):
cortex pull <author/ModelRepo>
It displays available quantizations, recommends a default and downloads the desired quantization.
- MacOs/Linux
- Windows
$ cortex pull llama3.2 $ cortex pull bartowski/Meta-Llama-3.1-8B-Instruct-GGUF
$ cortex pull llama3.2 $ cortex.exe pull bartowski/Meta-Llama-3.1-8B-Instruct-GGUF
Run a Model
This command downloads the default gguf
model format from the Cortex Hub, starts the model, and chat with the model.
- MacOs/Linux
- Windows
cortex run llama3.2
cortex.exe run llama3.2
All model files are stored in the ~/cortex/models
folder.
Using the Model
API
curl http://localhost:39281/v1/chat/completions \-H "Content-Type: application/json" \-d '{ "model": "llama3.1:8b-gguf", "messages": [ { "role": "user", "content": "Hello" }, ], "stream": true, "max_tokens": 1, "stop": [ null ], "frequency_penalty": 1, "presence_penalty": 1, "temperature": 1, "top_p": 1}'
Refer to our API documentation for more details.
Show the System State
This command displays the running model and the hardware system status (RAM, Engine, VRAM, Uptime)
- MacOs/Linux
- Windows
cortex ps
cortex.exe ps
Stop a Model
This command stops the running model.
- MacOs/Linux
- Windows
cortex models stop llama3.2
cortex.exe models stop llama3.2
Stop Cortex.cpp API Server
This command starts the Cortex.cpp API server at localhost:39281
.
- MacOs/Linux
- Windows
cortex stop
cortex.exe stop
What's Next?
Now that Cortex.cpp is set up, here are the next steps to explore:
- Adjust the folder path and configuration using the
.cortexrc
file. - Explore the Cortex.cpp data folder to understand how it stores data.
- Learn about the structure of the
model.yaml
file in Cortex.cpp.