mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-10-23 05:58:07 +08:00
Change tuple type definitions to use Tuple (#308)
This commit is contained in:

committed by
GitHub

parent
c1342b8e89
commit
1fa40067fe
@@ -1,5 +1,6 @@
|
||||
import math
|
||||
from dataclasses import dataclass
|
||||
from typing import Tuple
|
||||
|
||||
import mlx.core as mx
|
||||
import mlx.nn as nn
|
||||
@@ -128,7 +129,7 @@ class Model(nn.Module):
|
||||
x: mx.array,
|
||||
mask: mx.array = None,
|
||||
cache: mx.array = None,
|
||||
) -> tuple[mx.array, mx.array]:
|
||||
) -> Tuple[mx.array, mx.array]:
|
||||
mask = None
|
||||
if x.shape[1] > 1:
|
||||
mask = nn.MultiHeadAttention.create_additive_causal_mask(x.shape[1])
|
||||
|
@@ -8,7 +8,7 @@ with open(Path(__file__).parent / "mlx_lm/requirements.txt") as fid:
|
||||
requirements = [str(r) for r in pkg_resources.parse_requirements(fid)]
|
||||
setup(
|
||||
name="mlx-lm",
|
||||
version="0.0.1",
|
||||
version="0.0.2",
|
||||
description="LLMs on Apple silicon with MLX and the Hugging Face Hub",
|
||||
long_description=open("README.md", encoding="utf-8").read(),
|
||||
long_description_content_type="text/markdown",
|
||||
|
Reference in New Issue
Block a user