Support embeddings with different sizes and improve evaluation script#14
Open
andreasvc wants to merge 4 commits into
Open
Support embeddings with different sizes and improve evaluation script#14andreasvc wants to merge 4 commits into
andreasvc wants to merge 4 commits into
Conversation
- The attention() class had a hard-coded dimension of 2048 for the input, which works for Deberta, but not other models such as mmbert; the input dimension is now specified with a parameter. - Set the encoder model to training mode after loading https://huggingface.co/docs/transformers/model_doc/auto#transformers.AutoModelForPreTraining.from_pretrained - mmbert stores token embeddings in "self.encoder.tok_embeddings" instead of "self.encoder.word_embeddings"; both are now supported
- Suppress warnings about multiprocessing for data loaders; loading the data is not a bottleneck so the warnings are unnecessary - Depending on the GPU, you may get warnings about setting matmul_precision. Added code to set matmul precision to medium, which seems like a good trade-off (but your mileage may vary on different hardware) - Disable evaluation on the test set during training. Apparently, the code has bugs and is not expected to work. Therefore it is now disabled, to avoid giving the impression that there is an actual issue with training the model. Evaluation is supposed to be performed with the evaluate.py script.
- store the .conll output of the model, useful if you want to run other
evaluation scripts on the output.
- write output to a separate directory and use filenames of the form
'{subset}_{modality}', e.g. 'test_output' and 'test_gold' to clearly
indicate the type of file.
The output is written to a directory based on the dataset:
'experiments/xcore/myexperiment/wandb/run-2026{...}/files/{dataset}'
A model can therefore be evaluated on multiple datatsets.
- pretty-print evaluation results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.