Freezing the transformer component for use with NER #11522
Unanswered
iashaheen
asked this question in
Help: Coding & Implementations
Replies: 1 comment 1 reply
-
|
Hello, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to do a simple thing: freeze the transformer component for a set number of epochs to train the NER component only then resume training with both of them. I tried the following but it didn't work:
frozen_componentsunder[training]configs but I received a value error. The way I understand it is that frozen components do not work during the training process so the NER component is not getting any embeddings.grad_factor = 0.0under[model.tok2vec]for the transformer listener config for a few epochs (first training run), then resumed the training by setting thesourceunder the NER component config to be loaded from the best model (second training run). I kept the transformer config as is to be initialized. In the first training run the transformer loss was 0 the entire time, which is expected as thegrad_factoris set to 0 and the model is not updated. In the second training run the transformer loss should change as the model is now updated but it did not and it remained 0. I also modified the value ofgrad_factorfrom the config file in thebest _modeldirectory before the second training run to be 1 but with no luck.Any idea how can I freeze the transformer model initially then resume the training process to fine tune it?
Beta Was this translation helpful? Give feedback.
All reactions