我已经将huggingface预训练模型转换为onnx:
python3 -m transformers.onnx --model=sentence-transformers/all-MiniLM-L6-v2 onnx/
将其导入BigQuery:
CREATE OR REPLACE MODEL ml.make_embeddings
OPTIONS(
MODEL_TYPE='ONNX',
MODEL_PATH="gs://my-bucket/all-MiniLM-L6-v2.onnx"
)
现在我怎么知道输入应该是什么样的呢?
这会抛出错误:
SELECT * FROM
ML.PREDICT(MODEL ml.all_minilm_l6_v2,(
SELECT 1 AS input_ids, 0 AS token_type_ids, 1 AS attention_mask, ['hello world'] AS sentences))
An internal error occurred and the request could not be completed. This is usually caused by a transient issue.
1条答案
按热度按时间umuewwlo1#
您上面遇到的内部错误是一个已知的问题,我们正在推出修复程序。2您可以在大约2周内看到修复程序。
现在我怎么知道输入应该是什么样的呢?
请查看https://cloud.google.com/bigquery/docs/getting-model-metadata#get_model_metadata了解如何获取模型模式。