File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ def from_args(cls, args): # -> BuilderArgs:
94
94
is_chat_model = True
95
95
else :
96
96
for path in [
97
- args . checkpoint_path ,
97
+ checkpoint_path ,
98
98
checkpoint_dir ,
99
99
args .dso_path ,
100
100
args .pte_path ,
@@ -104,8 +104,11 @@ def from_args(cls, args): # -> BuilderArgs:
104
104
path = str (path )
105
105
if path .endswith ("/" ):
106
106
path = path [:- 1 ]
107
- path_basename = os .path .basename (path )
108
- if "chat" in path_basename :
107
+ if os .path .isfile (path ):
108
+ path = os .path .dirname (path )
109
+
110
+ path_basename = os .path .basename (path ).lower ()
111
+ if "chat" in path_basename or "instruct" in path_basename :
109
112
is_chat_model = True
110
113
111
114
return cls (
@@ -222,7 +225,7 @@ def from_args(cls, args): # -> TokenizerArgs:
222
225
t = None ,
223
226
)
224
227
225
-
228
+
226
229
def _initialize_tokenizer (tokenizer_args : TokenizerArgs ):
227
230
return tokenizer_args .t
228
231
You can’t perform that action at this time.
0 commit comments