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
how to suppress warning Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
#5
by huashiyiqike - opened
every model.chat call will print this
Setting pad_token_id to eos_token_id:2 for open-end generation.
Fixed
zxdu20 changed discussion status to closed
I need the same solution ...... it is very irritating, when we generate text in batches.
how did you fix it
Add the argument pad_token_id to model.generate(..., pad_token_id=tokenizer.eos_token_id)