This repository was archived by the owner on Jul 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 181
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
epic: Cortex Model Repo supports Default Model download #1418
Copy link
Copy link
Closed
Description
Goal
- Cortex's Built-in Libraries have a "Cortex Model repo" format
- Cortex Model Repos are a critical data structure to support
cortex pull <model>andcortex run <model>
High-level Structure
- Cortex model repos are Git repos
- Git repo has branches, which hold different "versions" of the model (i.e. quantization, engine etc)
cortex run <model>:<branch>pulls a specific versioncortex run <model>pulls a default version
- Git repo's "main branch" holds README and metadata, to allow user to navigate other branches
Decisions
Decision 1: Default Model Download
We need to figure out which model version cortex pull <model> and cortex run model` will pull.
Option 1: main branch
- We have so far gone with
mainbranch to hold our recommended version - We basically merge recommended version, e.g.
3b-ggufintomainbranch
However, I do not think this is correct long term:
- Longer-term, I think default model selection will be algorithmic
- e.g. Hardware detection -> pull most "optimized" model
mainbranch is non-descriptive as a branch name- e.g.
maincould hold3b-gguf, but user is unaware - It is better to be upfront that we default to
3b-gguf
- e.g.
- I think
mainbranch requires more work to manage longer-term- Process of switching
mainbranch will take some time - i.e. merge, git issues etc
- Process of switching
It is also incorrect to compare our approach to Ollama. Ollama uses a tag-based system similar to Docker, where latest is a pointer to 3b. It is difficult to replicate this in a "straightforward UX" in Git (i.e. tags are not very visible from main page)
Option 2: main branch has metadata.yaml
- I would like to instead propose a
metadata.yamlapproach to defining Default Model downloads - This can be superseded in the future with an algorithmic approach to selecting Default Model
metadata.yamlis also used to generate the CLI UX forcortex pullorcortex run
How it works
- Cortex Model Repo's
mainbranch will hold a few files (see below) - The v1 of
metadata.yamlwill be very simple
# File system
metadata.yaml
README.md# metadata.yaml
version: 1
name: mistral
default: 3b-ggufIn the future, metadata.yaml can be more complicated, and allow for fine-grained control of CLI UX, e.g. sections for 3b, 7b, or by engine.
Furthermore, we can use metadata.yaml as a data structure to hold information about the different Model versions.
- Can expand to include MMLU scores
- Can expand to include file sizes
- This can all be automated in the future through CI/CD on the Git repo
Metadata
Metadata
Labels
No labels