Skip to content

Commit

Permalink
Minor lint fixes (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergennachin authored and metascroy committed Apr 17, 2024
1 parent 8bab8d1 commit 5d7682b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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

0 comments on commit 5d7682b

Please sign in to comment.