Skip to content

Commit

Permalink
fix issue for sliding window models
Browse files Browse the repository at this point in the history
  • Loading branch information
mht-sharma committed Sep 24, 2024
1 parent 21d1b0c commit 64e981f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/text_generation_server/layers/attention/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dataclasses import dataclass
from text_generation_server.utils.import_utils import SYSTEM
from text_generation_server.models.globals import ATTENTION
import torch
from typing import Optional
Expand Down Expand Up @@ -65,5 +66,7 @@ class Seqlen:
max_k: int

def clamp(self, max):
if SYSTEM == "rocm":
return self
raise NotImplementedError("Not implemented seqlen for paged")
return Seqlen(torch.clamp(self.input_lengths, max=max))

0 comments on commit 64e981f

Please sign in to comment.