-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
86 lines (81 loc) · 3.2 KB
/
Copy pathpyproject.toml
File metadata and controls
86 lines (81 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[project]
name = "specula"
version = "0.1.0"
description = "Speculative decoding research on Snapdragon X2 Elite Extreme"
requires-python = ">=3.12"
dependencies = [
# HF model download & conversion (for future EAGLE-3 / DFlash GGUF conversion work)
"huggingface-hub>=0.24",
"transformers>=4.51",
"safetensors>=0.4",
"sentencepiece>=0.2",
# Analysis & plotting
"pandas>=2.2",
"numpy>=2.0",
"matplotlib>=3.9",
"seaborn>=0.13",
# Notebook
"jupyterlab>=4.2",
# Prompt corpus handling
"datasets>=3.0",
# HTTP for result uploads / sharing
"httpx>=0.27",
]
[project.optional-dependencies]
# Only needed if we want to run z-lab's reference DFlash (CUDA) on a different
# machine, or if we run Transformers-based inference locally on CPU for
# ground-truth comparisons against llama.cpp.
reference = [
"torch>=2.5",
"accelerate>=0.34",
]
# Phase 5 NPU drafting path. Pinned per docs/npu_scoping.md section 4.
# ORT-QNN bundles a signed QAIRT stack, which is the only path that loads on
# retail Windows on ARM without Secure Boot tricks.
npu = [
# 2.1.0 bundles QAIRT 2.45 (matches AI Hub default) but its
# context-binary loader has unrecoverable bugs on the X2E94100
# driver shipped with this machine — both the file-mapping retry
# path and embed_mode=1 path crash the interpreter with no
# traceback. See docs/npu_ort_qnn_version_match.md.
# Workable path: stay on 1.24.4 (legacy built-in EP, QAIRT 2.42)
# and pin AI Hub compiles to `--qairt_version 2.42` so the binary
# matches what 1.24.4 can read.
"onnxruntime-qnn==1.24.4",
"qai-hub>=0.48",
"onnx>=1.17",
# Hugging Face tooling for downloading pre-exported ONNX + BPE tokenizer.
# NOTE (historical): torch + optimum were initially excluded because
# torch had no cp312 win_arm64 wheel. As of 2026-04-23 this is no
# longer true — PyTorch 2.7+ ships win_arm64 cp312 wheels via
# download.pytorch.org/whl/cpu/ (not on PyPI). The export toolchain
# lives in the optional `npu-export` extra below; it's not pulled
# into `npu` because the inference path doesn't need it.
"huggingface-hub>=0.24",
"tokenizers>=0.20",
]
# Local ONNX export pipeline on Windows-on-ARM (and x86, identical pins).
# Verified on the X2E 2026-04-23 — see docs/exporting_on_arm.md.
# Install with: uv pip install -e .[npu-export] \
# --extra-index-url https://download.pytorch.org/whl/cpu
npu-export = [
# torch 2.10.0+cpu is the latest with a cp312-cp312-win_arm64 wheel
# at time of writing. 2.11.0 has no win_arm64 wheel yet.
"torch==2.10.0",
"optimum==2.1.0",
"optimum-onnx==0.1.0",
"transformers==4.57.6",
"onnx==1.21.0",
"onnx-graphsurgeon==0.6.1",
# onnxruntime CPU-only (no QNN) — the export pipeline only needs
# CPU-ORT for the cos-vs-source equivalence probes. Pinned to match
# the QAIRT version on the inference side (see `npu` extra above).
"onnxruntime==1.24.4",
]
[tool.uv]
# Default to CPU torch on Windows ARM (no CUDA, no ROCm on WoA).
# Reference implementations run on a different machine; Windows-ARM Python is
# for tooling, not inference.
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"