urchade / GLiNER

Generalist and Lightweight Model for Named Entity Recognition (Extract any entity types from texts) @ NAACL 2024
https://arxiv.org/abs/2311.08526
Apache License 2.0
1.47k stars 126 forks source link

Error: Giliner Training data #152

Open ravi0027 opened 4 months ago

ravi0027 commented 4 months ago

I am facing the error in the Training data arguments in the dataset in this line { training_args = TrainingArguments( output_dir="models", learning_rate=5e-6, weight_decay=0.01, others_lr=1e-5, others_weight_decay=0.01, lr_scheduler_type="linear", #cosine warmup_ratio=0.1, per_device_train_batch_size=8, per_device_eval_batch_size=8, num_train_epochs=3, evaluation_strategy="epoch", save_steps = 1000, save_total_limit=10, dataloader_num_workers = 8, use_cpu = True, report_to="none", )

trainer = Trainer( model=model, args=training_args, train_dataset=train_dataset, eval_dataset=test_dataset, tokenizer=model.data_processor.transformer_tokenizer, data_collator=data_collator, ) trainer.train() }

Iam getting an error: BackendCompilerFailed: backend='inductor' raised:

CppCompileError: C++ compile error Output:

/tmp/torchinductor_ubuntu/tw/ctwif4gnjxuyqq47csmx5l4wpoyqgb6kbcqb556l2sakhglmvmzd.cpp: In function ‘void kernel(float, const long int, const float, const float, float*, long int, long int)’:

/tmp/torchinductor_ubuntu/tw/ctwif4gnjxuyqq47csmx5l4wpoyqgb6kbcqb556l2sakhglmvmzd.cpp:32:46: error: no match for ‘operator==’ (operand types are ‘at::vec::CPU_CAPABILITY::VectorizedN<long int, 2>’ and ‘int’)

32 | auto tmp5 = tmp4 == 0;

  |                                         ~~~~ ^~ ~

  |                                         |       |

  |                                         |       int

  |                                         at::vec::CPU_CAPABILITY::VectorizedN<long int, 2>
urchade commented 4 months ago

Hi, can retry without compiling the model ?

ravi0027 commented 4 months ago

I have tried but the same result