]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
model-conversion : add --model-name to conversion scripts (#26665)
authorDaniel Bevenius <redacted>
Thu, 6 Aug 2026 07:38:06 +0000 (09:38 +0200)
committerGitHub <redacted>
Thu, 6 Aug 2026 07:38:06 +0000 (09:38 +0200)
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
examples/model-conversion/scripts/embedding/convert-model.sh

index 4aa72206288ecf9e146ed543917c26dc87cef61b..270e17e6f62b2cbc4582523c529b2675fdabbaba 100755 (executable)
@@ -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}")
 
index 9926350c072b243b9ac1f935eef28e497efa7cf6..8b706e164765405199883b09a0c30314cffecb4d 100755 (executable)
@@ -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 ""