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

Consider Using Standard Config Format #204

Open
nazimamin opened this issue Jul 24, 2023 · 7 comments
Open

Consider Using Standard Config Format #204

nazimamin opened this issue Jul 24, 2023 · 7 comments
Labels

Comments

@nazimamin
Copy link

Thank you for your work, this is great and will be very helpful for the OSS community. The custom configuration file named "Modelfile" works well in the context of this project.

I would like to discuss the possibility of using a standardized config format such as JSON5, TOML, YAML, or another similar standard. Those are battle-tested, easy to read and maintain, and have extensive tooling support. Using custom config language makes it harder for people to adapt quickly and makes it hard to build tooling support on top of it. Thoughts?

@mchiang0610
Copy link
Contributor

mchiang0610 commented Jul 25, 2023

Hey @nazimamin, thank you so much for submitting this, and bringing it to our attention.

Having worked with multiple config formats in the past, I think you and I know very well, no matter what we choose, there will be different trade offs. Some cater towards composability, and making it easy to generate via generator tools. Some are more human-readable than others, and the list can go on.

We probably won't get it right all the time, but we'll always pick the one that can address the biggest number of people. Always listening to more use-cases, and suggestions to determine what's the best.

We definitely should have good support to tools/formats that to enable use of Ollama's API.

@nkoehring
Copy link

I support the OPs suggestion. Maybe "getting it right" issues could be mitigated by supporting multiple formats that can be easily serialized. I for example find TOML very easy to read and write, but also simple to parse. Others might prefer YAML (which I don't like that much). Parsing those formats into the same memory structure should be rather easy, nowadays.

@pdevine
Copy link
Contributor

pdevine commented Jul 25, 2023

I think there's potentially a misunderstanding of the purpose of the Modelfile. It's not a config file, but more akin to a Makefile or a Dockerfile. It's probably hard to see at this point because everything is still so rudimentary, but the vision is to have a format which can handle assembling all of the quantization levels, embeddings, and even peft/lora training all in the same file. Additionally, with the support of manifest lists in the model image we can support multiple weights formats beyond ggml v3. The point is that you can use the Modelfile to assemble your model, and use ollama push to push it to the registry where you can easily share it with other people.

So it's not so much as a config file as it is a script or a source file for assembling models. I appreciate the suggestion here, guys, but I'm going to go ahead and close the issue. There will be ollama config files at some point for tweaking parameters in the ollama runner/server, and those will definitely be normal config files.

@pdevine pdevine closed this as completed Jul 25, 2023
@pdevine
Copy link
Contributor

pdevine commented Jul 25, 2023

One thing I should also mention; you can use JSON to set the hyper-parameters already when calling POST /api/generate. We could fairly easily expose this through ollama run so you could easily tweak the parameters. LMK if this would be useful.

@pdevine pdevine reopened this Jul 25, 2023
@nathanleclaire
Copy link

nathanleclaire commented Jul 25, 2023

Yea, there is never any good answer on this kind of thing. Dockerfile took off like crazy because it's so easy to understand and read/write. And Kubernetes had loads of YAML with infinite flexibility, but it made us all miserable, and generation layers on top like Helm made everything worse. It might be a good compromise if Ollama had a well-defined API (or JSON compatibility with Modelfile, that type of thing), that didn't push so much of the magic to the client like Docker does in a lot of instances.

@BruceMacD BruceMacD added feature request New feature or request feedback wanted labels Mar 11, 2024
@sammcj
Copy link
Contributor

sammcj commented May 5, 2024

I'd really like to see Ollama support using a standard config file for model server settings and default parameters.

Somewhat related #4120 #4154 #4123 #836

@chigkim
Copy link

chigkim commented May 31, 2024

This seems an old issue, so maybe neglected, but regardless it would be amazing to be able to set with config file like yaml/json format.

OLLAMA_HOST: "0.0.0.0"
OLLAMA_NOHISTORY: true
OLLAMA_FLASH_ATTENTION: true
OLLAMA_NUM_PARALLEL: 4
OLLAMA_MAX_LOADED: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants