mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 02:44:36 +00:00
Docker: change to calling convert.py (#1641)
Deprecation disclaimer was added to convert-pth-to-ggml.py
This commit is contained in:
parent
136476e898
commit
b5c85468a3
@ -11,7 +11,7 @@ shift
|
|||||||
arg2="$@"
|
arg2="$@"
|
||||||
|
|
||||||
if [[ $arg1 == '--convert' || $arg1 == '-c' ]]; then
|
if [[ $arg1 == '--convert' || $arg1 == '-c' ]]; then
|
||||||
python3 ./convert-pth-to-ggml.py $arg2
|
python3 ./convert.py $arg2
|
||||||
elif [[ $arg1 == '--quantize' || $arg1 == '-q' ]]; then
|
elif [[ $arg1 == '--quantize' || $arg1 == '-q' ]]; then
|
||||||
./quantize $arg2
|
./quantize $arg2
|
||||||
elif [[ $arg1 == '--run' || $arg1 == '-r' ]]; then
|
elif [[ $arg1 == '--run' || $arg1 == '-r' ]]; then
|
||||||
@ -32,7 +32,7 @@ else
|
|||||||
echo " --run (-r): Run a model previously converted into ggml"
|
echo " --run (-r): Run a model previously converted into ggml"
|
||||||
echo " ex: -m /models/7B/ggml-model-q4_0.bin -p \"Building a website can be done in 10 simple steps:\" -n 512"
|
echo " ex: -m /models/7B/ggml-model-q4_0.bin -p \"Building a website can be done in 10 simple steps:\" -n 512"
|
||||||
echo " --convert (-c): Convert a llama model into ggml"
|
echo " --convert (-c): Convert a llama model into ggml"
|
||||||
echo " ex: \"/models/7B/\" 1"
|
echo " ex: --outtype f16 \"/models/7B/\" "
|
||||||
echo " --quantize (-q): Optimize with quantization process ggml"
|
echo " --quantize (-q): Optimize with quantization process ggml"
|
||||||
echo " ex: \"/models/7B/ggml-model-f16.bin\" \"/models/7B/ggml-model-q4_0.bin\" 2"
|
echo " ex: \"/models/7B/ggml-model-f16.bin\" \"/models/7B/ggml-model-q4_0.bin\" 2"
|
||||||
echo " --all-in-one (-a): Execute --convert & --quantize"
|
echo " --all-in-one (-a): Execute --convert & --quantize"
|
||||||
|
@ -4,7 +4,9 @@ import argparse
|
|||||||
|
|
||||||
import convert
|
import convert
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Convert a LLaMA model checkpoint to a ggml compatible file')
|
parser = argparse.ArgumentParser(
|
||||||
|
description="""[DEPRECATED - use `convert.py` instead]
|
||||||
|
Convert a LLaMA model checkpoint to a ggml compatible file""")
|
||||||
parser.add_argument('dir_model', help='directory containing the model checkpoint')
|
parser.add_argument('dir_model', help='directory containing the model checkpoint')
|
||||||
parser.add_argument('ftype', help='file type (0: float32, 1: float16)', type=int, choices=[0, 1], default=1)
|
parser.add_argument('ftype', help='file type (0: float32, 1: float16)', type=int, choices=[0, 1], default=1)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
Loading…
Reference in New Issue
Block a user