Closed dan-homebrew closed 2 months ago
What is the data structure of ~/.cortexcpp/models? Where do the following go
Is our preference on a more flat folder structure? rather than super nested?
Previously, we had many bugs resulting from expecting folder & file names to be a certain way.
e.g. we expected unique_model_id
(used by backend) to be the same as the model folder name
Something to be aware of in this iteration 🙏
cortex models update
is currently out of scope right?Data Folder Questions
Q 1. What is the data structure of ~/.cortexcpp/models?
~/.cortexcpp/
|___ models
|__ tinyllama.yaml
|__ tinyllama
| |__ model_01.gguf
| |__ model_02.gguf
| |__ model.yml
|__ llama3.1
|__ llama3.2
After downloading model (from cortexso
or other HF repository), cortex generates tinyllama.yaml
file which is used for model management.
Q 2. Is our preference on a more flat folder structure? rather than super nested? Can you give an example of the flat folder structure? Q 3. Can you elaborate more about the issue? Do we have any ticket to track that issue yet?
Model importing Q 1. Can users import existing models?
cc: @0xSage
Model Yaml
Folder structure:
~/.cortexcpp/
|___ models
|__ tinyllama.yaml
|__ tinyllama
| |__ model_01.gguf
| |__ model_02.gguf
| |__ model.yml
|__ llama3.1
|__ llama3.2
With model not from cortexso
:
<model_id>/model.yml
and <model_id>.yaml
, this 2 files is the same. cortex-cpp models recover
, to check and resolve yml error.when YAML is there but binary is deleted, will raise No such file or directory error
when load models.
The doc from https://cortex.so/docs/model-yaml/
is up to date.
To apply update user need to stop running models and re run chat to load new configuration
What happens when model download fails halfway (e.g. internet disconnected)?
<model_id>.yaml
(inside How do we detect models? e.g. if users "import models locally" would it still work
<model_id>.yaml
file inside How do we version models?
version
inside yaml file to store the model's version. Please not that we don't have logic to support model update at the moment. For now, Version
is just for display purpose.3.1. If we update our model.yaml, or remote model binary in the HF branch, will download still work? Or will "redownloading/updating" fail due to "model exists"
Overview
model.yaml
?Docs