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
|
raise
|
||||||
|
|
||||||
logger.warning(f"Fell back to GPT2LMHeadModel due to {e}")
|
logger.warning(f"Fell back to GPT2LMHeadModel due to {e}")
|
||||||
|
logger.debug(traceback.format_exc())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return GPT2LMHeadModel.from_pretrained(location, **tf_kwargs)
|
return GPT2LMHeadModel.from_pretrained(location, **tf_kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"Fell back to GPTNeoForCausalLM due to {e}")
|
logger.warning(f"Fell back to GPTNeoForCausalLM due to {e}")
|
||||||
|
logger.debug(traceback.format_exc())
|
||||||
return GPTNeoForCausalLM.from_pretrained(location, **tf_kwargs)
|
return GPTNeoForCausalLM.from_pretrained(location, **tf_kwargs)
|
||||||
|
|
||||||
def get_hidden_size(self) -> int:
|
def get_hidden_size(self) -> int:
|
||||||
|
Reference in New Issue
Block a user