Skip to content

Commit

Permalink
Apply isort and black reformatting
Browse files Browse the repository at this point in the history
Signed-off-by: Laplasjan107 <[email protected]>
  • Loading branch information
Laplasjan107 committed Nov 21, 2024
1 parent df99faa commit a66e20a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions nemo/collections/llm/quantization/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ def _generate_sample(model: MegatronParallel):

mcore_tokenizer = MCoreTokenizerWrappper(model.tokenizer)
mcore_inference = model.get_inference_wrapper(
params_dtype=torch.bfloat16,
inference_batch_times_seqlen_threshold=30
)
params_dtype=torch.bfloat16, inference_batch_times_seqlen_threshold=30
)

generated = [r.generated_text for r in generate(mcore_inference, mcore_tokenizer, prompts)]
outputs = [prompt + generation for prompt, generation in zip(prompts, generated)]
Expand Down
3 changes: 1 addition & 2 deletions nemo/collections/llm/quantization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from nemo.utils import logging



def get_modelopt_decoder_type(model: llm.GPTModel) -> str:
"""Infers the modelopt decoder type from GPTModel subclass."""
mapping = [
Expand All @@ -36,7 +35,7 @@ def get_modelopt_decoder_type(model: llm.GPTModel) -> str:
(llm.MixtralModel, "llama"),
(llm.NemotronModel, "gptnext"),
(llm.Qwen2Model, "qwen"),
(llm.StarcoderModel, "gptnext"),
(llm.StarcoderModel, "gptnext"),
(llm.Starcoder2Model, "gptnext"),
(llm.Phi3Model, "phi3"),
]
Expand Down

0 comments on commit a66e20a

Please sign in to comment.