Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

zero3時の学習済みモデルの読み込み対応 #28

Open
kotarotanahashi opened this issue Dec 1, 2023 · 0 comments
Open

zero3時の学習済みモデルの読み込み対応 #28

kotarotanahashi opened this issue Dec 1, 2023 · 0 comments

Comments

@kotarotanahashi
Copy link
Collaborator

heronの今後の修正事項として、zero3の時にモデルの初期値として学習済みモデルを読み込む場合、

load_pretrained_weight(model, model_config["pretrained_path"])

の部分がエラーとなってしまう。load_modelの部分を以下のようにfrom_pretrainedを使って学習済みモデルから読み込むように変更する必要ありそうです。

model = VideoBlipForConditionalGeneration.from_pretrained(
   model_config["pretrained_path"], torch_dtype=torch.float16, ignore_mismatched_sizes=True
)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant