Instructions to use zai-org/chatglm2-6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/chatglm2-6b with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/chatglm2-6b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
有无最大生成长度,突然停止生成
#53
by Squidwargg - opened
在使用chatglm2-6b的stream_chat模式进行对话问答的时候,会存在明显的未结束,但是停止生成的情况。查验后,我的生成文本成都大约2078个字符
请问这是目前存在的一个bug吗?或者最大生成长度是通过可配置进行控制或截断的吗?
有个参数是max_length,可以调大
有个参数是max_length,可以调大
请问在在哪里呢?指点下呗,谢谢@couldn
model.stream_chat(tokenizer, input, history, max_length=max_length, top_p=top_p,
temperature=temperature):