Skip to content

Commit 94c5d8e

Browse files
authored
Minor lint fixes (#236)
1 parent 1ea7739 commit 94c5d8e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

generate.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,9 @@ def callback(x):
435435
import contextlib
436436

437437
generator_args.encoded_prompt = encoded
438-
if (i != generator_args.num_samples - 1 or not profile) or (use_tp and rank != 0):
438+
if (i != generator_args.num_samples - 1 or not profile) or (
439+
use_tp and rank != 0
440+
):
439441
prof = contextlib.nullcontext()
440442
else:
441443
torch.profiler._utils._init_for_cuda_graphs()
@@ -495,7 +497,7 @@ def main(args):
495497
speculative_builder_args = BuilderArgs.from_speculative_args(args)
496498
tokenizer_args = TokenizerArgs.from_args(args)
497499
generator_args = GeneratorArgs.from_args(args)
498-
500+
499501
_main(
500502
builder_args,
501503
speculative_builder_args,

quantize.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,7 @@ def forward(self, input: torch.Tensor) -> torch.Tensor:
515515

516516

517517
def replace_embedding_weight_only_grouped_int8_per_channel(
518-
module,
519-
device,
520-
bitwidth: int = 8,
521-
groupsize: Optional[int] = None,
522-
packed=False
518+
module, device, bitwidth: int = 8, groupsize: Optional[int] = None, packed=False
523519
):
524520
for name, child in module.named_children():
525521
# print(f"name: {name}")

0 commit comments

Comments
 (0)