- Removed unused Python imports (#683)

- bert/model.py:10: tree_unflatten
  - bert/model.py:2: dataclass
  - bert/model.py:8: numpy
  - cifar/resnet.py:6: Any
  - clip/model.py:15: tree_flatten
  - clip/model.py:9: Union
  - gcn/main.py:8: download_cora
  - gcn/main.py:9: cross_entropy
  - llms/gguf_llm/models.py:12: tree_flatten, tree_unflatten
  - llms/gguf_llm/models.py:9: numpy
  - llms/mixtral/mixtral.py:12: tree_map
  - llms/mlx_lm/models/dbrx.py:2: Dict, Union
  - llms/mlx_lm/tuner/trainer.py:5: partial
  - llms/speculative_decoding/decoder.py:1: dataclass, field
  - llms/speculative_decoding/decoder.py:2: Optional
  - llms/speculative_decoding/decoder.py:5: mlx.nn
  - llms/speculative_decoding/decoder.py:6: numpy
  - llms/speculative_decoding/main.py:2: glob
  - llms/speculative_decoding/main.py:3: json
  - llms/speculative_decoding/main.py:5: Path
  - llms/speculative_decoding/main.py:8: mlx.nn
  - llms/speculative_decoding/model.py:6: tree_unflatten
  - llms/speculative_decoding/model.py:7: AutoTokenizer
  - llms/tests/test_lora.py:13: yaml_loader
  - lora/lora.py:14: tree_unflatten
  - lora/models.py:11: numpy
  - lora/models.py:3: glob
  - speechcommands/kwt.py:1: Any
  - speechcommands/main.py:7: mlx.data
  - stable_diffusion/stable_diffusion/model_io.py:4: partial
  - whisper/benchmark.py:5: sys
  - whisper/test.py:5: subprocess
  - whisper/whisper/audio.py:6: Optional
  - whisper/whisper/decoding.py:8: mlx.nn
This commit is contained in:
dmdaksh
2024-04-16 10:50:32 -04:00
committed by GitHub
parent e55a9e8cb4
commit 7d7e236061
21 changed files with 9 additions and 36 deletions

View File

@@ -6,10 +6,8 @@ from typing import Dict, List, Optional, Tuple, Union
import mlx.core as mx
import mlx.nn as nn
import numpy as np
import utils
from huggingface_hub import snapshot_download
from mlx.utils import tree_flatten, tree_unflatten
@dataclass

View File

@@ -9,7 +9,7 @@ from typing import List, Optional, Tuple
import mlx.core as mx
import mlx.nn as nn
from mlx.utils import tree_map, tree_unflatten
from mlx.utils import tree_unflatten
from sentencepiece import SentencePieceProcessor

View File

@@ -1,5 +1,5 @@
from dataclasses import dataclass
from typing import Dict, Optional, Tuple, Union
from typing import Optional, Tuple
import mlx.core as mx
import mlx.nn as nn

View File

@@ -2,7 +2,6 @@
import time
from dataclasses import dataclass, field
from functools import partial
from pathlib import Path
from typing import Union

View File

@@ -1,9 +1,6 @@
from dataclasses import dataclass, field
from typing import List, Optional
from typing import List
import mlx.core as mx
import mlx.nn as nn
import numpy as np
import transformers
from model import Model

View File

@@ -1,11 +1,7 @@
import argparse
import glob
import json
import time
from pathlib import Path
import mlx.core as mx
import mlx.nn as nn
from decoder import SpeculativeDecoder
from mlx.utils import tree_unflatten
from model import Model

View File

@@ -3,8 +3,8 @@ from typing import List, Optional, Tuple
import mlx.core as mx
import mlx.nn as nn
import numpy as np
from mlx.utils import tree_map, tree_unflatten
from transformers import AutoTokenizer, T5Config
from mlx.utils import tree_map
from transformers import T5Config
def _relative_position_bucket(

View File

@@ -10,7 +10,6 @@ import mlx.nn as nn
import mlx.optimizers as opt
from mlx.utils import tree_flatten
from mlx_lm import lora, tuner
from mlx_lm.lora import yaml_loader
from mlx_lm.tuner.lora import LoRALinear
from mlx_lm.tuner.utils import build_schedule