convert-*.py: dict_item --> Iterable
This commit is contained in:
parent
455c0e53ac
commit
5ab1a84085
1 changed files with 1 additions and 2 deletions
|
@ -25,7 +25,6 @@ from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Any, Callable, IO, Iterable, Literal, TypeVar
|
from typing import TYPE_CHECKING, Any, Callable, IO, Iterable, Literal, TypeVar
|
||||||
from _collections_abc import dict_items
|
|
||||||
|
|
||||||
import numpy as np
|
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}")
|
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
|
# TODO: Ensure parameter count is accurate throughout various model type
|
||||||
sum_weight_estimate: int = 0
|
sum_weight_estimate: int = 0
|
||||||
for name, lazy_tensor in tensors:
|
for name, lazy_tensor in tensors:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue