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

add weight property to exllamav2 quanlinear #80

Merged
merged 1 commit into from
Nov 29, 2023
Merged
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
6 changes: 5 additions & 1 deletion server/lorax_server/utils/gptq/exllamav2.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def temp_fwd_size(self, max_input_len, max_batch_size):
def scratch_space_fixed(self, max_input_len=2048, max_batch_size=8):
return self.temp_dq_size() + self.temp_fwd_size(max_input_len, max_batch_size)

@property
def weight(self) -> torch.Tensor:
return self.qweight


class ExLlamaV2DeviceTensors:

Expand All @@ -158,4 +162,4 @@ def get_scratch_slice(self, size_bytes):
size_bytes = ((size_bytes + 127) // 128) * 128
size_half = size_bytes // 2
scratch_slice = self.scratch.narrow(0, 0, size_half)
return scratch_slice
return scratch_slice
Loading