Skip to content

Commit 3d5fea7

Browse files
committed
fix(ref): widen qwen2 week2 offset type hints
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
1 parent 4d4a292 commit 3d5fea7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tiny_llm_ref/qwen2_week2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
def __call__(
5454
self,
5555
x: mx.array,
56-
offsets: list[int],
56+
offsets: int | list[int] | mx.array,
5757
cache: TinyKvCache,
5858
mask: mx.array | str | None = None,
5959
) -> mx.array:
@@ -172,7 +172,7 @@ def __init__(
172172
def __call__(
173173
self,
174174
x: mx.array,
175-
offset: int,
175+
offset: int | list[int] | mx.array,
176176
cache: TinyKvCache,
177177
mask: mx.array | str | None = None,
178178
) -> mx.array:
@@ -266,7 +266,7 @@ def __init__(
266266
def __call__(
267267
self,
268268
inputs: mx.array,
269-
offset: int,
269+
offset: int | list[int] | mx.array,
270270
cache: list[TinyKvCache],
271271
) -> mx.array:
272272
h = self.embedding(inputs)

0 commit comments

Comments
 (0)