Skip to content

Commit 7315894

Browse files
committed
fix missing operators for eval_llama_lib
1 parent 20b8f83 commit 7315894

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/models/llama2/eval_llama_lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ def __init__(
4444
super().__init__(None, tokenizer, max_seq_length)
4545
self._model = model # Expects model to be path to a .pte file
4646

47+
from executorch.extension.pybindings import portable_lib # noqa
4748
from executorch.extension.pybindings.portable_lib import _load_for_executorch
48-
49+
# Note: import this after portable_lib
50+
from executorch.extension.llm.custom_ops import sdpa_with_kv_cache # noqa
51+
from executorch.kernels import quantized
52+
4953
self._et_model = _load_for_executorch(self._model)
5054
self._use_kv_cache = self._et_model.run_method("use_kv_cache")[0]
5155

0 commit comments

Comments
 (0)