Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

[BUG] 简洁阐述[BUG] 当使用LLaMA-Factory 使用.bin格式训练合并之后的模型,然后使用langchain-chatchat,加载训练的模型出现TypeError: PeftConfig.__init__() got an unexpected keyword argument '_name_or_path'问题 / Concise description of the issue

Open caijx168 opened this issue 2 years ago • 2 comments

[BUG] 简洁阐述[BUG] 当使用LLaMA-Factory 使用.bin格式训练合并之后的模型,然后使用langchain-chatchat,加载训练的模型出现TypeError: PeftConfig.init() got an unexpected keyword argument '_name_or_path'问题 / Concise description of the issue

caijx168 avatar Apr 17 '24 07:04 caijx168

To address the TypeError: PeftConfig.__init__() got an unexpected keyword argument '_name_or_path' error when loading a model with langchain-chatchat, follow these steps:

  1. Verify Library Versions: Ensure the library version for loading the model matches the model's requirements. Incompatibilities often lead to such errors.

  2. Inspect Model Loading Code: Check the code for loading the model to ensure the arguments passed match the expected parameters of PeftConfig.

  3. Consult Documentation: Review the documentation for the model loading library to understand the correct way to load models and the expected arguments.

  4. Update or Adjust Library Code: If using a custom or outdated library, update to the latest version or adjust the code to meet the model's loading requirements.

  5. Community Support: If unresolved, seek advice from community forums or channels related to langchain-chatchat or the model loading library for specific guidance.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

dosubot[bot] avatar Apr 17 '24 07:04 dosubot[bot]

不能直接把config.json文件名字改成adapter_config.json

TC10127 avatar May 16 '24 07:05 TC10127