Comments (5)
老哥,我用你的代码,加载模型时不报错,提问题时报这个错
Traceback (most recent call last):
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\routes.py", line 401, in run_predict
output = await app.get_blocks().process_api(
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1302, in process_api
result = await self.call_function(
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1025, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\Users\stone\Desktop\MOSS\moss_gui_demo(8bit).py", line 153, in predict
outputs = model.generate(
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 1485, in generate
return self.sample(
File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 2560, in sample
next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
RuntimeError: probability tensor contains either inf
, nan
or element < 0
显卡M40 24G cuda11.6 pytorch 1.13.1+cu116
from moss.
老哥,我用你的代码,加载模型时不报错,提问题时报这个错 Traceback (most recent call last): File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\routes.py", line 401, in run_predict output = await app.get_blocks().process_api( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1302, in process_api result = await self.call_function( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1025, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\stone\Desktop\MOSS\moss_gui_demo(8bit).py", line 153, in predict outputs = model.generate( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 1485, in generate return self.sample( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 2560, in sample next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1) RuntimeError: probability tensor contains either
inf
,nan
or element < 0显卡M40 24G cuda11.6 pytorch 1.13.1+cu116
generate函数我使用的是MOSS原文中的方式。目前来看,可以运行。你先试试FastChat项目,能否正常运行?看看是不是transformers的库或者tokenizer库需要升级了?
from moss.
老哥,我用你的代码,加载模型时不报错,提问题时报这个错 Traceback (most recent call last): File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\routes.py", line 401, in run_predict output = await app.get_blocks().process_api( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1302, in process_api result = await self.call_function( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1025, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\stone\Desktop\MOSS\moss_gui_demo(8bit).py", line 153, in predict outputs = model.generate( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 1485, in generate return self.sample( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 2560, in sample next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1) RuntimeError: probability tensor contains either
inf
,nan
or element < 0显卡M40 24G cuda11.6 pytorch 1.13.1+cu116
remove do_sample=True can pass the error
refer: THUDM/ChatGLM-6B#31 (comment)
from moss.
老哥,我用你的代码,加载模型时不报错,提问题时报这个错 Traceback (most recent call last): File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\routes.py", line 401, in run_predict output = await app.get_blocks().process_api( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1302, in process_api result = await self.call_function( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1025, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\stone\Desktop\MOSS\moss_gui_demo(8bit).py", line 153, in predict outputs = model.generate( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 1485, in generate return self.sample( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 2560, in sample next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1) RuntimeError: probability tensor contains either
inf
,nan
or element < 0
显卡M40 24G cuda11.6 pytorch 1.13.1+cu116remove do_sample=True can pass the error refer: THUDM/ChatGLM-6B#31 (comment)
感谢您的回答,这样虽然不报错了,但是会卡很久没有回复
from moss.
老哥,我用你的代码,加载模型时不报错,提问题时报这个错 Traceback (most recent call last): File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\routes.py", line 401, in run_predict output = await app.get_blocks().process_api( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1302, in process_api result = await self.call_function( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\gradio\blocks.py", line 1025, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\stone\Desktop\MOSS\moss_gui_demo(8bit).py", line 153, in predict outputs = model.generate( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 1485, in generate return self.sample( File "C:\Users\stone\Desktop\MOSS\env\lib\site-packages\transformers\generation\utils.py", line 2560, in sample next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1) RuntimeError: probability tensor contains either
inf
,nan
or element < 0
显卡M40 24G cuda11.6 pytorch 1.13.1+cu116remove do_sample=True can pass the error refer: THUDM/ChatGLM-6B#31 (comment)
为了验证是不是只有MOSS有这个问题,我特意在ChatGLM-6B上用了相同的办法,同样也是卡住很久没有回复
from moss.
Related Issues (20)
- 求邀请码
- finetune的时候为何没有把<|Human|>的loss给mask掉?
- 微信群聊过期了
- moss-003-sft-plugin-data里面有很多错误
- 两张v100部署失败 HOT 2
- RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cuda:1) HOT 1
- 这是小时候的550W吗 HOT 1
- langchain+moss
- how to continue pretrain?
- export CUDA_LAUNCH_BLOCKING=1 Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
- 请问moss-003-pm-data偏好数据什么时间能开源? HOT 2
- how to run fnlp/moss-base-7b in multi gpus
- do_sample=True
- MOSS next release? HOT 3
- 你好,我想知道moss能否采用别的gpu调试 HOT 1
- 想问下moss的多轮sft数据是怎么制作出来的 HOT 1
- 你好,我有一个很有意思的想法。能不能提供帮助 HOT 3
- 多轮对话数据构造的时候是否会有上下文不一致的问题
- moss-moon-003-sft Jupyter测试失败 HOT 2
- moss为什么不更新了
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 moss.