-
Notifications
You must be signed in to change notification settings - Fork 25
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
patch 1 for mllm #298
patch 1 for mllm #298
Conversation
Signed-off-by: n1ck-guo <[email protected]>
…ages Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
auto_round/script/mllm.py
Outdated
self.add_argument("--dataset", type=str, default=None, | ||
help="the dataset for quantization training. It can be a custom one.") | ||
self.add_argument("--dataset", type=str, default="llava_v1_5_mix665k", | ||
help="The dataset for quantization training. It can be a custom one.") |
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.
use lowercase for the first letter to follow our current style
processor.chat_template = None | ||
safe_serialization = True | ||
if "phi3_v" in model_type: | ||
safe_serialization = False |
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.
the code is tricky, better move to model config later
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
device=device_str, seed=args.seed, gradient_accumulate_steps=args.gradient_accumulate_steps, | ||
scale_dtype=args.scale_dtype, layer_config=layer_config, | ||
scale_dtype=args.scale_dtype, layer_config=layer_config, template=args.template, |
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.
rename template to prompt_template to make it more easier to understand?
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 template is more like "model series template". It include processor(text/image), data collator, and special token.
test/test_basic_usage.py
Outdated
res = os.system( | ||
f"{python_path} ../auto_round/__main__.py --model 'facebook/opt-125m' --iter 2 --nsamples 1 --format auto_gptq,auto_round --disable_eval --output_dir ./saved") | ||
f"cd .. && {python_path} -m auto_round --mllm --iter 2 --nsamples 10 --format auto_round --output_dir ./saved") | ||
if res > 0 or res == -1: | ||
assert False, "cmd line test fail, please have acheck" |
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.
add another test for auto-round -h
auto_round/mllm/mllm_dataset.py
Outdated
@@ -44,18 +46,26 @@ def register(dataset): | |||
return register | |||
|
|||
|
|||
|
|||
@register_dataset("llava") |
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.
better add more information like liuhaotian/llava and 58k or 150k
Signed-off-by: n1ck-guo <[email protected]>
auto_round/script/mllm.py
Outdated
@@ -50,8 +50,10 @@ def __init__(self, *args, **kwargs): | |||
self.add_argument("--asym", action='store_true', | |||
help="whether to use asym quantization") | |||
|
|||
self.add_argument("--dataset", type=str, default=None, | |||
help="the dataset for quantization training. It can be a custom one.") | |||
self.add_argument("--dataset", type=str, default="llava_conv_58k", |
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.
llava_conv_58k ==>better change to liuhaotian/llava_conv_58k
Signed-off-by: n1ck-guo <[email protected]>
Signed-off-by: n1ck-guo <[email protected]>
TODO: