Commit 4caf1539 authored by zhuwenwen's avatar zhuwenwen
Browse files

use two method to add bias

parent 767bb050
...@@ -115,7 +115,10 @@ class UnquantizedLinearMethod(LinearMethodBase): ...@@ -115,7 +115,10 @@ class UnquantizedLinearMethod(LinearMethodBase):
if self.use_llama_nn: if self.use_llama_nn:
if bias is not None: if bias is not None:
return torch.addmm(bias, x, weight) if len(x.shape) == 2:
return torch.addmm(bias, x, weight)
else:
return torch.matmul(x, weight) + bias
else: else:
return torch.matmul(x, weight) return torch.matmul(x, weight)
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment