ChatGLM-6B
ChatGLM-6B copied to clipboard
无法按照指定字数生成文章?
trafficstars
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
无法生成指定字数文章
Expected Behavior
No response
Steps To Reproduce
无法生成指定字数文章
Environment
- OS:Ubuntu
- Python: 3.7
- Transformers:4.27.1
- PyTorch:1.10
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :
Anything else?
No response
+1
因为使用的分词器不是按字切分的,用的是sentencePiece,这个感觉就没办法准确吧,模型也不知道每个token的长度本身是多少个字
生成的时候,有参数min_new_tokens,max_new_tokens设置一年就按照“token”个数生成了。