Comments (4)
你好,环境版本是下面这些。如果8bit量化存在问题,可以尝试使用4bit量化。
accelerate==0.21.0
transformers==4.33.0
bitsandbytes==0.39.1
from deepke.
多谢回复。4bit量化,该如何修改代码?
from deepke.
quantization_config=BitsAndBytesConfig(
load_in_4bit=True,
llm_int8_threshold=6.0,
llm_int8_has_fp16_weight=False,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
)
model = AutoModelForCausalLM.from_pretrained(
model_path,
config=config,
device_map="auto",
quantization_config=quantization_config,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
)
设置并传入quantization_config参数
from deepke.
请问您还有其他问题吗?
from deepke.
Related Issues (20)
- 安装后测试案例报错 HOT 8
- DeepKE-cnSchema开箱即用版给出的离谱关系抽取结果 HOT 7
- 多个微调模型在信息抽取的性能比较 HOT 3
- 关于DeepKE-LLM训练时的数据转换 HOT 4
- 微调oneke HOT 9
- 关于利用LoRa微调后调用结果模型 HOT 2
- 全量微调权重保存 HOT 2
- 关于数据标注的问题 HOT 3
- DeepKE中RE模型问题咨询 HOT 14
- 关于re 文档级别抽取预测结果的问题 HOT 4
- DeepKE-cnSchema使用遇到问题 HOT 7
- 关于ie2instruction的数据转换Bug问题
- Deep-KE中cnschema问题咨询 HOT 2
- GLM-4训练 HOT 2
- 这里怎么贴了三个知乎的跳转链接 HOT 2
- 关于re standard预测模型的选择 HOT 6
- PermissionError: [Errno 13] Permission denied
- where is the fintuing_pt.py in InstructKGC HOT 1
- 使用ner few-shot 自定义中文数据集训练的模型,predict预测的时候报错 HOT 3
- example下的ee执行predict.py报错 HOT 10
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 deepke.