Skip to content

Commit

Permalink
merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyuan8 committed Aug 23, 2024
2 parents 59a0169 + 5a5a59e commit 9637c55
Show file tree
Hide file tree
Showing 36 changed files with 673 additions and 398 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-wheels-cpu-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
env:
# disable repair
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_BUILD_FRONTEND: "build"
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 "
CIBW_BUILD: "cp310-* cp311-* cp312-*"
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-wheels-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
env:
# disable repair
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_BUILD_FRONTEND: "build"
CIBW_SKIP: "*musllinux*"
CIBW_BUILD: "cp310-* cp311-* cp312-*"
CMAKE_BUILD_PARALLEL_LEVEL: 4
Expand Down Expand Up @@ -77,6 +78,7 @@ jobs:
env:
# disable repair
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_BUILD_FRONTEND: "build"
CIBW_BUILD: "cp310-* cp311-* cp312-*"
CMAKE_BUILD_PARALLEL_LEVEL: 16
with:
Expand Down Expand Up @@ -104,8 +106,9 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: "*musllinux* pp*"
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_BUILD_FRONTEND: "build"
CIBW_SKIP: "*musllinux* pp*"
CIBW_ARCHS: "aarch64"
CIBW_BUILD: "cp310-* cp311-* cp312-*"
CMAKE_BUILD_PARALLEL_LEVEL: $(nproc)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-wheels-metal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
env:
# disable repair
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_BUILD_FRONTEND: "build"
CIBW_ARCHS: "arm64"
CIBW_BUILD: "cp310-* cp311-* cp312-*"
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DGGML_METAL=ON -DSD_METAL=ON"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fetch-depth: 0 # This fetches all history so you can access any version of the submodules

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1>Nexa SDK</h1>

<img src="assets/banner.png" alt="icon"/>
<img src="./assets/banner.png" alt="icon"/>

[![MacOS][MacOS-image]][release-url] [![Linux][Linux-image]][release-url] [![Windows][Windows-image]][release-url]

Expand Down
2 changes: 1 addition & 1 deletion nexa/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.1"
__version__ = "0.0.6"
270 changes: 125 additions & 145 deletions nexa/cli/entry.py

Large diffs are not rendered by default.

92 changes: 89 additions & 3 deletions nexa/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@
"phi3v": "Phi-3-vision-128k-instruct:onnx-cpu-int4",
"sd1-5": "stable-diffusion-v1-5:onnx-cpu-fp32",
"lcm-dreamshaper": "lcm-dreamshaper-v7:onnx-cpu-fp32",
"whisper": "whisper-tiny:onnx-cpu-fp32",
"whisper-tiny.en": "whisper-tiny.en:onnx-cpu-fp32",
"whisper-tiny": "whisper-tiny:onnx-cpu-fp32",
"whisper-small.en": "whisper-small.en:onnx-cpu-fp32",
"whisper-small": "whisper-small:onnx-cpu-fp32",
"whisper-base.en": "whisper-base.en:onnx-cpu-fp32",
"whisper-base": "whisper-base:onnx-cpu-fp32",
"ljspeech": "ljspeech-jets:onnx-cpu-fp32",
}

Expand All @@ -86,10 +91,14 @@
"whisper-large": "whisper-large:bin-large-v3",
"whisper-tiny": "whisper-tiny:bin-tiny",
"faster-whisper-tiny": "faster-whisper-tiny:bin-cpu-fp16",
"faster-whisper-tiny.en": "faster-whisper-tiny.en:bin-cpu-fp16",
"faster-whisper-small": "faster-whisper-small:bin-cpu-fp16",
"faster-whisper-small.en": "faster-whisper-small.en:bin-cpu-fp16",
"faster-whisper-medium": "faster-whisper-medium:bin-cpu-fp16",
"faster-whisper-medium.en": "faster-whisper-medium.en:bin-cpu-fp16",
"faster-whisper-base": "faster-whisper-base:bin-cpu-fp16",
"faster-whisper-large": "faster-whisper-large:bin-cpu-fp16",
"faster-whisper-base.en": "faster-whisper-base.en:bin-cpu-fp16",
"faster-whisper-large": "faster-whisper-large-v3:bin-cpu-fp16",
}

NEXA_RUN_MODEL_MAP_FUNCTION_CALLING = {
Expand Down Expand Up @@ -129,6 +138,8 @@
**NEXA_RUN_MODEL_MAP_TEXT,
**NEXA_RUN_MODEL_MAP_VLM,
**NEXA_RUN_MODEL_MAP_IMAGE,
**NEXA_RUN_MODEL_MAP_VOICE,
**NEXA_RUN_MODEL_MAP_FUNCTION_CALLING,
}

NEXA_RUN_CHAT_TEMPLATE_MAP = {
Expand Down Expand Up @@ -205,4 +216,79 @@
"task": "transcribe",
"temperature": 0.0,
"compute_type": "default"
}
}

NEXA_OFFICIAL_MODELS_TYPE = {
'gemma-2b': 'NLP',
'Llama-2-7b-chat': 'NLP',
'Llama-2-7b': 'NLP',
'Meta-Llama-3-8B-Instruct': 'NLP',
'Meta-Llama-3.1-8B-Instruct': 'NLP',
'Mistral-7B-Instruct-v0.3': 'NLP',
'Mistral-7B-Instruct-v0.2': 'NLP',
'Phi-3-mini-128k-instruct': 'NLP',
'Phi-3-mini-4k-instruct': 'NLP',
'CodeQwen1.5-7B-Instruct': 'NLP',
'Qwen2-0.5B-Instruct': 'NLP',
'Qwen2-1.5B-Instruct': 'NLP',
'Qwen2-7B-Instruct': 'NLP',
'codegemma-2b': 'NLP',
'gemma-1.1-2b-instruct': 'NLP',
'gemma-2b-instruct': 'NLP',
'gemma-2-9b-instruct': 'NLP',
'gemma-1.1-7b-instruct': 'NLP',
'gemma-7b-instruct': 'NLP',
'gemma-7b': 'NLP',
'Qwen2-1.5B': 'NLP',
'codegemma-7b': 'NLP',
'TinyLlama-1.1B-Chat-v1.0': 'NLP',
'CodeLlama-7b-Instruct': 'NLP',
'gpt2': 'NLP',
'CodeLlama-7b': 'NLP',
'CodeLlama-7b-Python': 'NLP',
'Qwen1.5-7B-Instruct': 'NLP',
'Qwen1.5-7B': 'NLP',
'Phi-2': 'NLP',
'deepseek-coder-1.3b-instruct': 'NLP',
'deepseek-coder-1.3b-base': 'NLP',
'deepseek-coder-6.7b-instruct': 'NLP',
'dolphin-2.8-mistral-7b': 'NLP',
'gemma-2-2b-instruct': 'NLP',
'Octopus-v2': 'NLP',
'Octopus-v4': 'NLP',
'Octo-planner': 'NLP',
'deepseek-coder-6.7b-base': 'NLP',
'Llama2-7b-chat-uncensored': 'NLP',
'Llama3-8B-Lexi-Uncensored': 'NLP',
'Llama2-7b-function-calling': 'NLP',
'lcm-dreamshaper-v7': 'Computer Vision',
'stable-diffusion-v1-5': 'Computer Vision',
'stable-diffusion-v1-4': 'Computer Vision',
'stable-diffusion-v2-1': 'Computer Vision',
'sdxl-turbo': 'Computer Vision',
'hassaku-hentai-model-v13-LCM': 'Computer Vision',
'anything-v30-LCM': 'Computer Vision',
'Phi-3-vision-128k-instruct': 'Multimodal',
'nanoLLaVA': 'Multimodal',
'llava-v1.6-mistral-7b': 'Multimodal',
'llava-v1.6-vicuna-7b': 'Multimodal',
'llava-phi-3-mini': 'Multimodal',
'llava-llama-3-8b-v1.1': 'Multimodal',
'faster-whisper-tiny.en': 'Audio',
'faster-whisper-tiny': 'Audio',
'faster-whisper-small.en': 'Audio',
'faster-whisper-small': 'Audio',
'faster-whisper-medium.en': 'Audio',
'faster-whisper-medium': 'Audio',
'faster-whisper-base.en': 'Audio',
'faster-whisper-base': 'Audio',
'faster-whisper-large-v3': 'Audio',
'whisper-tiny.en': 'Audio',
'whisper-tiny': 'Audio',
'whisper-small.en': 'Audio',
'whisper-small': 'Audio',
'whisper-base.en': 'Audio',
'whisper-base': 'Audio',
}


Loading

0 comments on commit 9637c55

Please sign in to comment.