From 5ab9d7e07feb7063a53ed3c9a743f76ec27786fd Mon Sep 17 00:00:00 2001 From: Tugsbayasgalan Manlaibaatar Date: Sun, 20 Oct 2024 13:43:26 -0700 Subject: [PATCH 1/6] Use training IR in torchchat export --- install/install_requirements.sh | 2 +- torchchat/export.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/install_requirements.sh b/install/install_requirements.sh index 6344509d8..704ff1570 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -47,7 +47,7 @@ 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=dev20241002 +PYTORCH_NIGHTLY_VERSION=dev20241019 # Nightly version for torchvision VISION_NIGHTLY_VERSION=dev20241002 diff --git a/torchchat/export.py b/torchchat/export.py index 626d4fae3..30c064ee2 100644 --- a/torchchat/export.py +++ b/torchchat/export.py @@ -110,7 +110,7 @@ def export_for_server( from executorch.exir.tracer import Value from torch._export import capture_pre_autograd_graph - from torch.export import export, ExportedProgram + from torch.export import export_for_training, ExportedProgram from torchchat.model import apply_rotary_emb, Attention from torchchat.utils.build_utils import get_precision @@ -226,7 +226,7 @@ def _to_core_aten( raise ValueError( f"Expected passed in model to be an instance of fx.GraphModule, got {type(model)}" ) - core_aten_ep = export(model, example_inputs, dynamic_shapes=dynamic_shapes) + core_aten_ep = export_for_training(model, example_inputs, dynamic_shapes=dynamic_shapes) if verbose: logging.info(f"Core ATen graph:\n{core_aten_ep.graph}") return core_aten_ep From afb0375587c05aa52e4b4ac96dded64ad2cc1850 Mon Sep 17 00:00:00 2001 From: Tugsbayasgalan Manlaibaatar Date: Sun, 20 Oct 2024 13:54:48 -0700 Subject: [PATCH 2/6] Update torchvision --- install/install_requirements.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install_requirements.sh b/install/install_requirements.sh index 704ff1570..282dde922 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -50,7 +50,7 @@ fi PYTORCH_NIGHTLY_VERSION=dev20241019 # Nightly version for torchvision -VISION_NIGHTLY_VERSION=dev20241002 +VISION_NIGHTLY_VERSION=dev20241019 # Nightly version for torchtune TUNE_NIGHTLY_VERSION=dev20241010 From d237ba8d249a9fbfd422d12b67decfbd648499fa Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Fri, 25 Oct 2024 11:55:41 -0700 Subject: [PATCH 3/6] Testing newer pin --- install/install_requirements.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install_requirements.sh b/install/install_requirements.sh index 282dde922..f90b315ce 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -47,10 +47,10 @@ 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=dev20241019 +PYTORCH_NIGHTLY_VERSION=dev20241024 # Nightly version for torchvision -VISION_NIGHTLY_VERSION=dev20241019 +VISION_NIGHTLY_VERSION=dev20241024 # Nightly version for torchtune TUNE_NIGHTLY_VERSION=dev20241010 From 99551ff2ee7cff2abf1c7922e63043359093722f Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Fri, 25 Oct 2024 12:05:20 -0700 Subject: [PATCH 4/6] Rebumping nightly since 1024 doesn't exist for vision --- install/install_requirements.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install_requirements.sh b/install/install_requirements.sh index f90b315ce..f07511185 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -47,10 +47,10 @@ 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=dev20241024 +PYTORCH_NIGHTLY_VERSION=dev20241025 # Nightly version for torchvision -VISION_NIGHTLY_VERSION=dev20241024 +VISION_NIGHTLY_VERSION=dev20241025 # Nightly version for torchtune TUNE_NIGHTLY_VERSION=dev20241010 From 16a28f44c375a3a116849e2a3442f57067a0a7f8 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Fri, 25 Oct 2024 12:08:54 -0700 Subject: [PATCH 5/6] Update install_requirements.sh --- install/install_requirements.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install_requirements.sh b/install/install_requirements.sh index f07511185..d0f88d059 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -47,7 +47,7 @@ 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=dev20241025 +PYTORCH_NIGHTLY_VERSION=dev20241024 # Nightly version for torchvision VISION_NIGHTLY_VERSION=dev20241025 From 3911e4cf145d97271d2012bf6d24eda20fe3966f Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Tue, 29 Oct 2024 16:57:25 -0700 Subject: [PATCH 6/6] Update install_requirements.sh to 1028 --- install/install_requirements.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install_requirements.sh b/install/install_requirements.sh index d0f88d059..7c0d74f7a 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -47,10 +47,10 @@ 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=dev20241024 +PYTORCH_NIGHTLY_VERSION=dev20241028 # Nightly version for torchvision -VISION_NIGHTLY_VERSION=dev20241025 +VISION_NIGHTLY_VERSION=dev20241028 # Nightly version for torchtune TUNE_NIGHTLY_VERSION=dev20241010