Skip to content

Commit ca0dd58

Browse files
committed
make llama 3 false by default
1 parent 402359b commit ca0dd58

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

convert.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
ADDED_TOKENS_FILE = 'added_tokens.json'
5151
FAST_TOKENIZER_FILE = 'tokenizer.json'
52-
is_llama3_model = True
52+
is_llama3_model = False
5353

5454
#
5555
# data types
@@ -1618,6 +1618,15 @@ def main(args_in: list[str] | None = None) -> None:
16181618

16191619
metadata = Metadata.load(args.metadata)
16201620

1621+
#TODO: add more bandaids for llama 3 detection
1622+
try:
1623+
global is_llama3_model
1624+
import convert_llama_weights_to_hf
1625+
convert_llama_weights_to_hf.write_tokenizer(args.model, os.path.join(args.model, "tokenizer.model"), 3)
1626+
is_llama3_model = True
1627+
except:
1628+
pass
1629+
16211630
if args.get_outfile:
16221631
model_plus = load_some_model(args.model)
16231632
params = Params.load(model_plus)
@@ -1672,14 +1681,6 @@ def main(args_in: list[str] | None = None) -> None:
16721681
}[args.outtype]
16731682

16741683
logger.info(f"params = {params}")
1675-
#TODO: add more bandaids for llama 3 detection
1676-
try:
1677-
global is_llama3_model
1678-
import convert_llama_weights_to_hf
1679-
convert_llama_weights_to_hf.write_tokenizer(args.model, os.path.join(args.model, "tokenizer.model"), 3)
1680-
is_llama3_model = True
1681-
except:
1682-
pass
16831684

16841685

16851686
model_parent_path = model_plus.paths[0].parent

0 commit comments

Comments
 (0)