-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move more generator args to use dataclass #233
Conversation
CI seems to be failing and looks like related to this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@@ -305,7 +307,7 @@ def generate( | |||
return seq, generate_stats | |||
|
|||
|
|||
def encode_tokens(tokenizer, string, bos=True, device="cuda"): | |||
def encode_tokens(tokenizer, string, bos=True, device="cpu"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was intentional change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thanks for checking! device="cuda"
is not meaningful for ET. Trying to avoid defaults that don't make sense for some backends!
@@ -45,6 +46,7 @@ class GeneratorArgs: | |||
def from_args(cls, args): # -> GeneratorArgs: | |||
return cls( | |||
prompt=args.prompt, | |||
encoded_prompt=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's already None by default, maybe don't pass at all?
* prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos
* clean up gguf loading. Move model loading to meta. * remove cpu * Fix CI and validation scripts (#154) * missing device (#232) * Use generator args to group all arguments to generator (#231) * prompt * chat_mode, num_samples * Move more generator args to use dataclass (#233) * prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos * Minor lint fixes (#236) * remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET * small changes --------- Co-authored-by: Guang Yang <[email protected]> Co-authored-by: Michael Gschwind <[email protected]> Co-authored-by: Mergen Nachin <[email protected]>
* prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos
* clean up gguf loading. Move model loading to meta. * remove cpu * Fix CI and validation scripts (#154) * missing device (#232) * Use generator args to group all arguments to generator (#231) * prompt * chat_mode, num_samples * Move more generator args to use dataclass (#233) * prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos * Minor lint fixes (#236) * remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET * small changes --------- Co-authored-by: Guang Yang <[email protected]> Co-authored-by: Michael Gschwind <[email protected]> Co-authored-by: Mergen Nachin <[email protected]>
* prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos
* clean up gguf loading. Move model loading to meta. * remove cpu * Fix CI and validation scripts (#154) * missing device (#232) * Use generator args to group all arguments to generator (#231) * prompt * chat_mode, num_samples * Move more generator args to use dataclass (#233) * prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos * Minor lint fixes (#236) * remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET * small changes --------- Co-authored-by: Guang Yang <[email protected]> Co-authored-by: Michael Gschwind <[email protected]> Co-authored-by: Mergen Nachin <[email protected]>
* prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos
* clean up gguf loading. Move model loading to meta. * remove cpu * Fix CI and validation scripts (#154) * missing device (#232) * Use generator args to group all arguments to generator (#231) * prompt * chat_mode, num_samples * Move more generator args to use dataclass (#233) * prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos * Minor lint fixes (#236) * remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET * small changes --------- Co-authored-by: Guang Yang <[email protected]> Co-authored-by: Michael Gschwind <[email protected]> Co-authored-by: Mergen Nachin <[email protected]>
* prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos
* clean up gguf loading. Move model loading to meta. * remove cpu * Fix CI and validation scripts (#154) * missing device (#232) * Use generator args to group all arguments to generator (#231) * prompt * chat_mode, num_samples * Move more generator args to use dataclass (#233) * prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos * Minor lint fixes (#236) * remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET * small changes --------- Co-authored-by: Guang Yang <[email protected]> Co-authored-by: Michael Gschwind <[email protected]> Co-authored-by: Mergen Nachin <[email protected]>
* prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos
* clean up gguf loading. Move model loading to meta. * remove cpu * Fix CI and validation scripts (#154) * missing device (#232) * Use generator args to group all arguments to generator (#231) * prompt * chat_mode, num_samples * Move more generator args to use dataclass (#233) * prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos * Minor lint fixes (#236) * remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET * small changes --------- Co-authored-by: Guang Yang <[email protected]> Co-authored-by: Michael Gschwind <[email protected]> Co-authored-by: Mergen Nachin <[email protected]>
* prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos
* clean up gguf loading. Move model loading to meta. * remove cpu * Fix CI and validation scripts (#154) * missing device (#232) * Use generator args to group all arguments to generator (#231) * prompt * chat_mode, num_samples * Move more generator args to use dataclass (#233) * prompt * chat_mode, num_samples * move more args * more gen args * update * args * undo some changes * typos * Minor lint fixes (#236) * remove redundancy & remove int4 linear test from ET tests (#237) * remove redundancy * no int4 linear on ET * small changes --------- Co-authored-by: Guang Yang <[email protected]> Co-authored-by: Michael Gschwind <[email protected]> Co-authored-by: Mergen Nachin <[email protected]>
Move more generator args to use dataclass