File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
QEfficient/transformers/models/molmo Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -719,6 +719,14 @@ def get_specializations(
719719 full_batch_size : Optional [int ] = None ,
720720 ** compiler_options ,
721721 ):
722+
723+ #Extract Molmo specific paramters from compiler options if not provided as named args
724+ # vLLM passes num_crops instead of num_images, so that user don't get confused
725+ if num_images is None and "num_crops" in compiler_options :
726+ num_images = int (compiler_options ["num_crops" ])
727+ if valid_size is None and "valid_size" in compiler_options :
728+ valid_size = int (compiler_options ["valid_size" ])
729+
722730 prefill_seq_len = prefill_seq_len if prefill_seq_len else 1024
723731 ctx_len = ctx_len if ctx_len else constants .INTERN_CTX_LEN
724732
@@ -845,6 +853,9 @@ def get_specializations(
845853
846854 lang = [lang_prefill , lang_decode ]
847855
856+ compiler_options .pop ("num_crops" , None )
857+ compiler_options .pop ("valid_size" , None )
858+
848859 specializations = {}
849860
850861 if kv_offload :
You can’t perform that action at this time.
0 commit comments