Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: ssbuild <[email protected]>
  • Loading branch information
ssbuild committed Aug 4, 2023
1 parent 659b177 commit f9e788e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]
setup(
name='deep_training',
version='0.1.13.post1',
version='0.1.13.post2',
description='an easy training architecture',
long_description='torch_training: https://github.com/ssbuild/deep_training.git',
license='Apache License 2.0',
Expand Down
4 changes: 2 additions & 2 deletions src/deep_training/nlp/models/internlm/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def quantize(model, bits, empty_init=False, device=None,**kwarg):
QuantizedLinear(
bits=bits,
weight=w.weight.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()) if w.bias is not None else None,
empty_init=empty_init,
device=w.weight.device if device is None else device,
dtype=w.weight.dtype,
Expand All @@ -176,7 +176,7 @@ def quantize(model, bits, empty_init=False, device=None,**kwarg):
QuantizedLinear(
bits=bits,
weight=w.weight.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()) if w.bias is not None else None,
empty_init=empty_init,
device=w.weight.device if device is None else device,
dtype=w.weight.dtype,
Expand Down
4 changes: 2 additions & 2 deletions src/deep_training/nlp/models/qwen/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def quantize(model, bits, empty_init=False, device=None,**kwarg):
QuantizedLinear(
bits=bits,
weight=w.weight.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()) if w.bias is not None else None,
empty_init=empty_init,
device=w.weight.device if device is None else device,
dtype=w.weight.dtype,
Expand All @@ -175,7 +175,7 @@ def quantize(model, bits, empty_init=False, device=None,**kwarg):
QuantizedLinear(
bits=bits,
weight=w.weight.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()),
bias=w.bias.to(torch.cuda.current_device()) if w.bias is not None else None,
empty_init=empty_init,
device=w.weight.device if device is None else device,
dtype=w.weight.dtype,
Expand Down

0 comments on commit f9e788e

Please sign in to comment.