Comments (9)
抱歉,我们的脚本暂时不支持多卡微调,如果您有多卡微调的需求的话,您可以看看另一个优秀的大模型微调项目:LLaMA-Factory
from huanhuan-chat.
很高兴收到您的回复,我可以进行单卡微调, 但是我运行咱们的脚本时它自动使用的是多卡,如果我是用单卡的话,应该怎么修改脚本?
from huanhuan-chat.
嗯,是这样的。由于我们的脚本只在单卡的机器上测试过,所以您可以尝试把fine_tune/lora
目录下的train.py
中第
208和213行中的device_map="auto"
修改为device_map="cuda:0"
或device_map="cuda:7"
(这个修改时根据您的报错而修改的,您可以选择现存最大的那张卡)。具体需要修改的代码位置如下图所示:
希望能对您有帮助~
from huanhuan-chat.
谢谢谢谢! 我晓得了。
还有一个问题就是 我昨天使用咱们项目下huanhuan数据集使用pt2的方法对官方Chatglm2-6b模型进行训练,使用的代码是Chatglm2官方微调的代码, 经过我微调后,我问模型“你是谁”类似的问题,模型不不知道它叫“嬛嬛”,这个问题是因为我是用的训练方式是pt2的原因吗? 很期待您的解答。谢谢
from huanhuan-chat.
由于微调方法不同,模型展现出来的效果也会有差异,对于不同的问题也是这样的。角色对话类微调在我们尝试过很多种微调方法之后,确定lora是最适合的。希望这个回答可以帮到您~
from huanhuan-chat.
如果有更多的问题想要交流的话,可以看我的github主页的联系方式。(加微信也可以,需要通过邮箱添加)
from huanhuan-chat.
谢谢!非常感谢您的回答。我已向您发送邮件,添加您为好友。万般感谢!
from huanhuan-chat.
model = AutoModel.from_pretrained(
finetune_args.model_path, load_in_8bit=False, trust_remote_code=True
)
model = model.to("cuda:0")
可以改成这样,选择特定显卡,或者使用export CUDA_VISIBLE_DEVICES=0
from huanhuan-chat.
model = AutoModel.from_pretrained( finetune_args.model_path, load_in_8bit=False, trust_remote_code=True ) model = model.to("cuda:0")可以改成这样,选择特定显卡,或者使用export CUDA_VISIBLE_DEVICES=0
好的,谢谢您的回复!
from huanhuan-chat.
Related Issues (20)
- 请问sft数据集是如何整理的,可以提供方法吗? HOT 3
- 24G GPU can use for classffication in this project? HOT 1
- 关于huanhuan-chat微调报错的问题 HOT 3
- Error Report: pip install no such file or directory HOT 3
- 请教sft训练数据集设计的依据是什么? HOT 1
- 几个问题 HOT 4
- 没有GPT的情况下怎样复现嬛嬛 HOT 4
- 多轮对话数据 HOT 1
- pip安装依赖时报安装包冲突。 HOT 2
- bash generation.sh报错:Error communicating with OpenAI:exceeded with url: vl/chat/completions (Caused by SSLError(CertificateError("hostnameapi.openai.com' HOT 2
- 搭建一个小程序/网站 HOT 1
- 为什么在训练的时候loss直接变0,梯度直接nan了? HOT 1
- pip install -r requirement.txt 安装需要进行如下的修改
- error: the following arguments are required: --output_dir
- 微调后没起作用 HOT 3
- 无法使用peftmodel HOT 1
- Why is the input text written in "Instruction" instead of "input"? HOT 2
- System prompt 如何设计? HOT 3
- 甄嬛传的剧本txt是如何下载的啊 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 huanhuan-chat.