Skip to content

Commit 34bc55f

Browse files
committed
convert.py: default outfile name include expert count
1 parent da064a8 commit 34bc55f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

convert.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,10 @@ def default_outfile(model_paths: list[Path], file_type: GGMLFileType, params: Pa
15191519

15201520
parameters = model_parameter_count_rounded_notation(model_params_count)
15211521

1522+
expert_count = ""
1523+
if params.n_experts is not None:
1524+
expert_count = f"{params.n_experts}x"
1525+
15221526
version = ""
15231527
if metadata is not None and metadata.version is not None:
15241528
version = f"-{metadata.version}"
@@ -1529,7 +1533,7 @@ def default_outfile(model_paths: list[Path], file_type: GGMLFileType, params: Pa
15291533
elif params.path_model is not None:
15301534
name = params.path_model.name
15311535

1532-
ret = model_paths[0].parent / f"{name}{version}-{parameters}-{quantization}.gguf"
1536+
ret = model_paths[0].parent / f"{name}{version}-{expert_count}{parameters}-{quantization}.gguf"
15331537
if ret in model_paths:
15341538
sys.stderr.write(
15351539
f"Error: Default output path ({ret}) would overwrite the input. "

0 commit comments

Comments
 (0)