Skip to content
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

Inference with Skiparse Attn #539

Open
chen-yy20 opened this issue Nov 21, 2024 · 1 comment
Open

Inference with Skiparse Attn #539

chen-yy20 opened this issue Nov 21, 2024 · 1 comment

Comments

@chen-yy20
Copy link

chen-yy20 commented Nov 21, 2024

Hi OpenSora-Plan Team,

Thank you for your excellent work!

I noticed that a new attention pattern was used when training model v1.3, as described below:

Considering both computational load and AVG Attention Distance, we select Skiparse with k=4, replacing the first and last two blocks with Full 3D Attention to enhance performance.

I have two questions:

  • Do I need to use the same Skiparse Attention arguments when doing inference with the provided model weights?
  • Can I adjust these parameters to match my computational resources?

Thanks!

@yunyangge
Copy link
Collaborator

  1. Yes, you need to use the same Skiparse Attention arguments during inference as were used during training. Although Skiparse Attention only modifies the forward process of the model without changing the parameters, the sparse ratio is tied to the weights. Weights trained with a specific sparse ratio cannot perform zero-shot inference effectively with another sparse ratio.

  2. Similar to answer 1, while zero-shot inference is not feasible, you can fine-tune the model with a custom sparse ratio. Based on our experience, such fine-tuning is straightforward and requires only a few tens of thousands of clips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants