ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length,medalpaca & lora

dnovak232
Tue, 09 Jan 2024 15:55:45 +0000

mouadenna:

truncation=True

Here is what works for me, I suspect that maybe try could be the problematic one:

!pip install -q torch
!pip install -q transformers==4.36.0 #huggingface transformers for downloading models weights
!pip install -q datasets #huggingface datasets to download and manipulate datasets
!pip install -q peft==0.4.0 #Parameter efficient finetuning - for qLora Finetuning
!pip install -q bitsandbytes==0.41.1 #For Model weights quantisation
!pip install -q trl==0.4.7 #Transformer Reinforcement Learning - For Finetuning using Supervised Fine-tuning
!pip install -q accelerate==0.21.0
!pip install -q wandb -U #Used to monitor the model score during training
!pip install -q scipy
!pip install -q tensorboard
!pip install -q matplotlib