-
Notifications
You must be signed in to change notification settings - Fork 16
Make "ai/" the default namespace #136
base: main
Are you sure you want to change the base?
Conversation
|
Have to propagate this around a bit to "pull", etc. But going to wait what folks think about it |
|
Shortens this output by 3 characters also, can fit more in a terminal: |
8165e90 to
3f0af3d
Compare
|
I think I got everywhere |
|
@p1-0tr @xenoscopic @doringeman PTAL. Could someone click the build button for me please to check this passes? |
3f0af3d to
3d4a5bf
Compare
ilopezluna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great idea, thanks! I was just wondering if we should consider placing it deeper within model-distribution. I was thinking of a unified location where, given a string, we return a parsed name.Reference. That way, we could include logic like setting a default namespace in one place, without having to worry about missing it elsewhere.
WDYT?
|
@ilopezluna you know the code better than me 😅 I've only read a few bits... I do think in the implementation details, there should still be a "ai/" namespace for simplicity, in terms of storage etc. But it can be hidden from the user such as when someone runs: I do think it's ok to return "ai/" in more advanced usages. Because that is the namespace, just hiding it from the common usages for UX reasons and nicer to use/read strings. Kinda wish the 4 model-* repos were one repo. Would be easier to avoid breaking changes. I haven't played around with model-distribution yet, I don't understand that component yet. But at the deepest level, I think "ai/" should exist. |
3d4a5bf to
103fa51
Compare
|
I think the idea is great from an UX perspective.
Yeah, we are pondering the idea of merging the repos. |
|
"model-distribution" equivalent: https://github.com/docker/model-distribution/pull/122/files Still might want to keep the list change here, not sure |
|
I fully support the idea. @ekcasey Do you know the most Moby-analogous place to put this in our tooling? I'm not sure where
1000% agree; I think we've decided this now internally, it's just a question of timeline. |
library/ is the Ollama equivalent of ai/. Since Ollama is 95% an OCI registry with a load of ggufs. It does raise the question, does docker model runner want to support pulling from Ollama? It would be easy to add: The reason why this may not be desired is Ollama used to use everyday ggufs, in recent times there are non-standard ggufs being pushed to the Ollama registry that don't work with upstream llama.cpp, namely these ones: https://github.com/ollama/ollama/tree/main/model/models For this reason I've started leaning pulling ggufs from dockerhub and huggingface. But ~90% of the Ollama ones will work. Did a very similar change in lm-pull and RamaLama (which are basically the same code, lm-pull was a shorter example that was created first): https://github.com/ericcurtin/lm-pull/blob/f688fb83fce2c96efeadb096b6cdaea11e133d4a/lm-pull.py#L263 |
ilopezluna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great idea, thanks! I was just wondering if we should consider placing it deeper within model-distribution. I was thinking of a unified location where, given a string, we return a parsed
name.Reference. That way, we could include logic like setting a default namespace in one place, without having to worry about missing it elsewhere. WDYT?
@ericcurtin I initially thought it would be better to implement it in a "deeper" place, specifically in model-distribution, so all clients of model-distribution would benefit of this.
However now I'm inclined to prefer to implement this Hub-specific behavior in the model-cli because I think it's the only client where it's needed, and this way model-distribution would not have to know about specifics of their clients.
I'm sorry because you have already implemented the model-distribution equivalent 🙇
So I vote to go with this approach, could you please resolve conflicts?
|
@ericcurtin @ilopezluna I believe the right location is in the backend (i.e. model-distribution), because else every UI/Client has to implement it itself (or risk examples being not conceptually transferable):
|
|
I'll see what I can do! |
|
@xenoscopic @ekcasey @ilopezluna could you pinpoint where in model-distribution this should be implemented? Looking at that codebase, it's not clear where I should start. Also my simple check for '/' has it's problems in cases where one may use the sha256 checksum as a key with no slash. But I'm sure moby has this problem too, if somebody tries to name an image a sha256-compatible string. |
|
There still might be some client side cases... Like the API might return ai/ but we might want to mask that in |
|
There is some prior art here, normalizeHuggingFaceModelName is a very similar thing, take a string, change it, but it's done client-side. FWIW ollama implements this client side. |
So we can run commands like: docker model run gpt-oss without the "ai/". This would be similar to ollama where the "library/" is typically not specified. Signed-off-by: Eric Curtin <[email protected]>
103fa51 to
715141d
Compare
|
@xenoscopic @ekcasey @ilopezluna @kiview What about this one? Another thing I haven't figured out how does one test model-cli and model-distribution together. |
|
@ericcurtin I think that's a better place for it than the CLI, just left a few comments there w.r.t. where to add the change. |
So we can run commands like:
docker model run gpt-oss
without the "ai/".
This would be similar to ollama where the "library/" is typically not specified.