base on Local AI API Platform <div style="border: 2px solid #f44336; background-color: #fff3f3; padding: 16px; border-radius: 6px; margin-bottom: 20px;"> <h2>🚨 Archived Repository Notice</h2> <p><strong>This repository is no longer actively maintained.</strong></p> <p>Development has moved to <a href="https://github.com/menloresearch/llama.cpp"><strong>menloresearch/llama.cpp</strong></a>.</p> <p>Please contribute directly to <code>llama.cpp</code> moving forward.</p> </div> # Cortex <p align="center"> <img width="1280" alt="Cortex.cpp Banner" src="./assets/cortex-banner.png"> </p> <p align="center"> <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/menloresearch/cortex.cpp"/> <img alt="Github Last Commit" src="https://img.shields.io/github/last-commit/menloresearch/cortex.cpp"/> <img alt="Github Contributors" src="https://img.shields.io/github/contributors/menloresearch/cortex.cpp"/> <img alt="Discord" src="https://img.shields.io/discord/1107178041848909847?label=discord"/> </p> <p align="center"> <a href="https://cortex.so/docs/">Docs</a> • <a href="https://cortex.so/api-reference">API Reference</a> • <a href="https://github.com/menloresearch/cortex.cpp/releases">Changelog</a> • <a href="https://github.com/menloresearch/cortex.cpp/issues">Issues</a> • <a href="https://discord.gg/AsJ8krTT3N">Community</a> </p> > **Under Active Development** - Expect rapid improvements! Cortex is the open-source brain for robots: vision, speech, language, tabular, and action -- the cloud is optional. ## Installation | Platform | Installer | |----------|-----------| | **Windows** | [cortex.exe](https://app.cortexcpp.com/download/latest/windows-amd64-local) | | **macOS** | [cortex.pkg](https://app.cortexcpp.com/download/latest/mac-universal-local) | | **Linux (Debian)** | [cortex.deb](https://app.cortexcpp.com/download/latest/linux-amd64-local) | All other Linux distributions: ```bash curl -s https://raw.githubusercontent.com/menloresearch/cortex/main/engine/templates/linux/install.sh | sudo bash ``` ### Start the Server ```bash cortex start ``` ``` Set log level to INFO Host: 127.0.0.1 Port: 39281 Server started API Documentation available at: http://127.0.0.1:39281 ``` [Full API docs](https://cortex.so/api-reference). ### Download Models You can download models from the huggingface model hub using the `cortex pull` command: ```bash cortex pull llama3.2 ``` ``` Downloaded models: llama3.1:8b-gguf-q4-km llama3.2:3b-gguf-q2-k Available to download: 1. llama3:8b-gguf 2. llama3:8b-gguf-q2-k 3. llama3:8b-gguf-q3-kl 4. ... Select a model (1-21): ``` ### Run Models ```sh cortex run llama3.2 ``` ``` In order to exit, type `exit()` > ``` You can also run it in detached mode, meaning, you can run it in the background and can use the model via the API: ```sh cortex run -d llama3.2:3b-gguf-q2-k ``` ### Manage resources ```sh cortex ps # View active models ``` ```sh cortex stop # Shutdown server ``` ## Why Cortex.cpp? Local AI platform for running AI models with: - **Multi-Engine Support** - Start with llama.cpp or add your own - **Hardware Optimized** - Automatic GPU detection (NVIDIA/AMD/Intel) - **OpenAI-Compatible API** - Tools, Runs, and Multi-modal coming soon ## Featured Models | Model | Command | Min RAM | |----------------|---------------------------|---------| | Llama 3 8B | `cortex run llama3.1` | 8GB | | Phi-4 | `cortex run phi-4` | 8GB | | Mistral | `cortex run mistral` | 4GB | | Gemma 2B | `cortex run gemma2` | 6GB | [View all supported models →](https://cortex.so/models) ## Advanced Features See table below for the binaries with the nightly builds. ```bash # Multiple quantizations cortex-nightly pull llama3.2 # Choose from several quantization options ``` ```bash # Engine management (nightly) cortex-nightly engines install llama-cpp -m ``` ```sh # Hardware control cortex-nightly hardware detect cortex-nightly hardware activate ``` ## Need Help? - Quick troubleshooting: `cortex --help` - [Documentation](https://cortex.so/docs) - [Community Discord](https://discord.gg/FTk2MvZwJH) - [Report Issues](https://github.com/menloresearch/cortex.cpp/issues) --- ## For Contributors ### Development Builds | Version | Windows | macOS | Linux | |-----------|---------|-------|-------| | **Stable** | [exe](https://app.cortexcpp.com/download/latest/windows-amd64-network) | [pkg](https://app.cortexcpp.com/download/latest/mac-universal-network) | [deb](https://app.cortexcpp.com/download/latest/linux-amd64-network) | | **Beta** | [exe](https://app.cortexcpp.com/download/beta/windows-amd64-network) | [pkg](https://app.cortexcpp.com/download/beta/mac-universal-network) | [deb](https://app.cortexcpp.com/download/beta/linux-amd64-network) | | **Nightly** | [exe](https://app.cortexcpp.com/download/nightly/windows-amd64-network) | [pkg](https://app.cortexcpp.com/download/nightly/mac-universal-network) | [deb](https://app.cortexcpp.com/download/nightly/linux-amd64-network) | ### Build from Source See [BUILDING.md](BUILDING.md) ## Uninstall Cortex ### Windows 1. Open the Windows Control Panel. 2. Navigate to `Add or Remove Programs`. 3. Search for `cortexcpp` and double click to uninstall. (for beta and nightly builds, search for `cortexcpp-beta` and `cortexcpp-nightly` respectively) ### MacOs/Linux Run the uninstaller script: ```bash sudo cortex-uninstall.sh ``` The script to uninstall Cortex comes with the binary and was added to the `/usr/local/bin/` directory. The script is named `cortex-uninstall.sh` for stable builds, `cortex-beta-uninstall.sh` for beta builds and `cortex-nightly-uninstall.sh` for nightly builds. ## Contact Support - For support, please file a [GitHub ticket](https://github.com/menloresearch/cortex.cpp/issues/new/choose). - For questions, join our Discord [here](https://discord.gg/FTk2MvZwJH). - For long-form inquiries, please email [[email protected]](mailto:[email protected]).", Assign "at most 3 tags" to the expected json: {"id":"6727","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"