mirror of
https://github.com/exo-explore/exo.git
synced 2025-12-23 22:27:50 -05:00
46 lines
1.0 KiB
Python
46 lines
1.0 KiB
Python
"""
|
|
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__": ...
|