Skip to content

Commit

Permalink
address #159
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Sep 4, 2024
1 parent 5930411 commit c302cf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "vector-quantize-pytorch"
version = "1.17.1"
version = "1.17.2"
description = "Vector Quantization - Pytorch"
authors = [
{ name = "Phil Wang", email = "lucidrains@gmail.com" }
Expand Down
4 changes: 3 additions & 1 deletion vector_quantize_pytorch/lookup_free_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
from functools import partial, cache
from collections import namedtuple
from contextlib import nullcontext

import torch.distributed as dist
from torch.distributed import nn as dist_nn

import torch
from torch import nn, einsum
Expand All @@ -36,7 +38,7 @@ def maybe_distributed_mean(t):
if not is_distributed():
return t

dist.nn.all_reduce(t)
dist_nn.all_reduce(t)
t = t / dist.get_world_size()
return t

Expand Down

0 comments on commit c302cf3

Please sign in to comment.