Create nlp pipeline utilizing custom ONNX Transformer plus NER pipe #13604
Unanswered
ricardoguedes0
asked this question in
Help: Coding & Implementations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I have a fine-tuned transformer model for NER that will be going to production. As such, i need to reduce the model size and quantize it. For that, my go to is to utilize the ONNX format. The original model had a transformer, tagger and a ner in the pipeline. Not needing the tagger i removed it. Then, I extracted the transformer and convert it into the ONNX format successfully.
Right now my only problem is how to combine this new ONNX transformer model with the previous NER.
As of now i was able to create a Transformer component, inserted it in the pipeline and manage to run the code with the transformer embeddings being appended to the doc._.trf. I assuming that is enough for the NER TransformerListener to work however i still have no results. Here is my code so far.
But with a simple example that should work. It fails to detect the Location "Portugal".
Example:
My environment
spaCy version: 3.5.0
Platform: macOS-14.1.2-arm64-arm-64bit
Python version: 3.10.10
Beta Was this translation helpful? Give feedback.
All reactions