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,
<|system|>
Below is a dialogue between a human and an ANUJ_AI
<|end|>
<|user|>
Minimum count of ind… so on
<|end|>
<|assistant|>
def possible ( x , S , N ) : …so on
<|end|>

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:
image
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!