mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 20:04:52 +00:00
merged
This commit is contained in:
commit
3de777c645
@ -263,7 +263,7 @@ class QuantLinear(nn.Module):
|
|||||||
self.groupsize = groupsize
|
self.groupsize = groupsize
|
||||||
|
|
||||||
self.outfeatures = qweight.shape[1]
|
self.outfeatures = qweight.shape[1]
|
||||||
self.infeatures = qweight.shape[0] * 32 // 4
|
self.infeatures = qweight.shape[0] * 32 // bits
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def new(cls, bits, groupsize, infeatures, outfeatures, bias):
|
def new(cls, bits, groupsize, infeatures, outfeatures, bias):
|
||||||
|
@ -543,7 +543,7 @@ try:
|
|||||||
or self._cos_cached.dtype != dtype
|
or self._cos_cached.dtype != dtype
|
||||||
):
|
):
|
||||||
if seqlen > self.max_position_embeddings:
|
if seqlen > self.max_position_embeddings:
|
||||||
newbase = self.base * ((self.scaling_factor * seq_len / self.max_position_embeddings) - (self.scaling_factor - 1)) ** (self.dim / (self.dim - 2))
|
newbase = self.base * ((self.scaling_factor * seqlen / self.max_position_embeddings) - (self.scaling_factor - 1)) ** (self.dim / (self.dim - 2))
|
||||||
self.inv_freq = _create_inv_freq(self.dim, newbase, self.inv_freq.device)
|
self.inv_freq = _create_inv_freq(self.dim, newbase, self.inv_freq.device)
|
||||||
self._seq_len_cached = seqlen
|
self._seq_len_cached = seqlen
|
||||||
t = torch.arange(seqlen, device=device, dtype=self.inv_freq.dtype)
|
t = torch.arange(seqlen, device=device, dtype=self.inv_freq.dtype)
|
||||||
|
Loading…
Reference in New Issue
Block a user