Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions QEfficient/transformers/models/molmo/modeling_molmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,14 @@ def get_specializations(
full_batch_size: Optional[int] = None,
**compiler_options,
):

#Extract Molmo specific paramters from compiler options if not provided as named args
# vLLM passes num_crops instead of num_images, so that user don't get confused
if num_images is None and "num_crops" in compiler_options:
num_images = int(compiler_options["num_crops"])
if valid_size is None and "valid_size" in compiler_options:
valid_size = int(compiler_options["valid_size"])

prefill_seq_len = prefill_seq_len if prefill_seq_len else 1024
ctx_len = ctx_len if ctx_len else constants.INTERN_CTX_LEN

Expand Down Expand Up @@ -845,6 +853,9 @@ def get_specializations(

lang = [lang_prefill, lang_decode]

compiler_options.pop("num_crops", None)
compiler_options.pop("valid_size", None)

specializations = {}

if kv_offload:
Expand Down
Loading