mirror of
https://github.com/mudler/LocalAI.git
synced 2026-02-04 11:42:57 -05:00
Compare commits
8 Commits
v3.6.0
...
chore/vulk
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2aed98d14b | ||
|
|
b3a1b3d63f | ||
|
|
e25dd2fe26 | ||
|
|
002f75ac79 | ||
|
|
1ce8f35834 | ||
|
|
be8a314496 | ||
|
|
406d62d6aa | ||
|
|
9e9f953eec |
1703
.github/workflows/backend.yml
vendored
1703
.github/workflows/backend.yml
vendored
File diff suppressed because it is too large
Load Diff
2
.github/workflows/image-pr.yml
vendored
2
.github/workflows/image-pr.yml
vendored
@@ -60,7 +60,7 @@ jobs:
|
||||
runs-on: 'ubuntu-latest'
|
||||
makeflags: "--jobs=3 --output-sync=target"
|
||||
- build-type: 'vulkan'
|
||||
platforms: 'linux/amd64'
|
||||
platforms: 'linux/amd64,linux/arm64'
|
||||
tag-latest: 'false'
|
||||
tag-suffix: '-vulkan-core'
|
||||
runs-on: 'ubuntu-latest'
|
||||
|
||||
2
.github/workflows/image.yml
vendored
2
.github/workflows/image.yml
vendored
@@ -101,7 +101,7 @@ jobs:
|
||||
makeflags: "--jobs=4 --output-sync=target"
|
||||
aio: "-aio-gpu-nvidia-cuda-12"
|
||||
- build-type: 'vulkan'
|
||||
platforms: 'linux/amd64'
|
||||
platforms: 'linux/amd64,linux/arm64'
|
||||
tag-latest: 'auto'
|
||||
tag-suffix: '-gpu-vulkan'
|
||||
runs-on: 'ubuntu-latest'
|
||||
|
||||
30
Dockerfile
30
Dockerfile
@@ -32,15 +32,27 @@ RUN <<EOT bash
|
||||
if [ "${BUILD_TYPE}" = "vulkan" ] && [ "${SKIP_DRIVERS}" = "false" ]; then
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
software-properties-common pciutils wget gpg-agent && \
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
echo "vulkan" > /run/localai/capability
|
||||
software-properties-common pciutils sudo wget gpg-agent curl xz-utils && \
|
||||
echo "vulkan" > /run/localai/capability && \
|
||||
if [ "amd64" = "$TARGETARCH" ]; then
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
fi
|
||||
if [ "arm64" = "$TARGETARCH" ]; then
|
||||
# For ARM64, we need to build the Vulkan SDK manually as there are no packages available
|
||||
mkdir vulkan && cd vulkan && curl -L -o vulkan-sdk.tar.xz https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.321.1/vulkansdk-ubuntu-22.04-arm-1.4.321.1.tar.xz && \
|
||||
tar -xvf vulkan-sdk.tar.xz && \
|
||||
rm vulkan-sdk.tar.xz && \
|
||||
cd * && \
|
||||
cp -rfv aarch64/* /usr/ && \
|
||||
cd ../.. && \
|
||||
rm -rf vulkan
|
||||
fi
|
||||
fi
|
||||
EOT
|
||||
|
||||
|
||||
@@ -37,14 +37,27 @@ RUN <<EOT bash
|
||||
if [ "${BUILD_TYPE}" = "vulkan" ] && [ "${SKIP_DRIVERS}" = "false" ]; then
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
software-properties-common pciutils wget gpg-agent && \
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
software-properties-common pciutils sudo wget gpg-agent curl xz-utils && \
|
||||
echo "vulkan" > /run/localai/capability && \
|
||||
if [ "amd64" = "$TARGETARCH" ]; then
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
fi
|
||||
if [ "arm64" = "$TARGETARCH" ]; then
|
||||
# For ARM64, we need to build the Vulkan SDK manually as there are no packages available
|
||||
mkdir vulkan && cd vulkan && curl -L -o vulkan-sdk.tar.xz https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.321.1/vulkansdk-ubuntu-22.04-arm-1.4.321.1.tar.xz && \
|
||||
tar -xvf vulkan-sdk.tar.xz && \
|
||||
rm vulkan-sdk.tar.xz && \
|
||||
cd * && \
|
||||
cp -rfv aarch64/* /usr/ && \
|
||||
cd ../.. && \
|
||||
rm -rf vulkan
|
||||
fi
|
||||
fi
|
||||
EOT
|
||||
|
||||
|
||||
@@ -85,14 +85,27 @@ RUN <<EOT bash
|
||||
if [ "${BUILD_TYPE}" = "vulkan" ] && [ "${SKIP_DRIVERS}" = "false" ]; then
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
software-properties-common pciutils wget gpg-agent && \
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
software-properties-common pciutils sudo wget gpg-agent curl xz-utils libxcb1 libx11-6 && \
|
||||
echo "vulkan" > /run/localai/capability && \
|
||||
if [ "amd64" = "$TARGETARCH" ]; then
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
fi
|
||||
if [ "arm64" = "$TARGETARCH" ]; then
|
||||
# For ARM64, we need to build the Vulkan SDK manually as there are no packages available
|
||||
mkdir vulkan && cd vulkan && curl -L -o vulkan-sdk.tar.xz https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.321.1/vulkansdk-ubuntu-22.04-arm-1.4.321.1.tar.xz && \
|
||||
tar -xvf vulkan-sdk.tar.xz && \
|
||||
rm vulkan-sdk.tar.xz && \
|
||||
cd * && \
|
||||
cp -rfv aarch64/* /usr/ && vulkaninfo \
|
||||
cd ../.. && \
|
||||
rm -rf vulkan
|
||||
fi
|
||||
fi
|
||||
EOT
|
||||
|
||||
|
||||
@@ -45,14 +45,27 @@ RUN <<EOT bash
|
||||
if [ "${BUILD_TYPE}" = "vulkan" ] && [ "${SKIP_DRIVERS}" = "false" ]; then
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
software-properties-common pciutils wget gpg-agent && \
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
software-properties-common pciutils sudo wget gpg-agent curl xz-utils && \
|
||||
echo "vulkan" > /run/localai/capability && \
|
||||
if [ "amd64" = "$TARGETARCH" ]; then
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
||||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
vulkan-sdk && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
fi
|
||||
if [ "arm64" = "$TARGETARCH" ]; then
|
||||
# For ARM64, we need to build the Vulkan SDK manually as there are no packages available
|
||||
mkdir vulkan && cd vulkan && curl -L -o vulkan-sdk.tar.xz https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.321.1/vulkansdk-ubuntu-22.04-arm-1.4.321.1.tar.xz && \
|
||||
tar -xvf vulkan-sdk.tar.xz && \
|
||||
rm vulkan-sdk.tar.xz && \
|
||||
cd * && \
|
||||
cp -rfv aarch64/* /usr/ && \
|
||||
cd ../.. && \
|
||||
rm -rf vulkan
|
||||
fi
|
||||
fi
|
||||
EOT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
LLAMA_VERSION?=d64c8104f090b27b1f99e8da5995ffcfa6b726e2
|
||||
LLAMA_VERSION?=4807e8f96a61b2adccebd5e57444c94d18de7264
|
||||
LLAMA_REPO?=https://github.com/ggerganov/llama.cpp
|
||||
|
||||
CMAKE_ARGS?=
|
||||
|
||||
@@ -8,7 +8,7 @@ JOBS?=$(shell nproc --ignore=1)
|
||||
|
||||
# whisper.cpp version
|
||||
WHISPER_REPO?=https://github.com/ggml-org/whisper.cpp
|
||||
WHISPER_CPP_VERSION?=7849aff7a2e1f4234aa31b01a1870906d5431959
|
||||
WHISPER_CPP_VERSION?=44fa2f647cf2a6953493b21ab83b50d5f5dbc483
|
||||
|
||||
CMAKE_ARGS+=-DBUILD_SHARED_LIBS=OFF
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
bark==0.1.5
|
||||
grpcio==1.75.1
|
||||
grpcio==1.74.0
|
||||
protobuf
|
||||
certifi
|
||||
@@ -1,3 +1,3 @@
|
||||
grpcio==1.75.1
|
||||
grpcio==1.74.0
|
||||
protobuf
|
||||
grpcio-tools
|
||||
@@ -1,4 +1,4 @@
|
||||
grpcio==1.75.1
|
||||
grpcio==1.74.0
|
||||
protobuf
|
||||
certifi
|
||||
packaging==24.1
|
||||
@@ -1,5 +1,5 @@
|
||||
setuptools
|
||||
grpcio==1.75.1
|
||||
grpcio==1.74.0
|
||||
pillow
|
||||
protobuf
|
||||
certifi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
grpcio==1.75.1
|
||||
grpcio==1.74.0
|
||||
protobuf
|
||||
certifi
|
||||
wheel
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
grpcio==1.75.1
|
||||
grpcio==1.74.0
|
||||
protobuf
|
||||
certifi
|
||||
@@ -1,4 +1,4 @@
|
||||
grpcio==1.75.1
|
||||
grpcio==1.75.0
|
||||
protobuf==6.32.0
|
||||
certifi
|
||||
setuptools
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
grpcio==1.75.1
|
||||
grpcio==1.74.0
|
||||
protobuf
|
||||
certifi
|
||||
setuptools
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
name: "granite-3.2"
|
||||
|
||||
config_file: |
|
||||
backend: "llama-cpp"
|
||||
mmap: true
|
||||
template:
|
||||
chat_message: |
|
||||
<|start_of_role|>{{ .RoleName }}<|end_of_role|>
|
||||
{{ if .FunctionCall -}}
|
||||
<tool_call>
|
||||
{{ else if eq .RoleName "tool" -}}
|
||||
<tool_response>
|
||||
{{ end -}}
|
||||
{{ if .Content -}}
|
||||
{{.Content }}
|
||||
{{ end -}}
|
||||
{{ if eq .RoleName "tool" -}}
|
||||
</tool_response>
|
||||
{{ end -}}
|
||||
{{ if .FunctionCall -}}
|
||||
{{toJson .FunctionCall}}
|
||||
</tool_call>
|
||||
{{ end -}}
|
||||
<|end_of_text|>
|
||||
function: |
|
||||
<|start_of_role|>system<|end_of_role|>
|
||||
You are a helpful AI assistant with access to the following tools. When a tool is required to answer the user's query, respond with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.
|
||||
|
||||
Write the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.
|
||||
{{range .Functions}}
|
||||
{'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }}
|
||||
{{end}}
|
||||
For each function call return a json object with function name and arguments
|
||||
{{.Input -}}
|
||||
<|start_of_role|>assistant<|end_of_role|>
|
||||
chat: |
|
||||
{{.Input -}}
|
||||
<|start_of_role|>assistant<|end_of_role|>
|
||||
completion: |
|
||||
{{.Input}}
|
||||
context_size: 8192
|
||||
f16: true
|
||||
stopwords:
|
||||
- '<|im_end|>'
|
||||
- '<dummy32000>'
|
||||
- '</s>'
|
||||
- '<|end_of_text|>'
|
||||
@@ -1,68 +1,4 @@
|
||||
---
|
||||
- &granite4
|
||||
url: "github:mudler/LocalAI/gallery/granite4.yaml@master"
|
||||
name: "ibm-granite_granite-4.0-h-small"
|
||||
license: apache-2.0
|
||||
icon: https://cdn-avatars.huggingface.co/v1/production/uploads/639bcaa2445b133a4e942436/CEW-OjXkRkDNmTxSu8Egh.png
|
||||
tags:
|
||||
- gguf
|
||||
- GPU
|
||||
- CPU
|
||||
- text-to-text
|
||||
urls:
|
||||
- https://huggingface.co/ibm-granite/granite-4.0-h-small
|
||||
- https://huggingface.co/bartowski/ibm-granite_granite-4.0-h-small-GGUF
|
||||
description: |
|
||||
Granite-4.0-H-Small is a 32B parameter long-context instruct model finetuned from Granite-4.0-H-Small-Base using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets. This model is developed using a diverse set of techniques with a structured chat format, including supervised finetuning, model alignment using reinforcement learning, and model merging. Granite 4.0 instruct models feature improved instruction following (IF) and tool-calling capabilities, making them more effective in enterprise applications.
|
||||
overrides:
|
||||
parameters:
|
||||
model: ibm-granite_granite-4.0-h-small-Q4_K_M.gguf
|
||||
files:
|
||||
- filename: ibm-granite_granite-4.0-h-small-Q4_K_M.gguf
|
||||
sha256: c59ce76239bd5794acdbdf88616dfc296247f4e78792a9678d4b3e24966ead69
|
||||
uri: huggingface://bartowski/ibm-granite_granite-4.0-h-small-GGUF/ibm-granite_granite-4.0-h-small-Q4_K_M.gguf
|
||||
- !!merge <<: *granite4
|
||||
name: "ibm-granite_granite-4.0-h-tiny"
|
||||
urls:
|
||||
- https://huggingface.co/ibm-granite/granite-4.0-h-tiny
|
||||
- https://huggingface.co/bartowski/ibm-granite_granite-4.0-h-tiny-GGUF
|
||||
description: |
|
||||
Granite-4.0-H-Tiny is a 7B parameter long-context instruct model finetuned from Granite-4.0-H-Tiny-Base using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets. This model is developed using a diverse set of techniques with a structured chat format, including supervised finetuning, model alignment using reinforcement learning, and model merging. Granite 4.0 instruct models feature improved instruction following (IF) and tool-calling capabilities, making them more effective in enterprise applications.
|
||||
overrides:
|
||||
parameters:
|
||||
model: ibm-granite_granite-4.0-h-tiny-Q4_K_M.gguf
|
||||
files:
|
||||
- filename: ibm-granite_granite-4.0-h-tiny-Q4_K_M.gguf
|
||||
sha256: 33a689fe7f35b14ebab3ae599b65aaa3ed8548c393373b1b0eebee36c653146f
|
||||
uri: huggingface://bartowski/ibm-granite_granite-4.0-h-tiny-GGUF/ibm-granite_granite-4.0-h-tiny-Q4_K_M.gguf
|
||||
- !!merge <<: *granite4
|
||||
name: "ibm-granite_granite-4.0-h-micro"
|
||||
urls:
|
||||
- https://huggingface.co/ibm-granite/granite-4.0-h-micro
|
||||
- https://huggingface.co/bartowski/ibm-granite_granite-4.0-h-micro-GGUF
|
||||
description: |
|
||||
Granite-4.0-H-Micro is a 3B parameter long-context instruct model finetuned from Granite-4.0-H-Micro-Base using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets. This model is developed using a diverse set of techniques with a structured chat format, including supervised finetuning, model alignment using reinforcement learning, and model merging. Granite 4.0 instruct models feature improved instruction following (IF) and tool-calling capabilities, making them more effective in enterprise applications.
|
||||
overrides:
|
||||
parameters:
|
||||
model: ibm-granite_granite-4.0-h-micro-Q4_K_M.gguf
|
||||
files:
|
||||
- filename: ibm-granite_granite-4.0-h-micro-Q4_K_M.gguf
|
||||
sha256: 48376d61449687a56b3811a418d92cc0e8e77b4d96ec13eb6c9d9503968c9f20
|
||||
uri: huggingface://bartowski/ibm-granite_granite-4.0-h-micro-GGUF/ibm-granite_granite-4.0-h-micro-Q4_K_M.gguf
|
||||
- !!merge <<: *granite4
|
||||
name: "ibm-granite_granite-4.0-micro"
|
||||
urls:
|
||||
- https://huggingface.co/ibm-granite/granite-4.0-micro
|
||||
- https://huggingface.co/bartowski/ibm-granite_granite-4.0-micro-GGUF
|
||||
description: |
|
||||
Granite-4.0-Micro is a 3B parameter long-context instruct model finetuned from Granite-4.0-Micro-Base using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets. This model is developed using a diverse set of techniques with a structured chat format, including supervised finetuning, model alignment using reinforcement learning, and model merging. Granite 4.0 instruct models feature improved instruction following (IF) and tool-calling capabilities, making them more effective in enterprise applications.
|
||||
overrides:
|
||||
parameters:
|
||||
model: ibm-granite_granite-4.0-micro-Q4_K_M.gguf
|
||||
files:
|
||||
- filename: ibm-granite_granite-4.0-micro-Q4_K_M.gguf
|
||||
sha256: bd9d7b4795b9dc44e3e81aeae93bb5d8e6b891b7e823be5bf9910ed3ac060baf
|
||||
uri: huggingface://bartowski/ibm-granite_granite-4.0-micro-GGUF/ibm-granite_granite-4.0-micro-Q4_K_M.gguf
|
||||
- &ernie
|
||||
url: "github:mudler/LocalAI/gallery/chatml.yaml@master"
|
||||
name: "baidu_ernie-4.5-21b-a3b-thinking"
|
||||
|
||||
Reference in New Issue
Block a user