Skip to content

Commit

Permalink
feat: added zephyr-7b model
Browse files Browse the repository at this point in the history
  • Loading branch information
limcheekin committed Nov 6, 2023
1 parent 41e1ab0 commit 5152221
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Dev
on:
push:
branches:
- orca-mini-v3-7b
- zephyr-7b
jobs:
deploy-dev:
runs-on: ubuntu-latest
Expand All @@ -13,12 +13,12 @@ jobs:

steps:
- name: Checkout own repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Python packages
run: pip install modal-client
Expand All @@ -27,4 +27,4 @@ jobs:
run: cd ${{ github.ref_name }};modal deploy fastapi_app.py

- name: Test FastAPI app
run: "pwd;cd ${{ github.ref_name }};curl -X POST -H 'Content-Type: application/json' -d @prompt.json ${{ secrets.ORCA_MINI_V3_7B_APP_URL }}v1/completions"
run: "pwd;cd ${{ github.ref_name }};curl -X POST -H 'Content-Type: application/json' -d @prompt.json ${{ secrets.ZEPHYR_7B_APP_URL }}v1/completions"
4 changes: 2 additions & 2 deletions orca-mini-v3-7b/Dockerfile → zephyr-7b/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Grab a fresh copy of the Python image
FROM python:3.10-slim
FROM python:3.11-slim

# Install build and runtime dependencies
RUN apt-get update && \
Expand All @@ -15,4 +15,4 @@ RUN pip install -U pip setuptools wheel && \

# Download model
RUN mkdir model && \
curl -L https://huggingface.co/TheBloke/orca_mini_v3_7B-GGUF/resolve/main/orca_mini_v3_7b.Q4_K_M.gguf -o model/gguf-model.bin
curl -L https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/resolve/main/zephyr-7b-beta.Q6_K.gguf -o model/gguf-model.bin
4 changes: 2 additions & 2 deletions orca-mini-v3-7b/fastapi_app.py → zephyr-7b/fastapi_app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Modal Lab web app for llama.cpp.
from modal import Image, Stub, asgi_app

stub = Stub("orca-mini-v3-7b")
stub = Stub("zephyr-7b")

image = Image.from_dockerfile(
"Dockerfile", force_build=True
Expand All @@ -11,7 +11,7 @@
)


@stub.function(image=image, cpu=14, memory=7168, keep_warm=1, timeout=600)
@stub.function(image=image, cpu=14, memory=8704, keep_warm=1, timeout=600)
@asgi_app()
def fastapi_app():
from llama_cpp.server.app import create_app, Settings
Expand Down
4 changes: 2 additions & 2 deletions orca-mini-v3-7b/prompt.json → zephyr-7b/prompt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"prompt": [
"### System:\nYou are an AI assistant that follows instruction extremely well. Help as much as you can.\n\n### User:\nAnswer the question based on the context below.\n\nContext: The main benefit of operators is to automate operations. Kubernetes operators are capable to automate the expensive and error likely human operations. Features like autopilot and self-healing are typical scenarios. Another benefit of operators is the reusability of software. Software providers can expose operators in various catalogs to reach new markets and to promote their software. Operators leverage the Kubernetes community, since they are a natural and Kubernetes-native way to extend Kubernetes.\n\nQuestion: What are the main benefits of Kubernetes Operators?\n\n### Assistant:\n"
"<|system|>\nYou are an AI assistant that follows instruction extremely well. Help as much as you can.</s>\n<|user|>\nAnswer the question based on the context below.\n\nContext: The main benefit of operators is to automate operations. Kubernetes operators are capable to automate the expensive and error likely human operations. Features like autopilot and self-healing are typical scenarios. Another benefit of operators is the reusability of software. Software providers can expose operators in various catalogs to reach new markets and to promote their software. Operators leverage the Kubernetes community, since they are a natural and Kubernetes-native way to extend Kubernetes.\n\nQuestion: What are the main benefits of Kubernetes Operators?</s>\n<|assistant|>\n"
],
"max_tokens": 128,
"stop": ["\n\n", "###"]
"stop": ["<|system|>", "<|user|>", "<|assistant|>", "</s>"]
}

0 comments on commit 5152221

Please sign in to comment.