Models now can be loaded via user-defined load scripts
Path to such scripts is to be provided in YAML config in model.path_to_load_script key
Can be absolute or relative to main hydra config file
Load scripts have to define load_model and load_tokenizer functions, that accept arbitrary model_path argument
They can also accept other kwargs, that are provided in the model.load_model_args and model.load_tokenizer_args dicts
Model type now should be provided separately in config, and can be either CausalLM or Seq2SeqLM
For now I left the old code that is used as a fallback when no path to load script is provided, with a deprecation warning. In next major release we will remove fallback conditions and old code.
model.path_to_load_script
keyload_model
andload_tokenizer
functions, that accept arbitrarymodel_path
argumentmodel.load_model_args
andmodel.load_tokenizer_args
dictsCausalLM
orSeq2SeqLM
For now I left the old code that is used as a fallback when no path to load script is provided, with a deprecation warning. In next major release we will remove fallback conditions and old code.