Skip to content

KV Cache Initialization Issue During Training #3

@XiaokunFeng

Description

@XiaokunFeng

Thanks for your great work!

I noticed that during training, the initialization of kv_cache and crossattn_cache is commented out. With the current code, training raises an error because self.crossattn_cache is never defined, while self.kv_cache1 is only initialized to None in _init_.

From my understanding, both self.crossattn_cache and self.kv_cache1 should be explicitly initialized before being used. Could you please clarify the intended behavior here, or suggest how these caches should be properly initialized for training?

Thanks in advance for your help.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions