Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

推理参数如何设置才能复现最佳效果 #5

Closed
weicheng59 opened this issue Jun 15, 2023 · 9 comments
Closed

推理参数如何设置才能复现最佳效果 #5

weicheng59 opened this issue Jun 15, 2023 · 9 comments
Labels
question Further information is requested

Comments

@weicheng59
Copy link

weicheng59 commented Jun 15, 2023

imageimage
使用text-generation-webui,加载模型进行推理,chat 模式,parameters 为 LLaMA-Precise,
英文得不到应答,请问这是正确的推理方式吗?
image

@JaheimLee
Copy link

同问,对话或指令的模板怎么设置比较好啊

@ninehills
Copy link

从 README 看这个模型应该是一个 pretrain 模型,类似于 LLaMA。

如果用在对话上,可能还需要使用中文对话数据集以及指令数据集进行 SFT ,否则效果可能不会太好。

@GITMrzk
Copy link

GITMrzk commented Jun 15, 2023

感觉上是个basemodel 没有指令微调呢。

@shibing624
Copy link

是 base model,未SFT, 自己训练了SFT的对话数据,才有对话能力。

@zmsn-2077 zmsn-2077 added the question Further information is requested label Jun 15, 2023
@zmsn-2077
Copy link
Collaborator

从 README 看这个模型应该是一个 pretrain 模型,类似于 LLaMA。

如果用在对话上,可能还需要使用中文对话数据集以及指令数据集进行 SFT ,否则效果可能不会太好。

是的

@thomashooo
Copy link

怎么加载到text-generation-webui中的呢,直接放到models里面,

python server.py --model baichuan-7B --chat --n-gpu-layers 200

启动会报错呢:
(textgen) thomas@thomashooodeMacBook-Pro-2 text-generation-webui % python server.py --model baichuan-7B --chat --n-gpu-layers 200
bin /Users/thomas/miniconda3/envs/textgen/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so
/Users/thomas/miniconda3/envs/textgen/lib/python3.10/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
warn("The installed version of bitsandbytes was compiled without GPU support. "
'NoneType' object has no attribute 'cadam32bit_grad_fp32'
2023-06-15 18:28:27 INFO:Loading baichuan-7B...
Traceback (most recent call last):
File "/Users/thomas/Documents/Pythons/ai/text-generation-webui/server.py", line 1154, in
shared.model, shared.tokenizer = load_model(shared.model_name)
File "/Users/thomas/Documents/Pythons/ai/text-generation-webui/modules/models.py", line 76, in load_model
shared.model_type = find_model_type(model_name)
File "/Users/thomas/Documents/Pythons/ai/text-generation-webui/modules/models.py", line 64, in find_model_type
config = AutoConfig.from_pretrained(path_to_model, trust_remote_code=shared.args.trust_remote_code)
File "/Users/thomas/miniconda3/envs/textgen/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 947, in from_pretrained
trust_remote_code = resolve_trust_remote_code(
File "/Users/thomas/miniconda3/envs/textgen/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 553, in resolve_trust_remote_code
raise ValueError(
ValueError: Loading models/baichuan-7B requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option trust_remote_code=True to remove this error.

@thomashooo
Copy link

成功加载到text-generation-webui中,结果就是胡言乱语了。。

python server.py --model baichuan-7B --chat --n-gpu-layers 200 --trust_remote_code

@Cola-Ice
Copy link

从 README 看这个模型应该是一个 pretrain 模型,类似于 LLaMA。

如果用在对话上,可能还需要使用中文对话数据集以及指令数据集进行 SFT ,否则效果可能不会太好。

你好,请教一下,如果我想用他做信息提取,从一段话里提取出一个包含指定字段的json,是不是需要先进行指令集训练?

@ninehills
Copy link

你好,请教一下,如果我想用他做信息提取,从一段话里提取出一个包含指定字段的json,是不是需要先进行指令集训练?

@Cola-Ice 是的,需要进行 Instruction Fine-Tuning,可以参考 #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants