Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epic: cortex run vs cortex pull UX for Cortex Model Repos #1401

Closed
2 tasks
dan-menlo opened this issue Oct 3, 2024 · 7 comments · Fixed by #1430
Closed
2 tasks

epic: cortex run vs cortex pull UX for Cortex Model Repos #1401

dan-menlo opened this issue Oct 3, 2024 · 7 comments · Fixed by #1430
Assignees

Comments

@dan-menlo
Copy link
Contributor

dan-menlo commented Oct 3, 2024

Goal

  • cortex run <model> should have a default option (vs. overwhelming users with choice)
  • We can present a "menu" to the user, but also allow for default/recommended selection

Out-of-scope:

  • cortex pull and cortex run for Huggingface Model Repos

Path

As per @namchuai's suggestion, we will have differentiate between cortex run and cortex pull: #1401 (comment)

cortex pull

  • cortex pull is optimized for pulling models, and shows full list of available downloads
  • We should optimize for showing the list of available downloads, with default at the top
  • We should make the default selection for the user (i.e. they just press enter again)
  • Research CLIs to find an example of CLI UX with default selection
> cortex pull tinyllama

Default (press enter to select)
    1. 8b-gguf

Available to download:
    2. 8b-gguf-q4-km
    3. ...
    4. ...

Your selection (default: 1): 

cortex run tinyllama

  • cortex run is optimized for running local models

Case 1: If no models detected

  • We display the pull menu (similar to the above)

Case 2: 1 local model detected

  • We automatically run the local model that has been downloaded, that is part of that model family

Case 3:

  • We show a "menu" with list of local models, for user to select
> cortex run tinyllama

Local Models: (press enter to select)
    1. 8b-gguf-q2
    2. 8b-gguf-q4_km

Your selection (default: 1): 1

Tasklist

  • cortex pull/run <model> should have a "menu"
    • Better indentation for readability
    • Different sections (i.e. default, available to download)
@dan-menlo dan-menlo added this to Menlo Oct 3, 2024
@dan-menlo dan-menlo converted this from a draft issue Oct 3, 2024
@dan-menlo dan-menlo moved this from Investigating to Scheduled in Menlo Oct 3, 2024
@dan-menlo dan-menlo changed the title epic: cortex run <model> should pull default main branch epic: cortex run <model> should pull main branch of HF Cortex repos Oct 3, 2024
@dan-menlo dan-menlo changed the title epic: cortex run <model> should pull main branch of HF Cortex repos epic: cortex run <model> should have recommended/default selection Oct 3, 2024
@dan-menlo dan-menlo changed the title epic: cortex run <model> should have recommended/default selection epic: cortex pull/run <model> should have recommended/default selection Oct 3, 2024
@dan-menlo dan-menlo changed the title epic: cortex pull/run <model> should have recommended/default selection epic: cortex pull || run <model> should have recommended/default selection Oct 3, 2024
@dan-menlo dan-menlo changed the title epic: cortex pull || run <model> should have recommended/default selection epic: cortex pull/run <model> should have recommended/default selection Oct 3, 2024
@dan-menlo
Copy link
Contributor Author

dan-menlo commented Oct 3, 2024

@0xSage This is likely an exercise for us to clean up the Built-in Models on Huggingface:

Llama3:

Mistral:

We can probably do a very fast cleanup today, and have @vansangpfiev @namchuai amend the cortex run logic.

@dan-menlo
Copy link
Contributor Author

@namchuai Please give us an hour to finalize the structure of metadata.yaml. The one in Mistral is not correct.

image

@namchuai
Copy link
Collaborator

namchuai commented Oct 3, 2024

@dan-homebrew , let me clarify this a little bit. So, when user enter, for example cortex run llama3, we need to get metadata.yaml in main branch to get the default branch (default model) to download from? If yes, then it would introduce quite some changes, because, previously, we just download from main branch if user does not specific any branch.

@gabrielle-ong
Copy link
Contributor

Immediate Goal: metadata.yaml to specify a default branch to download - without hardware detection for v1.0.0

  • Read metadata.yaml in main branch - default
  • List other branches - available to download

Example: llama3.2

metadata.yaml

version: 1
default: 3b-gguf-q4-km

CLI

> cortex run llama3.2
Default (press enter to select)
    1. 3b-gguf-q4-km

Available to download:
    2. 3b-gguf-q2-k
    3. 3b-gguf-q3-kl
    4. 3b-gguf-q3-km
    5. 3b-gguf-q3-ks
    6. 3b-gguf-q4-ks 
    7. 3b-gguf-q5-km
    8. 3b-gguf-q5-ks
    9. 3b-gguf-q6-k
    10. 3b-gguf-q8-0

image

Implementation:

  • Need cortex team's suggestions on default branch for 80% of users hardware
  • Add metadata.yaml to cortexso model repos - Gab

Future

metadata.yaml can be customised the listing of different configurations eg 3b, 11b (spec-ed out in future)

@namchuai
Copy link
Collaborator

namchuai commented Oct 3, 2024

I think we should change the command behavior a little bit.

  1. cortex run, basically, user's intention is to chat with a model. For example, cortex run llama3, we can query locally and if we found any llama3 ready (any quant), we use it. If user don't have llama3, we download from main
  2. cortex pull user's intention is to download models. We should display selections. Display what they already have and what they don't locally.

Based on discussion over Discord.

@dan-menlo dan-menlo changed the title epic: cortex pull/run <model> should have recommended/default selection epic: cortex pull <model> should have recommended/default selection Oct 3, 2024
@dan-menlo dan-menlo changed the title epic: cortex pull <model> should have recommended/default selection epic: cortex run vs cortex pull UX Oct 4, 2024
@dan-menlo dan-menlo changed the title epic: cortex run vs cortex pull UX epic: cortex run vs cortex pull UX for Cortex Model Repos Oct 4, 2024
@namchuai
Copy link
Collaborator

namchuai commented Oct 4, 2024

@dan-homebrew, I think separate the default into another section will add complexity. I think we can just indicate as below. Please let me know your idea.
Screenshot 2024-10-04 at 15 27 05

@github-project-automation github-project-automation bot moved this from Scheduled to Review + QA in Menlo Oct 4, 2024
@gabrielle-ong
Copy link
Contributor

gabrielle-ong commented Oct 5, 2024

image
Thank you @namchuai!

@gabrielle-ong gabrielle-ong moved this from Review + QA to Completed in Menlo Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants