Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

token剪枝实现细节方面的疑问 #27

Description

@SomeOtherScenery

作者好,感谢你们对这项工作的开源,我最近也在研究VLA剪枝方法,lightVLA这个方法给了我很多启发。我在阅读代码的过程中产生了一些疑问,希望可以得到解答。

  • 在TokenPruner的代码实现中,gumbel-softmax不是使用gumbel噪声,而是使用均匀分布噪声实现的,这有什么特殊原因吗?

    def score_to_indices(self, score, patches):
    if self.noise_scale is not None:
    score = score + torch.rand_like(score) * self.noise_scale

  • VLA-cache,ADP等剪枝方法中,为了保证训练时每个batch间token长度一致会事先固定剪枝比例,但在lightVLA训练使用的score_to_indices函数中,似乎是通过让部分patch重复占位来保证token总长度在剪枝前后不发生变化。这意味着lightVLA只会降低推理显存,而不会降低训练时的显存占用吗?

    hard_score = F.one_hot(score.argmax(dim=-1), num_classes=self.num_patches)
    soft_score = torch.softmax(score, dim=-1)
    score = hard_score + soft_score - soft_score.detach()
    return score.argmax(dim=-1), score @ patches

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions