Hi! thank you for making this, I've been looking for something exactly like it for a while and I think it will suit me perfectly. I had no problems installing and inferencing with the pretrained model but when i try to train i get a strange error
seed=0, lr=2e-05, weight_decay=0.01, warmup_step=1000.0, max_step=60000, grad_clip=1.0, batch_size_train=2, batch_size_val=2, workers_train=8, workers_val=8, acc_grad=2, accelerator='gpu', devices=-1, fp32=False, disable_benchmark=False, log_step=1, val_step=3200)
Seed set to 0
---load dataset---
train: 41681 val: 2560
Traceback (most recent call last):
File "H:\AI\MIDI\midi-model\train.py", line 335, in <module>
model = TrainMIDIModel(tokenizer, flash=True, lr=opt.lr, weight_decay=opt.weight_decay,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\AI\MIDI\midi-model\train.py", line 101, in __init__
super(TrainMIDIModel, self).__init__(tokenizer=tokenizer, n_layer=n_layer, n_head=n_head, n_embd=n_embd,
File "H:\AI\MIDI\midi-model\midi_model.py", line 26, in __init__
self.net = self.net.to_bettertransformer()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\Miniconda3\envs\midi\Lib\site-packages\transformers\modeling_utils.py", line 4314, in to_bettertransformer
return BetterTransformer.transform(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\Miniconda3\envs\midi\Lib\contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\Miniconda3\envs\midi\Lib\site-packages\optimum\bettertransformer\transformation.py", line 211, in transform
raise ValueError(
ValueError: Transformers now supports natively BetterTransformer optimizations (torch.nn.functional.scaled_dot_product_attention) for the model type llama. Please upgrade to transformers>=4.36 and torch>=2.1.1 to use it. Details: https://huggingface.co/docs/transformers/perf_infer_gpu_one#flashattention-and-memory-efficient-attention-through-pytorchs-scaleddotproductattention
I'm certain that i'm running these versions of both transformers and torch and unsure why model type is showing as llama?
I couldn't find anyone else encountering this and would be grateful for any assistance. thanks. i'm using conda venv and my pip list is below.
Hi! thank you for making this, I've been looking for something exactly like it for a while and I think it will suit me perfectly. I had no problems installing and inferencing with the pretrained model but when i try to train i get a strange error
I'm certain that i'm running these versions of both transformers and torch and unsure why model type is showing as llama? I couldn't find anyone else encountering this and would be grateful for any assistance. thanks. i'm using conda venv and my pip list is below.