mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Add traceback to debug log on fallback
This commit is contained in:
@@ -332,10 +332,13 @@ class HFTorchInferenceModel(HFInferenceModel):
|
||||
raise
|
||||
|
||||
logger.warning(f"Fell back to GPT2LMHeadModel due to {e}")
|
||||
logger.debug(traceback.format_exc())
|
||||
|
||||
try:
|
||||
return GPT2LMHeadModel.from_pretrained(location, **tf_kwargs)
|
||||
except Exception as e:
|
||||
logger.warning(f"Fell back to GPTNeoForCausalLM due to {e}")
|
||||
logger.debug(traceback.format_exc())
|
||||
return GPTNeoForCausalLM.from_pretrained(location, **tf_kwargs)
|
||||
|
||||
def get_hidden_size(self) -> int:
|
||||
|
Reference in New Issue
Block a user