MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / default_outfile

Function default_outfile

convert.py:1168–1180  ·  view source on GitHub ↗
(model_paths: list[Path], file_type: GGMLFileType)

Source from the content-addressed store, hash-verified

1166
1167
1168def default_outfile(model_paths: list[Path], file_type: GGMLFileType) -> Path:
1169 namestr = {
1170 GGMLFileType.AllF32: "f32",
1171 GGMLFileType.MostlyF16: "f16",
1172 GGMLFileType.MostlyQ8_0:"q8_0",
1173 }[file_type]
1174 ret = model_paths[0].parent / f"ggml-model-{namestr}.gguf"
1175 if ret in model_paths:
1176 sys.stderr.write(
1177 f"Error: Default output path ({ret}) would overwrite the input. "
1178 "Please explicitly specify a path using --outfile.\n")
1179 sys.exit(1)
1180 return ret
1181
1182
1183def do_dump_model(model_plus: ModelPlus) -> None:

Callers 1

mainFunction · 0.70

Calls 2

exitMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected