github huggingface/transformers v4.10.0
v4.10.0: LayoutLM-v2, LayoutXLM, BEiT

latest releases: v4.45.1, v4.45.0, v4.44.2...
3 years ago

v4.10.0: LayoutLM-v2, LayoutXLM, BEiT

LayoutLM-v2 and LayoutXLM

Four new models are released as part of the LatourLM-v2 implementation: LayoutLMv2ForSequenceClassification, LayoutLMv2Model, LayoutLMv2ForTokenClassification and LayoutLMv2ForQuestionAnswering, in PyTorch.

The LayoutLMV2 model was proposed in LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding by Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou. LayoutLMV2 improves LayoutLM to obtain state-of-the-art results across several document image understanding benchmarks:

Compatible checkpoints can be found on the Hub: https://huggingface.co/models?filter=layoutlmv2

BEiT

Three new models are released as part of the BEiT implementation: BeitModel, BeitForMaskedImageModeling, and BeitForImageClassification, in PyTorch.

The BEiT model was proposed in BEiT: BERT Pre-Training of Image Transformers by Hangbo Bao, Li Dong and Furu Wei. Inspired by BERT, BEiT is the first paper that makes self-supervised pre-training of Vision Transformers (ViTs) outperform supervised pre-training. Rather than pre-training the model to predict the class of an image (as done in the original ViT paper), BEiT models are pre-trained to predict visual tokens from the codebook of OpenAI’s DALL-E model given masked patches.

Compatible checkpoints can be found on the Hub: https://huggingface.co/models?filter=beit

Speech improvements

The Wav2Vec2 and HuBERT models now have a sequence classification head available.

DeBERTa in TensorFlow (@kamalkraj)

The DeBERTa and DeBERTa-v2 models have been converted from PyTorch to TensorFlow.

Flax model additions

EncoderDecoder, DistilBERT, and ALBERT, now have support in Flax!

TensorFlow examples

A new example has been added in TensorFlow: multiple choice!
Data collators have become framework agnostic and can now work for both TensorFlow and NumPy on top of PyTorch.

Auto API refactor

The Auto APIs have been disentangled from all the other mode modules of the Transformers library, so you can now safely import the Auto classes without importing all the models (and maybe getting errors if your setup is not compatible with one specific model). The actual model classes are only imported when needed.

  • Disentangle auto modules from other modeling files #13023 (@sgugger)
  • Fix AutoTokenizer when no fast tokenizer is available #13336 (@sgugger)

Slight breaking change

When loading some kinds of corrupted state dictionaries of models, the PreTrainedModel.from_pretrained method was sometimes silently ignoring weights. This has now become a real error.

General improvements and bugfixes

Don't miss a new transformers release

NewReleases is sending notifications on new releases.