diff --git a/examples/convert_legacy_llama.py b/examples/convert_legacy_llama.py index 4203a689a..3b2727aed 100755 --- a/examples/convert_legacy_llama.py +++ b/examples/convert_legacy_llama.py @@ -25,7 +25,6 @@ from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor from dataclasses import dataclass from pathlib import Path from typing import TYPE_CHECKING, Any, Callable, IO, Iterable, Literal, TypeVar -from _collections_abc import dict_items import numpy as np @@ -1043,7 +1042,7 @@ def pick_output_type(model: LazyModel, output_type_str: str | None) -> GGMLFileT raise ValueError(f"Unexpected combination of types: {name_to_type}") -def per_model_weight_count_estimation(tensors: dict_items[str, LazyTensor], expert_count:int | None) -> int: +def per_model_weight_count_estimation(tensors: Iterable[str, LazyTensor], expert_count:int | None) -> int: # TODO: Ensure parameter count is accurate throughout various model type sum_weight_estimate: int = 0 for name, lazy_tensor in tensors: