(item: tuple[DataType, NDArray])
| 940 | |
| 941 | @staticmethod |
| 942 | def maybe_do_quantize(item: tuple[DataType, NDArray]) -> NDArray: |
| 943 | dt, arr = item |
| 944 | if not isinstance(dt, QuantizedDataType): |
| 945 | return arr |
| 946 | return dt.quantize(arr) |
| 947 | |
| 948 | @staticmethod |
| 949 | def write_all(fname_out: Path, ftype: GGMLFileType, params: Params, model: LazyModel, vocab: Vocab, svocab: gguf.SpecialVocab, concurrency: int = DEFAULT_CONCURRENCY, endianess: gguf.GGUFEndian = gguf.GGUFEndian.LITTLE) -> None: |