Comments (3)
我不是jittor或chatglm的开发人员,目前做过一些尝试,最终还是没法用,复现步骤如下:
使用chatglm提供的int8量化模型,然后直接把pytorch替换成jittor版本的torch,直接跑会报个错:
jittor.nn.Linear类收到了额外的device参数
到python3.xx/dist-packages/jittor/nn.py里面Linear类的__init__函数中,加一个device=None参数即可抑制错误
然后再跑,不报错了,但是输出的逻辑全乱,倒不是乱码,只是毫无意义。
蹲一个官方解决方案
from jittorllms.
使用如下命令倒是能限制它推理时的显存占用不超过5G,运行内存占用不超过12G,但一开始加载fp16格式的chatglm模型时它要把运行内存全打满,很容易就被kill
export JT_SAVE_MEM=1
export cpu_mem_limit=12000000000
export device_mem_limit=5000000000
from jittorllms.
同样的问题
from jittorllms.
Related Issues (20)
- 设置cpu_mem_limit和device_mem_limit真的有用吗? HOT 1
- 一顿命令猛如虎,执行完之后哐哐一顿报错。走到 loading_model就死了 HOT 1
- 怎么修改模型下载位置 HOT 3
- 启动报错,这个是什么问题
- pytorch torchvision等各包的依赖有点问题
- windows下运行后会报错AttributeError: 'Embedding' object has no attribute 'astype' HOT 8
- [程序运行权限相关]
- Running on local URL
- GPU memory is overflow, please reduce your batch_size or data size!
- 如何支持chatglm2 HOT 2
- cli 启动chatglm报错 HOT 2
- 提问后报错Check failed: res==1 failed to write swap file
- AssertionError HOT 2
- AttributeError: 'ChatGLMForConditionalGeneration' object has no attribute 'float32' [e 0711 13:14:40.163345 00 log.cc:246] Caught SIGCHLD. Maybe out of memory, please reduce your worker size. si_errno: 0 si_code: 0 si_status: 0 , quick exit
- chatglm 模型微调后 该如何加载微调后的模型呢》? HOT 1
- error: expected primary-expression before ‘struct’
- chatglm运行时报错Chat error 'jittor_core.Var' object has no attribute 'tile'
- 希望取得联系
- 报错: in check_cuda assert ret == 0 AssertionError HOT 1
- 安装很费劲,现在遇到如下问题,有人能帮我看看嘛 HOT 1
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 jittorllms.