This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
SmoothQuant implementation. See: https://arxiv.org/pdf/2211.10438.pdf | |
Some details are model-specific, so the code may need tweaking. | |
""" | |
import functools | |
import torch | |
from torch import nn, Tensor | |
from typing import Dict, Iterable, Tuple | |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Establish whether Chrome is already open or not | |
tell application "System Events" | |
set isRunning to (name of processes) contains "Google Chrome" | |
end tell | |
-- Count the number of open windows. This is useful later on. | |
tell application "Google Chrome" | |
set windowCount to count windows | |
end tell |