NexaAI /nexa-sdk

Run frontier LLMs and VLMs locally on Qualcomm devices across NPU, GPU, and CPU with a few lines of code

★ 8,489⑂ 1,075👁 531⑃ 773● 288▤ 78
8,489
stars
+0+3+61
1,075
forks
531
watchers
773
prs
288
issues
78
releases
–
discussions

README

在高通设备上本地运行前沿 LLM 与 VLM 的最简方式







文档 · 快速入门 · 模型 · 社区与联系方式

English · 简体中文



---

GenieX 是一款面向高通设备的端侧生成式 AI 推理运行时。你几乎可以引入任意来自 Hugging Face、ModelScope 或 Docker Hub 的 GGUF 模型,也可以使用来自 Qualcomm AI Hub 的预编译模型包。只需几行代码,即可在 Hexagon NPU、Adreno GPU 或 CPU 上本地运行。底层使用同一套 C SDK,并通过 CLI、Python、Kotlin/Java、Docker 以及一个 OpenAI 兼容服务器交互。它是 Qualcomm GENIE 的社区版本。


  


 支持的平台

GenieX 仅在高通骁龙(Qualcomm Snapdragon)上运行。找到你的平台,然后直接跳转到你想使用的接口。

| 平台 | 示例设备 | 跳转到快速入门 |
| --- | --- | --- |
| 🪟 Windows ARM64 (计算) | 骁龙 X · X Elite | CLI · Python · 本地服务器 |
| 🤖 Android (移动) | 骁龙 8 至尊版 · 8 至尊版 Gen 5 | Android SDK |
| 🐧 Linux ARM64 (物联网) | Dragonwing QCS9075 | CLI · Docker · Python |


 手边没有设备?在 Qualcomm Device Cloud 上开启一个远程会话。

---

 快速入门

从下方选择你的接口。每个接口都遵循相同的三个步骤:安装(Install)、运行(Run) 和 文档(Docs)。示例同时展示两种运行时:来自 Hugging Face、ModelScope 或 Docker Hub 的 GGUF 模型(llama_cpp),以及来自 Qualcomm AI Hub 的预编译模型包(qairt,NPU)。

 CLI

!Windows ARM64 !Linux ARM64

安装

- Windows ARM64 —— 下载安装程序,运行它,然后打开一个新终端。
- Linux ARM64 —— 一行命令,无需 sudo:
  bash
  curl -fsSL https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-geniex/install.sh | sh
  

运行 —— 一行命令即可与任意模型对话(对于 VLM,拖入一张图片即可):

bash
 来自 Hugging Face 的 GGUF → llama.cpp(NPU / GPU / CPU)
geniex infer google/gemma-4-E4B-it-qat-q4_0-gguf

 来自 ModelScope 的 GGUF → llama.cpp(NPU / GPU / CPU)
geniex infer https://modelscope.cn/models/Qwen/Qwen3-0.6B-GGUF

 来自 Qualcomm AI Hub 的预编译模型包 → Qualcomm AI Engine Direct(NPU)
geniex infer ai-hub-models/Qwen2.5-VL-7B-Instruct

 来自 Docker Hub 的 GGUF → llama.cpp(NPU / GPU / CPU)
geniex infer docker.io/ai/gemma3


📖 文档 —— 安装 · 快速入门 · 命令参考

 Python

!Windows ARM64 !Linux ARM64

安装

bash
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple geniex


运行 —— 与 Hugging Face transformers 保持一致(from_pretrained() → .generate()):

python
 来自 Hugging Face 的 GGUF → llama.cpp
from geniex import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3.5-2B-GGUF", precision="Q4_0")

messages = [{"role": "user", "content": "What is 2+2?"}]
prompt = model.tokenizer.apply_chat_template(messages, add_generation_prompt=True)

for chunk in model.generate(prompt, max_new_tokens=256, stream=True):
    print(chunk, end="", flush=True)

model.close()


python
 来自 Qualcomm AI Hub 的预编译模型包 → Qualcomm AI Engine Direct(NPU)
from geniex import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("ai-hub-models/Qwen3-4B")

messages = [{"role": "user", "content": "What is 2+2?"}]
prompt = model.tokenizer.apply_chat_template(messages, add_generation_prompt=True)

for chunk in model.generate(prompt, max_new_tokens=256, stream=True):
    print(chunk, end="", flush=True)

model.close()


📖 文档 —— 安装 · 快速入门 · API 参考

 OpenAI 兼容服务器

!Windows ARM64 !Linux ARM64

安装 —— 随 CLI 一同提供(见上文安装)。

运行 —— 拉取任意模型(GGUF 或 Qualcomm AI Hub 模型包),然后提供一个 OpenAI 兼容的 API:

bash
geniex pull ai-hub-models/Qwen3-4B-Instruct-2507
geniex serve    服务于 http://127.0.0.1:18181/v1


bash
curl http://127.0.0.1:18181/v1

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON