Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 22fdd56

Browse files
committed
Modify export to use unified tokenizer type
1 parent d77de35 commit 22fdd56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchchat/export.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import os
88
from typing import Dict, Optional
99

10+
from tokenizer.tokenizer_type import TokenizerType
1011
import torch
1112
import torch._inductor
1213
import torch.nn as nn
@@ -482,7 +483,7 @@ def main(args):
482483

483484
if tokenizer_args is None:
484485
tokenizer_type = "0"
485-
elif tokenizer_args.is_sentencepiece():
486+
elif tokenizer_args == TokenizerType.SENTENCEPIECE:
486487
tokenizer_type = "2" # Corresponding to llama2
487488
else:
488489
tokenizer_type = "3" # Corresponding to llama3

0 commit comments

Comments
 (0)