NotImplementedError: Cannot copy out of meta tensor; no data!

I am finetuning hugging face “HuggingFaceH4/starchat-alpha” model for making a data science text to code generating bot.
This is the format of my dataset:
train: Dataset({
features: [‘input_ids’, ‘labels’],
num_rows: 5012
test: Dataset({
features: [‘input_ids’, ‘labels’],
num_rows: 1325
and the structure of the dataset looks somewhat like this, which was explained in starcoder documentation,
Below is a dialogue between a human and an ANUJ_AI
Minimum count of ind… so on
def possible ( x , S , N ) : …so on

I am loading the model on my colab in 8 bit format using :hugs:transformer BitsAndBytesConfig for saving memory, then loaded the model using a device map which was made using :hugs: transformers AutoConfig and the acclerate which divided my model amoung ‘gpu’, ‘cpu’ RAM and my ‘disk’.

Once the model and its checkpoints were downloaded successfully then i used transformers.Trainer to train the model on my custom dataset.
my using the below code:
but i am always getting this error =:

Please help me out with this error, if anyone has prior experience in this.
Your inputs will be highly appreciated.
Thank You!

1 Like

i’m having the same issue, have you found a solution?

same issue here, please reply if you find any solution!