Run this model with HF Jobs

Run Tochka-AI/ruRoPEBert-e5-base-2k on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Tochka-AI/ruRoPEBert-e5-base-2k. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Tochka-AI/ruRoPEBert-e5-base-2k on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

How to export to ONNX ?

#1
by dimstream - opened

I convert with this command:
optimum-cli export onnx --model Tochka-AI/ruRoPEBert-e5-base-2k --optimize O1 --task sentence-similarity ruRoPEBert-e5-base-2k-onnx/

But I get the following error:
.env/lib/python3.11/site-packages/torch/nn/functional.py", line 2237, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: index out of range in self

Hello!

It seems that the problem is related to dummy input generator in Optimum. It doesn't take into account type_vocab_size parameter in model config, instead it always use a fixed value of 2. I will create an issue in Optimum for it.

For you, I guess the easiest option now is to manually convert the model to ONNX using this guide and this page, or, alternatively, write a custom DummyInputGenerator, but this one may be tricky.

still same problem

Sign up or log in to comment