ollama / ollama

Get up and running with Llama 3, Mistral, Gemma 2, and other large language models.
https://ollama.com
MIT License
77.43k stars 5.84k forks source link

Allow integration with Slurm #2812

Open iamashwin99 opened 4 months ago

iamashwin99 commented 4 months ago

Slurm is a utility to manage and schedule workloads on a cluster of computers. Many academic institutions use it for distributing computation.

I was wondering if it would be a good idea to implement an interface that allows use of chat interface with the model loaded via Slurm jobs. This way your request gets queued, and when the computation is done, ollama will pipe the output.

There could be a number of ways to do this :

Im hoping to have a discussion on what the community thinks about this topic.

stanier commented 4 months ago

Personally, I would go a different route. I have similarly asked myself repeatedly over the past year or so what the best way to do simple LLM inference in a cluster compute environment is. But I never felt the explicit need to integrate with the job scheduler for a couple reasons:

Generally I think it is an ill fit and would advise against, only because you have other options that are much more practical which I would highly recommend considering. But I could also be looking at this the wrong way somehow, as admittedly is sometimes characteristic of myself... I'm open to hear what others have to think on this and hear if there are maybe some needs/constraints I'm not taking into account.

edit: On second thought, I may have spoke too hastily about not using llama.cpp/GGML for inference in a cluster environment, as it would be entirely valid in use cases where you have maybe ~4-40GB VRAM to work with. In the same way, ollama would make some sense for convenience. I still can't get behind the use of such short-lived jobs, but if it is a small (less than a dozen nodes) cluster dedicated to one group, it may make sense for them and I have no room to speak in that case.

wwjCMP commented 2 months ago

I believe this improvement is valuable.