Open zedavid opened 8 months ago
The model saved as huggingface format is not intended as instant inference but further finetuing and the state_dict is the recommended save mode. If you want to run the model on pipeline, there is a model have been released at: https://huggingface.co/yangheng/deberta-v3-base-absa-v1.1
I see. What is required to make that model available to be run with huggingface pipeline? Also, is there a checkpoint for the huggingface model? I would like to replicate the results I get with the pipeline with PyABSA.
I am sorry for that, it is tricky to train models compatible with huggingface pipeline, and I have cleaned the original materials such as codes so I am afraid that I cannot provide detailed help for that.
Version PyABSA = 2.3.4rc0 Torch = 2.1.1 Transformers = 4.35.2
Describe the bug I've fine-tuned a model with config FAST_LSA_S_V2 using the same dataset using the APCTrainer. In one of the runs I saved it as a state_dict file and in the other a saved as PLM. I've then used the model on sample data using the APC.SentimentClassifier and the HF text-classification pipelines, but I get different results despite the model being trained the same way with the same data.
Code To Reproduce
Loading and testing the state_dict version:
output:
With the HF text-classification pipeline
Output:
Expected behavior I would expect there would be some correspondence between the output probability in both versions of the model.
Thanks!