Update max 512 pos embeddings
Browse filesModel can only handle 512 pos embeddings.
time error
/usr/local/lib/python3.10/site-packages/infinity_emb/engine.py", line 64, in from_args
engine = cls(**engine_args.to_dict(), _show_deprecation_warning=False)
File "/usr/local/lib/python3.10/site-packages/infinity_emb/engine.py", line 50, in __init__
self._model, self._min_inference_t, self._max_inference_t = select_model(
File "/usr/local/lib/python3.10/site-packages/infinity_emb/inference/select_model.py", line 79, in select_model
loaded_engine.warmup(batch_size=engine_args.batch_size, n_tokens=512)
File "/usr/local/lib/python3.10/site-packages/infinity_emb/transformer/abstract.py", line 105, in warmup
return run_warmup(self, inp)
File "/usr/local/lib/python3.10/site-packages/infinity_emb/transformer/abstract.py", line 113, in run_warmup
embed = model.encode_core(feat)
File "/usr/local/lib/python3.10/site-packages/infinity_emb/transformer/crossencoder/optimum.py", line 72, in encode_core
outputs = self.model(**features, return_dict=True)
File "/usr/local/lib/python3.10/site-packages/optimum/modeling_base.py", line 92, in __call__
return self.forward(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/optimum/onnxruntime/modeling_ort.py", line 1389, in forward
outputs = self.model.run(None, onnx_inputs)
File "/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 220, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running Gather node. Name:'/roberta/embeddings/position_embeddings/Gather' Status Message: indices element out of data bounds, idx=514 must be within the inclusive range [-514,513]
- config.json +1 -1
@@ -19,7 +19,7 @@
|
|
19 |
"LABEL_0": 0
|
20 |
},
|
21 |
"layer_norm_eps": 1e-05,
|
22 |
-
"max_position_embeddings":
|
23 |
"model_type": "xlm-roberta",
|
24 |
"num_attention_heads": 12,
|
25 |
"num_hidden_layers": 12,
|
|
|
19 |
"LABEL_0": 0
|
20 |
},
|
21 |
"layer_norm_eps": 1e-05,
|
22 |
+
"max_position_embeddings": 512,
|
23 |
"model_type": "xlm-roberta",
|
24 |
"num_attention_heads": 12,
|
25 |
"num_hidden_layers": 12,
|