Skip to content

Commit

Permalink
Unable to use MimiModel with DeepSpeed ZeRO-3 (huggingface#34735)
Browse files Browse the repository at this point in the history
use torch.tensor(), not torch.Tensor()

Co-authored-by: eustlb <94853470+eustlb@users.noreply.github.com>
  • Loading branch information
2 people authored and elvircrn committed Feb 13, 2025
1 parent 8c2cb95 commit 9066252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/mimi/modeling_mimi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ def __init__(self, config: MimiConfig, epsilon: float = 1e-5):

self.codebook_size = config.codebook_size

self.register_buffer("initialized", torch.Tensor([True]))
self.register_buffer("initialized", torch.tensor([True]))
self.register_buffer("cluster_usage", torch.ones(config.codebook_size))
self.register_buffer("embed_sum", embed)
self._embed = None
Expand Down

0 comments on commit 9066252

Please sign in to comment.