From 34e010c45b5ca1eb255e0d42ae8c7c05ad0d9fee Mon Sep 17 00:00:00 2001 From: Gregory Shtrasberg <156009573+gshtras@users.noreply.github.com> Date: Mon, 3 Jun 2024 18:19:47 -0400 Subject: [PATCH] Update linear.py Fix bias handling with tgemm --- vllm/model_executor/layers/linear.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vllm/model_executor/layers/linear.py b/vllm/model_executor/layers/linear.py index 1d2a8782a96f1..6a0f55101e660 100644 --- a/vllm/model_executor/layers/linear.py +++ b/vllm/model_executor/layers/linear.py @@ -104,6 +104,8 @@ def apply_weights(self, if bias is not None: return F.linear(x, weight) + bias return F.linear(x, weight) + elif bias is not None: + return F.linear(x, weight, bias) return tgemm.mm(x, weight)