Skip to content

Commit

Permalink
Make fastchat.serve.model_worker to take debug argument (#2628)
Browse files Browse the repository at this point in the history
Co-authored-by: hi-jin <[email protected]>
  • Loading branch information
uinone and hi-jin authored Nov 2, 2023
1 parent 40b235d commit 3d9430a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fastchat/serve/model_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __init__(
conv_template: Optional[str] = None,
embed_in_truncate: bool = False,
seed: Optional[int] = None,
debug: bool = False,
**kwargs,
):
super().__init__(
Expand All @@ -82,6 +83,7 @@ def __init__(
gptq_config=gptq_config,
awq_config=awq_config,
exllama_config=exllama_config,
debug=debug,
)
self.device = device
if self.tokenizer.pad_token == None:
Expand Down Expand Up @@ -283,6 +285,9 @@ def create_model_worker():
default=None,
help="Overwrite the random seed for each generation.",
)
parser.add_argument(
"--debug", type=bool, default=False, help="Print debugging messages"
)
args = parser.parse_args()
logger.info(f"args: {args}")

Expand Down Expand Up @@ -333,6 +338,7 @@ def create_model_worker():
conv_template=args.conv_template,
embed_in_truncate=args.embed_in_truncate,
seed=args.seed,
debug=args.debug,
)
return args, worker

Expand Down

0 comments on commit 3d9430a

Please sign in to comment.