Comments (7)
我是可以正常用原始模型,但是8bit量化报和你一样的错,https://github.com/baichuan-inc/Baichuan2/issues/48#issue-1885592066。
有解决方案了可以互相通知一下。
from baichuan2.
遇到了同样的问题,有解决方案了吗
from baichuan2.
@pagyyuan @ywancit @bihui9968
model = AutoModelForCausalLM.from_pretrained(quant8_saved_dir, load_in_8bit=True, device_map="auto", trust_remote_code=True)
问题应该出自device_map="auto"
这里,我的机器内存和GPU显存都较小,因此它会将模型分别加载到cpu和cuda里,接下来保存的时候,就没有把全部权重都保存下来(保存下来的'pytorch_model'只有8GB左右,这并不是一个正常的大小)。
我将把模型全部加载到cpu里:device_map="cpu"
,保存下来的’pytorch_model‘大小有13.9GB,推理正常没有报错。
from baichuan2.
@ChiQiuHong 我将device_map由"auto"改为"cpu"后会报新的错误:ValueError: If passing a string for device_map
, please choose 'auto', 'balanced', 'balanced_low_0' or 'sequential'.
from baichuan2.
我将报错的地方打印出来:有一个tensor是这样的:tensor([[nan, nan, nan, ..., nan, nan, nan]], device='cuda:0',
dtype=torch.float16)
from baichuan2.
请问解决了吗
from baichuan2.
#291 可以看下这个能不能解你的问题
from baichuan2.
Related Issues (20)
- Baichuan2 Chat Template HOT 6
- Baichuan2 7B和13B的模型训练数据和数据的训练顺序是否一致?
- base模型推理pred和inputs完全一样 HOT 2
- Baichuan2-7B-Base微调报错 AttributeError: 'BaichuanConfig' object has no attribute 'z_loss_weight'AttributeError: 'BaichuanConfig' object has no attribute 'z_loss_weight' HOT 1
- LLM相同输入,多次输出不一样
- 使用fastgpt需要流式接口,请求支持 HOT 1
- 使用fastgpt框架对接baichuan2需要流式接口,请求支持 HOT 4
- 一块V100的卡,跑13b openai的启动脚本。短文本没事,文本一长就报CUDA error: out of memory。
- Baichuan2-13B-Chat-4bits 跑不起来 HOT 2
- baichuan2-13B-chat 微调loss 一直为0 HOT 2
- baichuan2-7B-chat 微调使用TrainerCallback,报错 HOT 1
- baichuan2-13b 微调后模型使用vllm输出与官方web_demo结果不一致
- 请问模型 Baichuan2-13B-Chat-4bits 支持MAC吗?
- 数据集
- 我使用了lora微调训练的4个epoch,但是模型还没有收敛,如何从保存的checkpoint继续训练
- 输入窗口是多少呢 HOT 1
- 训练和推理时数据格式不同
- 请问baichuan2的训练数据分类体系是出自哪里?
- 运行web_demo显示“'utf-8' codec can't decode bytes in position 1132-1134: invalid continuation byte”
- 可以支持ollama, 或anythingLLM 么
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 baichuan2.