From 9de0fcf2b3e587a43f293d9a2b6ec0a32991f768 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 6 Aug 2026 09:38:06 +0200 Subject: [PATCH] model-conversion : add --model-name to conversion scripts (#26665) This commit adds the --model-name flag to the causual and embedding model conversion scripts. The motivation for this is that this is the name used for the metadata field general.name and it can be useful to specify this explicitely if the default (the basename of the model path) is not what we want. --- examples/model-conversion/scripts/causal/convert-model.sh | 1 + examples/model-conversion/scripts/embedding/convert-model.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/model-conversion/scripts/causal/convert-model.sh b/examples/model-conversion/scripts/causal/convert-model.sh index 4aa722062..270e17e6f 100755 --- a/examples/model-conversion/scripts/causal/convert-model.sh +++ b/examples/model-conversion/scripts/causal/convert-model.sh @@ -47,6 +47,7 @@ CMD_ARGS+=("../../convert_hf_to_gguf.py" "--verbose") CMD_ARGS+=("${MODEL_PATH}") CMD_ARGS+=("--outfile" "${CONVERTED_MODEL}") CMD_ARGS+=("--outtype" "${TYPE}") +CMD_ARGS+=("--model-name" "${MODEL_NAME}") [[ -n "$METADATA_OVERRIDE" ]] && CMD_ARGS+=("--metadata" "${METADATA_OVERRIDE}") [[ -n "$MMPROJ" ]] && CMD_ARGS+=("${MMPROJ}") diff --git a/examples/model-conversion/scripts/embedding/convert-model.sh b/examples/model-conversion/scripts/embedding/convert-model.sh index 9926350c0..8b706e164 100755 --- a/examples/model-conversion/scripts/embedding/convert-model.sh +++ b/examples/model-conversion/scripts/embedding/convert-model.sh @@ -31,6 +31,7 @@ python ../../convert_hf_to_gguf.py --verbose \ ${EMBEDDING_MODEL_PATH} \ --outfile ${CONVERTED_MODEL} \ --outtype ${TYPE} \ + --model-name ${MODEL_NAME} \ ${SENTENCE_TRANSFORMERS} echo ""