| 35 | |
| 36 | |
| 37 | def _init_args(): |
| 38 | parser = argparse.ArgumentParser() |
| 39 | parser.add_argument("--hf_model_path", type=str, required=True, help="The path for the huggingface model") |
| 40 | parser.add_argument("--new_config_path", type=str, required=True, help="The path for the new config file") |
| 41 | parser.add_argument("--output_path", type=str, required=True, help="The path for the output random model") |
| 42 | parser.add_argument( |
| 43 | "--trust_remote_code", |
| 44 | action="store_true", |
| 45 | help="Whether to trust remote code when loading HF model. Disabled by default for security.", |
| 46 | ) |
| 47 | args = parser.parse_args() |
| 48 | return args |
| 49 | |
| 50 | |
| 51 | def check_output_path(output_path: str): |