# Different Llama versions used different default values for max_position_embeddings, hence the need to be able to specify which version is being used.
parser.add_argument(
"--llama_version",
choices=[1,2,3],
default=1,
type=int,
choices=["1","2","3","3.1"],
default="1",
type=str,
help="Version of the Llama model to convert. Currently supports Llama1 and Llama2. Controls the context size",
)
parser.add_argument(
...
...
@@ -394,11 +433,34 @@ def main():
type=int,
help="The number of individual shards used for the model. Does not have to be the same as the number of consolidated_xx.pth",
)
parser.add_argument(
"--special_tokens",
default=None,
type=List[str],
help="The list of special tokens that should be added to the model.",
)
parser.add_argument(
"--instruct",
default=False,
type=bool,
help="Whether the model is an instruct model or not. Will affect special tokens for llama 3.1.",
)
args=parser.parse_args()
ifargs.model_sizeisNoneandargs.num_shardsisNone:
raiseValueError("You have to set at least `num_shards` if you are not giving the `model_size`")