Comments (2)
根据网上的解决方案,将model.generate的采样概率改成greedy search,即将do_sample参数设成false,但是这样模型的回答为空值。
from chatglm3-finetune.
请问博主有没有在推理时infer.py遇到过这个问题 Traceback (most recent call last): File "infer.py", line 48, in out = model.generate( File "/data/Wangkh/anaconda3/envs/langchain/lib/python3.8/site-packages/peft/peft_model.py", line 1130, in generate outputs = self.base_model.generate(**kwargs) File "/data/Wangkh/anaconda3/envs/langchain/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/data/Wangkh/anaconda3/envs/langchain/lib/python3.8/site-packages/transformers/generation/utils.py", line 1572, in generate return self.sample( File "/data/Wangkh/anaconda3/envs/langchain/lib/python3.8/site-packages/transformers/generation/utils.py", line 2655, in sample next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1) RuntimeError: probability tensor contains either
inf
,nan
or element < 0
没遇到过哈
from chatglm3-finetune.
Related Issues (19)
- Something wrong in the data preprocess HOT 3
- from model.modeling_chatglm import ChatGLMForConditionalGeneration not found HOT 1
- FineTune CUDA out of memory HOT 10
- No module named 'model' HOT 1
- 大佬能否出一个多卡训练的脚本?
- 大佬可否提供一个int4量化微调的代码参考一下 HOT 1
- 请问下 如何用这种openai api的方式推理微调过的 模型。 HOT 1
- 微调后的推理结果残缺不全 HOT 2
- 如何增加工具,使得模型能够识别? HOT 1
- 应该如何测试微调出来的效果? HOT 1
- UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 64: illegal multibyte sequence HOT 3
- SFTTrainner封装训练时间倍增 HOT 2
- lora存checkpoint的问题 HOT 2
- 你好,我用您的代码跑不管是multi还是默认的都无法自动部署在多卡上,请问需要调整代码解决吗,GPU是Tesla T4*4 HOT 3
- evaluate时显存暴增 HOT 2
- It is recommended to support multiple GPU cards HOT 2
- huggingface_hub.utils._validators.HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: './bge-large-zh'. HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: 'data/npc_data.csv'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatglm3-finetune.