Skip to content

Commit

Permalink
use tinyllama
Browse files Browse the repository at this point in the history
Signed-off-by: Sertac Ozercan <[email protected]>
  • Loading branch information
sozercan committed Dec 4, 2023
1 parent a5223b1 commit 42ad5d7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ jobs:
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: cosign sign --yes "ghcr.io/sozercan/aikit@${DIGEST}"

- name: Verify image signature
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: |
cosign verify ghcr.io/sozercan/${{ env.MODEL_NAME }}:${{ env.MODEL_SIZE }}${{ env.MODEL_RUNTIME }}@${DIGEST} \
--certificate-identity https://github.com/sozercan/aikit/.github/workflows/pre-release.yaml@refs/heads/main \
--certificate-oidc-issuer https://token.actions.githubusercontent.com | jq
8 changes: 8 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ jobs:
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: cosign sign --yes "ghcr.io/sozercan/aikit@${DIGEST}"

- name: Verify image signature
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: |
cosign verify ghcr.io/sozercan/${{ env.MODEL_NAME }}:${{ env.MODEL_SIZE }}${{ env.MODEL_RUNTIME }}@${DIGEST} \
--certificate-identity https://github.com/sozercan/aikit/.github/workflows/release.yaml@refs/heads/main \
--certificate-oidc-issuer https://token.actions.githubusercontent.com | jq
13 changes: 11 additions & 2 deletions .github/workflows/test-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,19 @@ jobs:
- uses: crazy-max/ghaction-github-runtime@v3

- name: build aikit
run: docker buildx build . -t aikit:test --load --cache-from=type=gha,scope=aikit --cache-to=type=gha,scope=aikit,mode=max
run: |
docker buildx build . -t aikit:test \
--load --progress plain \
--cache-from=type=gha,scope=aikit \
--cache-to=type=gha,scope=aikit,mode=max
- name: build test model
run: docker buildx build . -t testmodel:test -f test/aikitfile.yaml --load --cache-from=type=gha,scope=testmodel --cache-to=type=gha,scope=testmodel,mode=max
run: |
docker buildx build . -t testmodel:test \
-f test/aikitfile.yaml \
--load --progress plain \
--cache-from=type=gha,scope=testmodel \
--cache-to=type=gha,scope=testmodel,mode=max
- name: list images
run: docker images
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/update-models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
id: build-and-push
with:
push: true
tags: ghcr.io/sozercan/${{ env.MODEL_NAME }}:${{ env.MODEL_SIZE }}${{ env.MODEL_RUNTIME }}
Expand All @@ -59,7 +60,7 @@ jobs:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: cosign sign --yes "ghcr.io/sozercan/${{ env.MODEL_NAME }}:${{ env.MODEL_SIZE }}${{ env.MODEL_RUNTIME }}@${DIGEST}"

- name: verify image signature
- name: Verify image signature
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: |
Expand Down
1 change: 1 addition & 0 deletions test/aikitfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ config: |
top_p: 0.7
model: tinyllama-1.1b-chat-v0.3.Q4_K_M.gguf
context_size: 1000
mmap: false
4 changes: 2 additions & 2 deletions test/bats/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ load helpers
WAIT_TIME=120
SLEEP_TIME=1

@test "send request to llama-2-7b-chat" {
@test "send request to tinyllama-1.1b-chat" {
run curl --retry 20 --retry-all-errors http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "llama-2-7b-chat",
"model": "tinyllama-1.1b-chat",
"messages": [{"role": "user", "content": "explain kubernetes in a sentence"}],
}'
assert_success
Expand Down

0 comments on commit 42ad5d7

Please sign in to comment.