Skip to content

Chat support

Chat support #161

Workflow file for this run

---
name: Continuous Integration
on:
- pull_request
- workflow_dispatch
env:
MODEL_URL: https://huggingface.co/TheBloke/CodeLlama-7B-GGUF/resolve/main/codellama-7b.Q2_K.gguf
MODEL_NAME: codellama-7b.Q2_K.gguf
RERANKING_MODEL_URL: https://huggingface.co/gpustack/jina-reranker-v1-tiny-en-GGUF/resolve/main/jina-reranker-v1-tiny-en-Q4_0.gguf
RERANKING_MODEL_NAME: jina-reranker-v1-tiny-en-Q4_0.gguf
TOOL_CALLING_MODEL_URL: https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q8_0.gguf
TOOL_CALLING_MODEL_NAME: Llama-3.2-3B-Instruct-Q8_0.gguf
jobs:
build-and-test-linux:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: "11"
- name: Build libraries
run: |
mvn compile
.github/build.sh -DLLAMA_VERBOSE=ON
- name: Download text generation model
run: curl -L ${MODEL_URL} --create-dirs -o models/${MODEL_NAME}
- name: Download reranking model
run: curl -L ${RERANKING_MODEL_URL} --create-dirs -o models/${RERANKING_MODEL_NAME}
- name: Download tool calling model
run: curl -L ${TOOL_CALLING_MODEL_URL} --create-dirs -o models/${TOOL_CALLING_MODEL_NAME}
- name: List files in models directory
run: ls -l models/
- name: Run tests
run: mvn test
- if: failure()
uses: actions/upload-artifact@v4
with:
name: error-log-linux
path: ${{ github.workspace }}/hs_err_pid*.log
if-no-files-found: warn
build-and-test-macos:
name: ${{ matrix.target.runner }}
runs-on: ${{ matrix.target.runner }}
strategy:
fail-fast: false
matrix:
target:
- runner: macos-13
cmake: -DLLAMA_METAL=OFF -DLLAMA_VERBOSE=ON
- runner: macos-14
cmake: -DLLAMA_METAL_EMBED_LIBRARY=ON -DLLAMA_VERBOSE=ON
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: "11"
- name: Build libraries
run: |
mvn compile
.github/build.sh ${{ matrix.target.cmake }}
- name: Download text generaton model model
run: curl -L ${MODEL_URL} --create-dirs -o models/${MODEL_NAME}
- name: Download reranking model
run: curl -L ${RERANKING_MODEL_URL} --create-dirs -o models/${RERANKING_MODEL_NAME}
- name: Download tool calling model
run: curl -L ${TOOL_CALLING_MODEL_URL} --create-dirs -o models/${TOOL_CALLING_MODEL_NAME}
- name: List files in models directory
run: ls -l models/
- name: Run tests
run: mvn test
- if: failure()
uses: actions/upload-artifact@v4
with:
name: error-log-macos
path: ${{ github.workspace }}/hs_err_pid*.log
if-no-files-found: warn
build-and-test-windows:
name: windows-2019
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Build libraries
run: |
mvn compile
.github\build.bat -DLLAMA_VERBOSE=ON
- name: Download model
run: curl -L $env:MODEL_URL --create-dirs -o models/$env:MODEL_NAME
- name: Download reranking model
run: curl -L $env:RERANKING_MODEL_URL --create-dirs -o models/$env:RERANKING_MODEL_NAME
- name: Download tool calling model
run: curl -L $env:TOOL_CALLING_MODEL_URL --create-dirs -o models/$env:TOOL_CALLING_MODEL_NAME
- name: List files in models directory
run: ls -l models/
- name: Run tests
run: mvn test
- if: failure()
uses: actions/upload-artifact@v4
with:
name: windows-output
path: |
${{ github.workspace }}\hs_err_pid*.log
${{ github.workspace }}/src/main/resources/de/kherud/llama/**/*
if-no-files-found: warn