diff --git a/install/.pins/et-pin.txt b/install/.pins/et-pin.txt index a6f1373dd..6ff5d6ff1 100644 --- a/install/.pins/et-pin.txt +++ b/install/.pins/et-pin.txt @@ -1 +1 @@ -91298923a0076c1b41059efb6dad2876426e4b03 +6328d41eb87ee2fe8a8c0c5532e0b07ec4e90c73 diff --git a/install/install_requirements.sh b/install/install_requirements.sh index 43110da4d..412d5ae12 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -47,10 +47,11 @@ fi # NOTE: If a newly-fetched version of the executorch repo changes the value of # PYTORCH_NIGHTLY_VERSION, you should re-run this script to install the necessary # package versions. -PYTORCH_NIGHTLY_VERSION=dev20240814 + +PYTORCH_NIGHTLY_VERSION=dev20240913 # Nightly version for torchvision -VISION_NIGHTLY_VERSION=dev20240814 +VISION_NIGHTLY_VERSION=dev20240913 # Nightly version for torchtune TUNE_NIGHTLY_VERSION=dev20240910 @@ -74,7 +75,7 @@ fi # pip packages needed by exir. REQUIREMENTS_TO_INSTALL=( - torch=="2.5.0.${PYTORCH_NIGHTLY_VERSION}" + torch=="2.6.0.${PYTORCH_NIGHTLY_VERSION}" torchvision=="0.20.0.${VISION_NIGHTLY_VERSION}" torchtune=="0.3.0.${TUNE_NIGHTLY_VERSION}" ) diff --git a/torchchat/export.py b/torchchat/export.py index efc791dc8..e821c5ee4 100644 --- a/torchchat/export.py +++ b/torchchat/export.py @@ -194,7 +194,7 @@ def forward(self, x, freqs_cis, mask, input_pos=None): return self.wo(output) def replace_attention_with_custom_sdpa_attention(module: nn.Module): - from executorch.examples.models.llama2.custom_ops import ( # noqa + from executorch.extension.llm.custom_ops import ( # noqa sdpa_with_kv_cache, ) @@ -304,7 +304,6 @@ def export_for_et(model, device, output_path) -> str: edge_manager = edge_manager.to_backend(XnnpackDynamicallyQuantizedPartitioner()) export_program = edge_manager.to_executorch( ExecutorchBackendConfig( - extract_constant_segment=True, extract_delegate_segments=True, passes=[ QuantFusionPass(), diff --git a/torchchat/model.py b/torchchat/model.py index 2cba9a032..c46e61558 100644 --- a/torchchat/model.py +++ b/torchchat/model.py @@ -744,7 +744,7 @@ def apply_rotary_emb(x: Tensor, freqs_cis: Tensor) -> Tensor: from executorch.extension.pybindings import portable_lib as exec_lib # ET changed the way it's loading the custom ops so it's not included in portable_lib but has to be loaded separately. - from executorch.examples.models.llama2.custom_ops import sdpa_with_kv_cache # no-qa + from executorch.extension.llm.custom_ops import sdpa_with_kv_cache # no-qa class PTEModel(nn.Module): def __init__(self, config, path) -> None: diff --git a/torchchat/utils/scripts/build_native.sh b/torchchat/utils/scripts/build_native.sh index aacd97415..960dac90d 100755 --- a/torchchat/utils/scripts/build_native.sh +++ b/torchchat/utils/scripts/build_native.sh @@ -53,12 +53,11 @@ if [ -z "${TORCHCHAT_ROOT}" ]; then # Get the absolute path of the current script SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" # Get the absolute path of the parent directory - TORCHCHAT_ROOT="$(dirname "$SCRIPT_PATH")" - source "$TORCHCHAT_ROOT/scripts/install_utils.sh" -else - source "$TORCHCHAT_ROOT/torchchat/utils/scripts/install_utils.sh" + TORCHCHAT_ROOT="$(dirname "$(dirname "$(dirname "$SCRIPT_PATH")")")" fi +source "$TORCHCHAT_ROOT/torchchat/utils/scripts/install_utils.sh" + if [ -z "${ET_BUILD_DIR}" ]; then ET_BUILD_DIR="et-build" fi diff --git a/torchchat/utils/scripts/install_utils.sh b/torchchat/utils/scripts/install_utils.sh index f915402e7..5bb257ffd 100644 --- a/torchchat/utils/scripts/install_utils.sh +++ b/torchchat/utils/scripts/install_utils.sh @@ -13,7 +13,7 @@ if [ -z "$TORCHCHAT_ROOT" ]; then fi install_pip_dependencies() { - echo "Intalling common pip packages" + echo "Installing common pip packages" pip3 install wheel "cmake>=3.19" ninja zstd pushd ${TORCHCHAT_ROOT} pip3 install -r install/requirements.txt