diff --git a/.ci/docker/ci_commit_pins/pytorch.txt b/.ci/docker/ci_commit_pins/pytorch.txt index 64dbd40e9a6..4567f7573fb 100644 --- a/.ci/docker/ci_commit_pins/pytorch.txt +++ b/.ci/docker/ci_commit_pins/pytorch.txt @@ -1 +1 @@ -7a79b41e29a790ebb4b530eb98a89381e2d7de29 +fb5eb9107d1e94001d80b4beda785aa6864d12ab diff --git a/backends/openvino/requirements.txt b/backends/openvino/requirements.txt index 519818d0aac..367fce7fea1 100644 --- a/backends/openvino/requirements.txt +++ b/backends/openvino/requirements.txt @@ -1,2 +1,2 @@ transformers -git+https://github.com/openvinotoolkit/nncf@3d753ac#egg=nncf +git+https://github.com/openvinotoolkit/nncf@61ea196235f8edf474d19acf237f2511f3c75348 diff --git a/examples/models/llama/install_requirements.sh b/examples/models/llama/install_requirements.sh index 8a2fa25d244..6a9522d3ccd 100755 --- a/examples/models/llama/install_requirements.sh +++ b/examples/models/llama/install_requirements.sh @@ -11,7 +11,8 @@ # Install snakeviz for cProfile flamegraph # Install lm-eval for Model Evaluation with lm-evalution-harness. # Install safetensors to load safetensors checkpoints (currently adapter only). -pip install hydra-core huggingface_hub tiktoken torchtune sentencepiece tokenizers snakeviz lm_eval==0.4.5 blobfile safetensors +pip install hydra-core huggingface_hub tiktoken sentencepiece tokenizers snakeviz lm_eval==0.4.5 blobfile safetensors +pip install git+https://github.com/pytorch/torchtune.git@44271b570af36cfda8ee20a4479d2652770378c0 # Call the install helper for further setup python examples/models/llama/install_requirement_helper.py diff --git a/examples/qualcomm/oss_scripts/llama/eval_llama_qnn.py b/examples/qualcomm/oss_scripts/llama/eval_llama_qnn.py index 53f359d2268..6323ed7e338 100644 --- a/examples/qualcomm/oss_scripts/llama/eval_llama_qnn.py +++ b/examples/qualcomm/oss_scripts/llama/eval_llama_qnn.py @@ -10,7 +10,6 @@ import logging import sys -import types import torch @@ -57,8 +56,6 @@ QuantizationRecipe, quantize_module_swap, ) -from torchao.prototype.spinquant import apply_spinquant - from torchao.quantization.pt2e.quantize_pt2e import convert_pt2e, prepare_pt2e from torchao.quantization.pt2e.quantizer import QuantizationSpec from transformers import AutoTokenizer @@ -220,24 +217,6 @@ def prequant_algorithm(model, prefill_config, args): scales_state_dict = {} - if args.spinquant: - config = types.SimpleNamespace( - dim=prefill_config.dim, - head_dim=prefill_config.dim // prefill_config.n_heads, - n_local_heads=prefill_config.n_heads, - intermediate_size=4 * prefill_config.dim, - ) - model.config = config - apply_spinquant( - model, - use_r1=True, - use_r2=True, - use_r4=False, - pretrained_rotation_path=None, - qkv_split=True, - ) - logging.info("Applied SpinQuant to the model") - if args.range_setting == "mse_with_act_loss": wrapped_model = WrappedLlamaModel( model, *atten_mask, args.use_kv_cache, args.max_seq_length, args.device @@ -337,7 +316,7 @@ def eval_llm(args): logging.info("Observers added, starting calibration...") graph_module_inference( use_kv_cache=False, - get_example_inputs=lambda use_kv_cache=False: inputs, + example_input=inputs, module=model, tokenizer=tokenizer, ar_len=args.max_seq_len, @@ -371,7 +350,7 @@ def eval_llm(args): logging.info("Evaluation of QDQ model:") graph_module_inference( use_kv_cache=False, - get_example_inputs=lambda use_kv_cache=False: inputs, + example_input=inputs, module=model, tokenizer=tokenizer, ar_len=args.max_seq_len, @@ -398,11 +377,6 @@ def main() -> None: help="Choose which range setting method for weight quantization (e.g. mse_weight_only or mse_with_act_loss). If not specified, defaults to minmax", type=str, ) - parser.add_argument( - "--spinquant", - help="Apply SpinQuant (R1+R2) to the model. Uses random Hadamard matrices for rotations", - action="store_true", - ) parser.add_argument( "--fraction", help="the fraction of examples per task (only use this for testing)", diff --git a/install_requirements.py b/install_requirements.py index d28591fd232..f72bbb5e439 100644 --- a/install_requirements.py +++ b/install_requirements.py @@ -133,7 +133,7 @@ def install_optional_example_requirements(use_pytorch_nightly): else "torchvision" ), ( - f"torchaudio==2.10.0.{NIGHTLY_VERSION}" + f"torchaudio==2.11.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torchaudio" ), diff --git a/requirements-examples.txt b/requirements-examples.txt index 415e4101312..8420c96333e 100644 --- a/requirements-examples.txt +++ b/requirements-examples.txt @@ -3,5 +3,5 @@ datasets == 3.6.0 # 4.0.0 deprecates trust_remote_code and load scripts. For now pin to 3.6.0 timm == 1.0.7 torchsr == 1.0.4 -torchtune >= 0.6.1 +torchtune @ git+https://github.com/pytorch/torchtune.git@44271b570af36cfda8ee20a4479d2652770378c0 transformers == 5.0.0rc1 diff --git a/third-party/ao b/third-party/ao index 08e5e203f10..1cad3759374 160000 --- a/third-party/ao +++ b/third-party/ao @@ -1 +1 @@ -Subproject commit 08e5e203f1074a1663fe8293e184b252ea359f99 +Subproject commit 1cad3759374f8af6eaa57e11342a55ded3c97048 diff --git a/torch_pin.py b/torch_pin.py index 62a2572fd78..959de4b4e86 100644 --- a/torch_pin.py +++ b/torch_pin.py @@ -1,2 +1,2 @@ TORCH_VERSION = "2.11.0" -NIGHTLY_VERSION = "dev20251222" +NIGHTLY_VERSION = "dev20260120"