Clef-Flash
Overview
Clef-Flash answers choice, yes/no probability and ordinal-score questions from text and images on an on-device NPU. Based on Clef-Flash.
Demo recording: reserved for a post-release recording.
The model files use the AIDEM format and are loaded by the matching SDK in the Demo repository. The device needs Aidlux LMS (sudo lms check returns true); no separate QNN installation is required.
Download
First follow Install. Then, from the Demo root, download the shared files and one device target. The commands below use QCS8550; for another device, use the folder in the table below. These language packages require the matching SDK with support for grouped Genie AIDEM.
For a private model, run hf auth login first.
hf download APLUX-Pandora/clef-flash --local-dir models --exclude "targets/*" --exclude "media/*" --exclude README.md --exclude .gitattributes
hf download APLUX-Pandora/clef-flash --local-dir models --include "targets/qcs8550_qnn248/*"
Verify the downloaded target:
(
set -o pipefail
cd models || exit 1
awk -v target="targets/qcs8550_qnn248/" '
# Skip the 64-character digest and its two-character separator.
{ path = substr($0, 67) }
index(path, target) == 1 { found = 1; print; next }
path !~ /^(targets|media)\// && path != "README.md" && path != ".gitattributes"
END {
if (!found) {
print "No checksum entries for " target > "/dev/stderr"
exit 1
}
}
' SHA256SUMS | sha256sum --check --strict
)
If you downloaded a different target, replace qcs8550_qnn248 in the check with its folder name.
| SoC | Target folder |
|---|---|
| QCS8550 | targets/qcs8550_qnn248 |
| QCS8625 | targets/qcs8625_qnn248 |
| QCS8275 (IQ8) | targets/qcs8275_qnn248 |
| QCS9075 (IQ9) | targets/qcs9075_qnn248 |
QCS8275 also accepts the QCS8625 target when the QCS8275 folder is absent.
Demo and Python Usage
Complete Install and the download above, then follow Run the Web Demo. For Python, in the same environment:
from pandora_clef_flash import DecisionModel
with DecisionModel.from_pretrained("models") as model:
result = model.systemone({
"state": "My card was charged twice for the same order.",
"questions": {
"team": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {"Billing": "Payments and refunds", "Support": "Technical problems"},
},
},
})
print(result["answers"]["team"]["choice"])
License
The original model and tokenizer retain their Apache-2.0 terms. See NOTICE.