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

Examples/kubernetes dev with model downloading functionality #7

Open
wants to merge 2 commits into
base: example/kubernetes
Choose a base branch
from

Conversation

OmegAshEnr01n
Copy link

@OmegAshEnr01n OmegAshEnr01n commented Jul 21, 2024

Hi,

I have built the helm chart according to the template you had provided earlier. I think this can still be improved in some ways. Any comments are welcome.

Feature set for the Helm chart

  • High availability
  • Multi models
  • Support of embeddings and completions models
  • Load balancing
  • Auto scaling
  • CUDA support
  • Downloading functionality
  • Redownload on upgrade hook. (Currently the models are downloaded only on the first deployment, there is no redownload functionality on upgrade if required)

Pending testing

  • Load balancing
  • multi GPU support using MiG for kubernetes docs & microk8s

Copy link
Owner

@phymbert phymbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the effort, this is a good start. We need to bring it to the original repo. Let's merge it then we can discuss there


livenessProbe:
httpGet:
path: /
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have health endpoints

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean you want to remove this?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the path must be /health

name: modelRunner
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be deleted


---

{{- end}}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind that each file must end with an empty line

- -c
- |
set -e
if curl -L {{ $modelConfig.url }} --output /models/{{ $modelName }}/{{ $modelName }}.gguf; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will not support sharded model files. Better to let llama.cpp server handles the initial download

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok but then we wont be able to have a job running it. This will prevent us from updating it using kubectl apply. Also i dont believe llama server supports autodownload? I know Ollama does. When llamacpp server container tries to start it needs a model file to point to or else it errors out.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I developed that feature some time ago, see the doc.

@phymbert
Copy link
Owner

Maybe it would be easier if I push the base branch to the original repo ?

@OmegAshEnr01n
Copy link
Author

Yes, Ideally we merge here first and once finalized we can push example/kubernetes to the main repo.

@ceddybi
Copy link

ceddybi commented Jul 26, 2024

@phymbert @OmegAshEnr01n Awesome work you've done here, small question, when this chart is deployed are the models's api compatible with Open IA api, like the way together ai works, where i just change the OPENAI_API_KEY and OPENAI_BASE_URL (https://api.together.xyz/v1)

@OmegAshEnr01n
Copy link
Author

Hi @ceddybi,

Please check the server API docs from llama.cpp.

POST /v1/chat/completions: OpenAI-compatible Chat Completions API. Given a ChatML-formatted json description in messages, it returns the predicted completion. Both synchronous and streaming mode are supported, so scripted and interactive applications work fine. While no strong claims of compatibility with OpenAI API spec is being made, in our experience it suffices to support many apps. Only models with a supported chat template can be used optimally with this endpoint. By default, the ChatML template will be used.

@lee-b
Copy link

lee-b commented Sep 20, 2024

Is it necessary to limit to MiG here? llama.cpp supports pre-ampere GPUs, so it would be nice to use more standard multi-GPU container techniques.

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

Successfully merging this pull request may close these issues.

4 participants