Comments (2)
请检查是否正确加载我们修改的transformers。如果选择使用更高版本的torch和transformers,请将我们修改的部分(主要为llama_modeling.py)适配到最新版本的transformers即可。
from loramoe.
代码修改:1. 将模型换成了llama3
2. 修改了device
报错情况:Traceback (most recent call last):
File "/home/xsong/SiameseModelTrain/LoRAMoE/run_loramoe.py", line 569, in
main()
File "/home/xsong/SiameseModelTrain/LoRAMoE/run_loramoe.py", line 345, in main
tokenizer = LlamaTokenizer.from_pretrained(model_args.tokenizer_name_or_path, **tokenizer_kwargs)
File "/home/xsong/SiameseModelTrain/LoRAMoE/transformers/tokenization_utils_base.py", line 1825, in from_pretrained
return cls._from_pretrained(
File "/home/xsong/SiameseModelTrain/LoRAMoE/transformers/tokenization_utils_base.py", line 1988, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "/home/xsong/SiameseModelTrain/LoRAMoE/transformers/models/llama/tokenization_llama.py", line 96, in init
self.sp_model.Load(vocab_file)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/sentencepiece/init.py", line 961, in Load
return self.LoadFromFile(model_file)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/sentencepiece/init.py", line 316, in LoadFromFile
return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
TypeError: not a string
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 1415452) of binary: /home/xsong/anaconda3/envs/newloramoe/bin/python
Traceback (most recent call last):
File "/home/xsong/anaconda3/envs/newloramoe/bin/torchrun", line 33, in
sys.exit(load_entry_point('torch==2.0.1', 'console_scripts', 'torchrun')())
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 346, in wrapper
return f(*args, **kwargs)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/run.py", line 794, in main
run(args)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/run.py", line 785, in run
elastic_launch(
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 134, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 250, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:run_loramoe.py FAILED
报错情况:Traceback (most recent call last):
File "/home/xsong/SiameseModelTrain/LoRAMoE/run_loramoe.py", line 569, in
main()
File "/home/xsong/SiameseModelTrain/LoRAMoE/run_loramoe.py", line 345, in main
tokenizer = LlamaTokenizer.from_pretrained(model_args.tokenizer_name_or_path, **tokenizer_kwargs)
File "/home/xsong/SiameseModelTrain/LoRAMoE/transformers/tokenization_utils_base.py", line 1825, in from_pretrained
return cls._from_pretrained(
File "/home/xsong/SiameseModelTrain/LoRAMoE/transformers/tokenization_utils_base.py", line 1988, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "/home/xsong/SiameseModelTrain/LoRAMoE/transformers/models/llama/tokenization_llama.py", line 96, in init
self.sp_model.Load(vocab_file)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/sentencepiece/init.py", line 961, in Load
return self.LoadFromFile(model_file)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/sentencepiece/init.py", line 316, in LoadFromFile
return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
TypeError: not a string
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 1415452) of binary: /home/xsong/anaconda3/envs/newloramoe/bin/python
Traceback (most recent call last):
File "/home/xsong/anaconda3/envs/newloramoe/bin/torchrun", line 33, in
sys.exit(load_entry_point('torch==2.0.1', 'console_scripts', 'torchrun')())
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 346, in wrapper
return f(*args, **kwargs)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/run.py", line 794, in main
run(args)
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/run.py", line 785, in run
elastic_launch(
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 134, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/xsong/anaconda3/envs/newloramoe/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 250, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
run_loramoe.py FAILED
问题解决了嘛
from loramoe.
Related Issues (15)
- Missing evaluation file HOT 3
- 没有评估流程??? HOT 1
- Potential Bug in Paper or Code HOT 1
- 训练保存下来的模型不是完整的模型,无法使用opencompass评估 HOT 4
- 【bug】代码无法运行 HOT 8
- 请问训练完毕,如何进行generation HOT 3
- transformers版本问题 HOT 4
- 训练数据中的"task_type"的作用 HOT 1
- 使用opencompass评估模型出错
- 求指教!!请问论文中的Router模块对应代码的哪部分内容呢 HOT 2
- 请问微调实验需要多少显存
- LoRAMoE和LoRA似乎没有显著差异
- 微调后的模型是否支持使用vLLM进行推理?
- 多模态模型适用吗
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 loramoe.