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

Bump turbo version to 0.0.7 #827

Merged
merged 4 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llmfoundry/optim/lion8b.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ def __init__(self, data: Optional[torch.Tensor], try_quantize: bool = True):
self._f_encode = None
self._f_decode = None
if self._try_quantize:
from turbo import dequantize8b, quantize8b
self._f_encode = quantize8b
self._f_decode = dequantize8b
from turbo import dequantize_signed, quantize_signed
self._f_encode = quantize_signed
self._f_decode = dequantize_signed

if data is not None:
self.set_data(data)
Expand Down Expand Up @@ -277,7 +277,7 @@ def set_data(self, data: torch.Tensor) -> None:
f'on device {data.device} with shape {data.shape}.')
self.data = None
assert self._f_encode is not None # pyright
self.quantized, self.scales = self._f_encode(data)
self.quantized, self.scales, _ = self._f_encode(data)
else:
self.data = data.to(dtype=torch.float32)
self.quantized = None
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@

extra_deps['gpu'] = [
'flash-attn==1.0.9',
'mosaicml-turbo==0.0.4',
'mosaicml-turbo==0.0.7',
# PyPI does not support direct dependencies, so we remove this line before uploading from PyPI
'xentropy-cuda-lib@git+https://github.com/HazyResearch/[email protected]#subdirectory=csrc/xentropy',
]
extra_deps['gpu-flash2'] = [
'flash-attn==2.3.6',
'mosaicml-turbo==0.0.4',
'mosaicml-turbo==0.0.7',
]

extra_deps['peft'] = [
Expand Down
Loading