SWA inference
This commit is contained in:
parent
d0b1144423
commit
8e9d9c38b1
2 changed files with 1 additions and 2 deletions
|
|
@ -11,7 +11,6 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
__version__ = "2024.1"
|
||||
import os
|
||||
import warnings
|
||||
import importlib
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ def LlamaAttention_fast_forward_inference(
|
|||
|
||||
# Grouped query attention
|
||||
if n_groups != 1:
|
||||
_, _, cached_len, _ = Kn.shape
|
||||
_, _, cached_len, _ = Knn.shape
|
||||
Knn = Knn[:, :, None, :, :].expand(bsz, n_kv_heads, n_groups, cached_len, head_dim)
|
||||
Vnn = Vnn[:, :, None, :, :].expand(bsz, n_kv_heads, n_groups, cached_len, head_dim)
|
||||
Knn = Knn.reshape(bsz, n_heads, cached_len, head_dim)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue