Text Generation
Transformers
Safetensors
imp
custom_code

fine tune

#1
by NickyNicky - opened

thanks, excellent model, how could I fine tune this one?
example code?

Owner

We are working on the release of training and evaluaation code on Github. When it is done, the funetine script will be provided there. the HF repo focuses on model inference.

MILVLG changed discussion status to closed

run Google Colab ?

Hey king, here is the piece of code you wanted :
loss = F.cross_entropy(model(images=image_tensor, input_ids=input_ids[:, :-1],
attention_mask=torch.ones_like(input_ids[:, :-1]).to(input_ids.device)).logits[:, -nb_toks_anwer:].permute((0, 2, 1)), input_ids[:, -nb_toks_anwer:])

thanks...,

Do you think this training code is correct?

https://colab.research.google.com/drive/1Rg44ZVPf3_cs77UUXmOp_eMzGLoQtml0?usp=sharing

thanks...,

Do you think this training code is correct?

https://colab.research.google.com/drive/1Rg44ZVPf3_cs77UUXmOp_eMzGLoQtml0?usp=sharing

I don't have a lot of time to check but everything is fine I think. You seem to have understood what I did and to understand what you are doing.

Sign up or log in to comment