Skip to content

DynamicCache get_max_length error #57

Description

@junho328

Hello, thank you for your amazing work and model.

When I tried to implement the Inference code, there was an error as below

~/.cache/huggingface/modules/transformers_modules/OS-Copilot/OS-Atlas-Base-4B/67bccd1cb9605c0d514adbbbc1b512d93a09df08/modeling_internvl_chat.py in generate(self, pixel_values, input_ids, attention_mask, visual_features, generation_config, output_hidden_states, return_dict, **generate_kwargs)
    311             input_embeds = self.language_model.get_input_embeddings()(input_ids)
    312 
...
-> 1330                 max_cache_length = past_key_values.get_max_length()
   1331             else:
   1332                 cache_length = past_length = past_key_values[0][0].shape[2]

AttributeError: 'DynamicCache' object has no attribute 'get_max_length'

Please give me some advices to how to solve this error.

And I'm trying to use OS-Atlas for mobile task.
Would you recommend a way to use for mobile task (e.g. instruction prompt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions