fix: address ty complaint

This commit is contained in:
Philipp Emanuel Weidmann
2026-03-15 09:58:00 +05:30
parent 94775d4148
commit 19cdf7e244
+8 -3
View File
@@ -743,7 +743,12 @@ class Model:
max_new_tokens=4096, max_new_tokens=4096,
) # ty:ignore[call-non-callable] ) # ty:ignore[call-non-callable]
return self.tokenizer.decode( # This cast is valid because str is the return type
outputs[0, inputs["input_ids"].shape[1] :], # when passing a sequence of token IDs.
skip_special_tokens=True, return cast(
str,
self.tokenizer.decode(
outputs[0, inputs["input_ids"].shape[1] :],
skip_special_tokens=True,
),
) )