Skip to content

Commit 535ce23

Browse files
authored
Adjust the round_up_seq logic in Gaudi backend (#3224)
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
1 parent c94f415 commit 535ce23

File tree

1 file changed

+1
-1
lines changed
  • backends/gaudi/server/text_generation_server/models

1 file changed

+1
-1
lines changed

backends/gaudi/server/text_generation_server/models/causal_lm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def torch_compile_for_eager(func):
7373

7474

7575
def round_up_seq(number, k, base):
76-
exponent = math.ceil(math.log(number / k, base))
76+
exponent = max(0, math.ceil(math.log(number / k, base)))
7777
return int(k * (base**exponent))
7878

7979

0 commit comments

Comments
 (0)