UmeAiRT commited on
Commit
48f8938
·
verified ·
1 Parent(s): 6a3a03e

Sync upload configuration_florence2.py

Browse files
models/LLM/Florence-2-base-PromptGen-v2.0/configuration_florence2.py CHANGED
@@ -262,7 +262,7 @@ class Florence2LanguageConfig(PretrainedConfig):
262
  )
263
 
264
  # ensure backward compatibility for BART CNN models
265
- if self.forced_bos_token_id is None and kwargs.get("force_bos_token_to_be_generated", False):
266
  self.forced_bos_token_id = self.bos_token_id
267
  warnings.warn(
268
  f"Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. "
 
262
  )
263
 
264
  # ensure backward compatibility for BART CNN models
265
+ if getattr(self, "forced_bos_token_id", None) is None and kwargs.get("force_bos_token_to_be_generated", False):
266
  self.forced_bos_token_id = self.bos_token_id
267
  warnings.warn(
268
  f"Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. "