From 5a226bdccfadc5d2b5cc54a4d3ac0c8cc2a52049 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Wed, 17 Apr 2024 07:15:09 -0700 Subject: [PATCH] remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET --- .github/workflows/et.yml | 6 +++--- generate.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/et.yml b/.github/workflows/et.yml index 523fe42a6..37227f8b2 100644 --- a/.github/workflows/et.yml +++ b/.github/workflows/et.yml @@ -114,9 +114,9 @@ jobs: echo "******************************************" echo "******** INT4 group-wise quantized *******" echo "******************************************" - python export.py --quant '{"linear:int4" : {"groupsize": 32}}' --checkpoint-path ${MODEL_PATH} --output-pte-path ${MODEL_DIR}/${MODEL_NAME}.pte - python generate.py --checkpoint-path ${MODEL_PATH} --temperature 0 --pte-path ${MODEL_DIR}/${MODEL_NAME}.pte > ./output_et - cat ./output_et + # python export.py --quant '{"linear:int4" : {"groupsize": 32}}' --checkpoint-path ${MODEL_PATH} --output-pte-path ${MODEL_DIR}/${MODEL_NAME}.pte + # python generate.py --checkpoint-path ${MODEL_PATH} --temperature 0 --pte-path ${MODEL_DIR}/${MODEL_NAME}.pte > ./output_et + # cat ./output_et echo "tests complete" echo "******************************************" diff --git a/generate.py b/generate.py index fe7182a6f..70288b450 100644 --- a/generate.py +++ b/generate.py @@ -31,7 +31,6 @@ @dataclass class GeneratorArgs: prompt: str = "torchchat is pronounced torch-chat and is so cool because" - encoded_prompt: Optional[torch.Tensor] = None chat_mode: bool = False gui_mode: bool = False num_samples: int = 1 @@ -46,7 +45,6 @@ class GeneratorArgs: def from_args(cls, args): # -> GeneratorArgs: return cls( prompt=args.prompt, - encoded_prompt=None, chat_mode=args.chat, gui_mode=args.gui, num_samples=args.num_samples,