← back to Exo

.typings/mlx_lm/convert.pyi

46 lines

"""
This type stub file was generated by pyright.
"""

import argparse
from typing import Callable, Optional, Union

import mlx.nn as nn

def mixed_quant_predicate_builder(
    recipe: str, model: nn.Module, group_size: int = ...
) -> Callable[[str, nn.Module, dict], Union[bool, dict]]: ...

QUANT_RECIPES = ...
MODEL_CONVERSION_DTYPES = ...

def convert(
    hf_path: str,
    mlx_path: str = ...,
    quantize: bool = ...,
    q_group_size: int = ...,
    q_bits: int = ...,
    q_mode: str = ...,
    dtype: Optional[str] = ...,
    upload_repo: str = ...,
    revision: Optional[str] = ...,
    dequantize: bool = ...,
    quant_predicate: Optional[
        Union[Callable[[str, nn.Module, dict], Union[bool, dict]], str]
    ] = ...,
    trust_remote_code: bool = ...,
):  # -> None:
    ...
def configure_parser() -> argparse.ArgumentParser:
    """
    Configures and returns the argument parser for the script.

    Returns:
        argparse.ArgumentParser: Configured argument parser.
    """

def main():  # -> None:
    ...

if __name__ == "__main__": ...