mirror of
https://github.com/mudler/LocalAI.git
synced 2024-06-07 19:40:48 +00:00
1120847f72
**Description** This PR syncs up the `llama` backend to use `gguf` (https://github.com/go-skynet/go-llama.cpp/pull/180). It also adds `llama-stable` to the targets so we can still load ggml. It adapts the current tests to use the `llama-backend` for ggml and uses a `gguf` model to run tests on the new backend. In order to consume the new version of go-llama.cpp, it also bump go to 1.21 (images, pipelines, etc) --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
85 lines
2.0 KiB
YAML
85 lines
2.0 KiB
YAML
name: Build and Release
|
|
|
|
on: push
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-linux:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- build: 'avx2'
|
|
defines: ''
|
|
- build: 'avx'
|
|
defines: '-DLLAMA_AVX2=OFF'
|
|
- build: 'avx512'
|
|
defines: '-DLLAMA_AVX512=ON'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '>=1.21.0'
|
|
- name: Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install build-essential ffmpeg
|
|
- name: Build
|
|
id: build
|
|
env:
|
|
CMAKE_ARGS: "${{ matrix.defines }}"
|
|
BUILD_ID: "${{ matrix.build }}"
|
|
run: |
|
|
STATIC=true make dist
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.build }}
|
|
path: release/
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
release/*
|
|
|
|
build-macOS:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- build: 'avx2'
|
|
defines: ''
|
|
- build: 'avx'
|
|
defines: '-DLLAMA_AVX2=OFF'
|
|
- build: 'avx512'
|
|
defines: '-DLLAMA_AVX512=ON'
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '>=1.21.0'
|
|
- name: Build
|
|
id: build
|
|
env:
|
|
CMAKE_ARGS: "${{ matrix.defines }}"
|
|
BUILD_ID: "${{ matrix.build }}"
|
|
run: |
|
|
make dist
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.build }}
|
|
path: release/
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
release/* |