Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/docker/ci_commit_pins/pytorch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7a79b41e29a790ebb4b530eb98a89381e2d7de29
fb5eb9107d1e94001d80b4beda785aa6864d12ab
2 changes: 1 addition & 1 deletion backends/openvino/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
transformers
git+https://github.com/openvinotoolkit/nncf@3d753ac#egg=nncf
git+https://github.com/openvinotoolkit/nncf@61ea196235f8edf474d19acf237f2511f3c75348
3 changes: 2 additions & 1 deletion examples/models/llama/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 0 additions & 26 deletions examples/qualcomm/oss_scripts/llama/eval_llama_qnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import logging
import sys
import types

import torch

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)",
Expand Down
2 changes: 1 addition & 1 deletion install_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
),
Expand Down
2 changes: 1 addition & 1 deletion requirements-examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion third-party/ao
Submodule ao updated 256 files
2 changes: 1 addition & 1 deletion torch_pin.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TORCH_VERSION = "2.11.0"
NIGHTLY_VERSION = "dev20251222"
NIGHTLY_VERSION = "dev20260120"
Loading