git - fatal: unable to access . . . . . : gnutls_handshake () failed . . . Doesn't work so great on a full desktop system, where upgrading curl from a newer version leads to uninstalling lots of dependent packages and breaking others Also, if the trick does work for you, remove the edit to the apt sources ASAP after installing the new curl version, and DO NOT DO an apt-get upgrade or equivalent before!
Save only best weights with huggingface transformers However, I found that Trainer class of huggingface-transformers saves all the checkpoints that I set, where I can set the maximum number of checkpoints to save However, I want to save only the weight (or other stuff like optimizers) with best performance on validation dataset, and current Trainer class doesn't seem to provide such thing
How to load transformers pipeline from folder? - Stack Overflow According to here pipeline provides an interface to save a pretrained pipeline locally with a save_pretrained method When I use it, I see a folder created with a bunch of json and bin files presum
Suppress HuggingFace logging warning: Setting `pad_token_id` to `eos . . . The warning comes for any text generation task done by HuggingFace This is explained here, and you can see the code here Avoid that warning by manually setting the pad_token_id (e g , to match the tokenizer or the eos_token_id) Set the pad_token_id in the generation_config with: model generation_config pad_token_id = tokenizer pad_token_id Alternatively, if you only need to make a single
CUDA runtime error (59) : device-side assert triggered I got this error when I was using the Huggingface Transformer model LongformerEncoderDecoder (LED), and setting the decoder length too large In my case the default maximum length for the decoder was 1024