Skip to content

Commit 0c7d99e

Browse files
committed
Update on "[Executorch] Add quantized kv cache to oss ci"
Fixes to make sure quantized kv cache works in oss Differential Revision: [D66269487](https://our.internmc.facebook.com/intern/diff/D66269487/) [ghstack-poisoned]
2 parents 1c93b02 + 7e99fdd commit 0c7d99e

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.ci/scripts/test_llama.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ else
7070
COREML=OFF
7171
fi
7272

73+
if [[ "${MODE}" =~ .*quantize_kv.* ]]; then
74+
QUANTIZE_KV_CACHE=ON
75+
else
76+
QUANTIZE_KV_CACHE=OFF
77+
fi
78+
7379
echo "COREML option ${COREML}"
7480

7581
if [[ "${MODE}" =~ .*qnn.* ]]; then
@@ -205,6 +211,9 @@ fi
205211
if [[ "${QNN}" == "ON" ]]; then
206212
EXPORT_ARGS="${EXPORT_ARGS} -kv -v --qnn --disable_dynamic_shape"
207213
fi
214+
if [[ "${QUANTIZE_KV_CACHE}" == "ON" ]]; then
215+
EXPORT_ARGS="${EXPORT_ARGS} --quantize_kv_cache"
216+
fi
208217
# Add dynamically linked library location
209218
$PYTHON_EXECUTABLE -m examples.models.llama.export_llama ${EXPORT_ARGS}
210219

.github/workflows/pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
strategy:
8787
matrix:
8888
dtype: [fp32]
89-
mode: [portable, xnnpack+custom, xnnpack+custom+qe]
89+
mode: [portable, xnnpack+custom, xnnpack+custom+qe,xnnpack+custom+quantize_kv,xnnpack+quantize_kv]
9090
include:
9191
- dtype: bf16
9292
mode: portable

.github/workflows/trunk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ jobs:
225225
strategy:
226226
matrix:
227227
dtype: [fp32]
228-
mode: [portable, xnnpack+kv+custom, mps, coreml]
228+
mode: [portable, xnnpack+kv+custom, mps, coreml, xnnpack+custom+quantize_kv]
229229
include:
230230
- dtype: bf16
231231
mode: portable

0 commit comments

Comments
 (0)