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

introduce ollama cpp optimized for Xeon CPU #848

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

abdulari
Copy link

@abdulari abdulari commented Nov 4, 2024

Description

This component introduce ollama cpp compiled with additional flags that suitable for serving llm on Xeon CPU. The additional flags are as follows: DGGML_AVX=on DGGML_AVX2=on DGGML_F16C=on DGGML_FMA=on DGGML_AVX512=on GGML_AVX512_VNNI=on DGGML_AVX512_VBMI=on

Issues

n/a

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

Tests

  • build docker image
  • deploy in Xeon k8s cluster
  • gather performance
curl http://localhost:11434/api/chat -d '{  "model": "phi3",  "format":"json","stream":false, "messages": [    { "role": "user", "content": "why the sky is blue?" }  ]}' | jq .

{
  "model": "phi3",
  "created_at": "2024-11-04T03:10:46.469048957Z",
  "message": {
    "role": "assistant",
    "content": "{\n   \"type\": \"Answer\",\n   \"detail\": {\n      \"title\": \"Why Is The Sky Blue? - Explanran Answer\",\n      \"description\": \"The color of our sky comes down to a few atmospheric and physics factors. Here's how the process works: \\n\\n- When sunlight enters Earth’s atmosphere, it is composed of different colors that together appear white.\\n- As light travels through space, shorter wavelength blue and violet frequencies are scattered in many directions by oxygen and nitrogen molecules. This scattering effect for shorter wavelengths is known as Rayleigh Scattering.\\n\\nHowever, the sky does not appear violet because our eyes are more sensitive to blue light and less so at violet end of spectrum. Moreover, sunlight contains relatively little violet light to begin with.\",\n      \"source\": \"\"\n   }\n}"
  },
  "done_reason": "stop",
  "done": true,
  "total_duration": 10284471444,
  "load_duration": 4209713070,
  "prompt_eval_count": 15,
  "prompt_eval_duration": 137833000,
  "eval_count": 199,
  "eval_duration": 5887508000
}

Signed-off-by: Abdul Muttalib, Abdul Arif B <[email protected]>
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.

1 participant