File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -142,15 +142,8 @@ Error HFTokenizer::load(const std::string& path) {
142
142
143
143
// Pull out the token strings
144
144
try {
145
- const std::string bos_token =
146
- parsed_config_json.contains (" bos_token" ) && !parsed_config_json[" bos_token" ].is_null ()
147
- ? parsed_config_json[" bos_token" ].get <std::string>()
148
- : " " ;
149
-
150
- const std::string eos_token =
151
- parsed_config_json.contains (" eos_token" ) && !parsed_config_json[" eos_token" ].is_null ()
152
- ? parsed_config_json[" eos_token" ].get <std::string>()
153
- : " " ;
145
+ const std::string bos_token = parsed_config_json.at (" bos_token" );
146
+ const std::string eos_token = parsed_config_json.at (" eos_token" );
154
147
const auto bos_res = special_token_map_->tryGetInteger (bos_token);
155
148
const auto eos_res = special_token_map_->tryGetInteger (eos_token);
156
149
if (!bos_res) {
You can’t perform that action at this time.
0 commit comments