mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	* model-conversion : remove hardcoded /bin/bash shebangs [no ci] This commit updates the bash scripts to use env instead of using hardcoded /bin/bash in the shebang line. The motivation for this is that some systems may have bash installed in a different location, and using /usr/bin/env bash ensures that the script will use the first bash interpreter found in the user's PATH, making the scripts more portable across different environments. * model-conversion : rename script to .py [no ci] This commit renames run-casual-gen-embeddings-org.sh to run-casual-gen-embeddings-org.py to reflect its Python nature.
		
			
				
	
	
		
			23 lines
		
	
	
		
			707 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			707 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
set -e
 | 
						|
 | 
						|
MODEL_NAME="${MODEL_NAME:-$(basename "$EMBEDDING_MODEL_PATH")}"
 | 
						|
OUTPUT_DIR="${OUTPUT_DIR:-../../models}"
 | 
						|
TYPE="${OUTTYPE:-f16}"
 | 
						|
METADATA_OVERRIDE="${METADATA_OVERRIDE:-}"
 | 
						|
CONVERTED_MODEL="${OUTPUT_DIR}/${MODEL_NAME}.gguf"
 | 
						|
 | 
						|
echo "Model path: ${EMBEDDING_MODEL_PATH}"
 | 
						|
echo "Model name: ${MODEL_NAME}"
 | 
						|
echo "Data  type: ${TYPE}"
 | 
						|
echo "Converted model path:: ${CONVERTED_MODEL}"
 | 
						|
python ../../convert_hf_to_gguf.py --verbose \
 | 
						|
    ${EMBEDDING_MODEL_PATH} \
 | 
						|
    --outfile ${CONVERTED_MODEL} \
 | 
						|
    --outtype ${TYPE}
 | 
						|
 | 
						|
echo ""
 | 
						|
echo "The environment variable CONVERTED_EMBEDDING MODEL can be set to this path using:"
 | 
						|
echo "export CONVERTED_EMBEDDING_MODEL=$(realpath ${CONVERTED_MODEL})"
 |