Nomic-Embed-Text Example
This document describes how to use the QAI AppBuilder Python API to run inference with the Nomic-Embed-Text text encoding model on Qualcomm® Hexagon™ Processor (NPU).
Supported devices
| Device | SoC |
|---|---|
| Fogwise® AIRbox Q900 | QCS9075 |
Install QAI AppBuilder
-
Install QAI AppBuilder by following the QAI AppBuilder installation guide.
-
Configure ADSP environment variables as described in Create ADSP environment variables.
Run the sample
Install dependencies
Install sample dependencies in the activated virtual environment:
pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless transformers
Run the script
-
Enter the upstream samples directory
Devicecd qai-appbuilder/samples -
Run inference
Devicepython3 Multimodal/Text_Generation/nomic_embed_text/nomic_embed_text.py --chipset 9075
On success the terminal prints an embedding vector (float array). The first run downloads the model and may also fetch Hugging Face tokenizer files.
Launcher alternative from samples:
python3 run_inference.py --list
python3 run_inference.py --model nomic_embed_text --args "--chipset 9075"