Comments (5)
- 使用transformers 4.38.1 不需要merges.txt,你可以再试下,我这边测试的是7b模型,理论上所以模型的tokenizer应该是一样的
- 是的,qwen-hf格式的模型emb实际维度与tokenizer.vocab_size不一致导致此问题,需要在运行设置EXTRA_VOCAB_SIZE,可参考https://github.com/alibaba/Pai-Megatron-Patch/blob/main/examples/qwen1.5/run_finetune_megatron_qwen_withGA.sh 第二行,每个模型的EXTRA_VOCAB_SIZE设置为qwen-hf中config.json中的vocab_size减去tokenizer.vocab_size。
- 我这边验证了开启pp时可以正常跑,确认下运行环境、gpu卡数设置(tp*pp)
from pai-megatron-patch.
extra-vocab-size是啥意思,为什么是293呀?152064-151643=421
from pai-megatron-patch.
我这边也出现了第一个问题,transformers版本是4.38.1,测试的7b模型
from pai-megatron-patch.
- 使用transformers 4.38.1 不需要merges.txt,你可以再试下,我这边测试的是7b模型,理论上所以模型的tokenizer应该是一样的
- 是的,qwen-hf格式的模型emb实际维度与tokenizer.vocab_size不一致导致此问题,需要在运行设置EXTRA_VOCAB_SIZE,可参考https://github.com/alibaba/Pai-Megatron-Patch/blob/main/examples/qwen1.5/run_finetune_megatron_qwen_withGA.sh 第二行
- 我这边验证了开启pp时可以正常跑,确认下运行环境、gpu卡数设置(tp*pp)
- 刚才又测试了一下,在transformers 4.38.1或4.38.2的情况下,不带merges.txt时还是会报错,但是如果把 https://github.com/alibaba/Pai-Megatron-Patch/blob/main/megatron_patch/tokenizer/__init__.py#L96 这一行的use_fast注释掉就不会出错了
- 之前没有想到可以通过EXTRA_VOCAB_SIZE来设置,不过比较神奇的是,qwen-1.5-的7B和14B模型,vocab_size是不一样的,EXTRA_VOCAB_SIZE=293只适合于7B模型。所以理论上可能用读取参数的方式来做会比较稳妥?
- 拉了一个nvidia的官方docker镜像之后可以正常运行了,估计是我之前某些地方没有配置好吧
from pai-megatron-patch.
extra-vocab-size是啥意思,为什么是293呀?152064-151643=421
看我上面的回复,7B和14B的vocab_size不一样,293是7B的
from pai-megatron-patch.
Related Issues (20)
- 钉钉群满了 HOT 5
- [rank31]: OSError: error stat()ing file 数据集map问题
- 是否支持sharegpt格式数据?或者带"history"字段的多轮对话数据? HOT 1
- 打扰了,提个关于多机训练的issues HOT 2
- Flash-Attn 3的支持 HOT 1
- 群满了 HOT 3
- optimizer offloading 太强了 HOT 1
- Mcore是不支持pp吗? HOT 3
- starcoder依赖哪个版本的megatron-lm? HOT 3
- 保存的checkpoints中缺少distrib_optim.pt
- Channel Loss支持 HOT 1
- 断点续训问题 HOT 1
- 关于使用idxmap格式finetune qwen2 HOT 2
- mmap数据格式问题 HOT 1
- 安装pyarrow失败 HOT 1
- mcore 权重转换不支持pp>1 HOT 2
- 使用flash-attn训练Qwen1.5 1.8B 加速效果不明显 HOT 1
- TypeError: get_cpu_offload_context() missing 1 required positional argument: 'weight_offloading' HOT 2
- qwen2-sft 训练起步阶段就卡住 HOT 2
- deepseek模型转换问题 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 pai-megatron-patch.