Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor lint fixes #236

Merged
merged 1 commit into from
Apr 17, 2024
Merged
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
6 changes: 4 additions & 2 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ def callback(x):
import contextlib

generator_args.encoded_prompt = encoded
if (i != generator_args.num_samples - 1 or not profile) or (use_tp and rank != 0):
if (i != generator_args.num_samples - 1 or not profile) or (
use_tp and rank != 0
):
prof = contextlib.nullcontext()
else:
torch.profiler._utils._init_for_cuda_graphs()
Expand Down Expand Up @@ -495,7 +497,7 @@ def main(args):
speculative_builder_args = BuilderArgs.from_speculative_args(args)
tokenizer_args = TokenizerArgs.from_args(args)
generator_args = GeneratorArgs.from_args(args)

_main(
builder_args,
speculative_builder_args,
Expand Down
6 changes: 1 addition & 5 deletions quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,7 @@ def forward(self, input: torch.Tensor) -> torch.Tensor:


def replace_embedding_weight_only_grouped_int8_per_channel(
module,
device,
bitwidth: int = 8,
groupsize: Optional[int] = None,
packed=False
module, device, bitwidth: int = 8, groupsize: Optional[int] = None, packed=False
):
for name, child in module.named_children():
# print(f"name: {name}")
Expand Down
Loading