Hugging Face Transformers

Hugging Face transformers is a platform that provides the community with APIs to access and use state-of-the-art pre-trained models available from the Hugging Face hub. Aug 8, 2022

Hugging Face has integrated the Decision Transformer, an offline reinforcement learning method, into the Hugging Face transformers library and the Hugging Face hub. Hugging Face plans to improve accessibility in the field of deep RL and looks forward to sharing them with users over the coming weeks.

In particular, we present Decision Transformer, an architecture that casts the problem of RL as conditional sequence modeling. Unlike prior approaches to RL that fit value functions or compute policy gradients, Decision Transformer simply outputs the optimal actions by leveraging a causally masked Transformer.

The deep learning model takes input from video games API, and extract meaningful features automatically. DRL agents produces actions based on these features, and make the environments transfer to next state. Generally speaking, training an agent to make decisions with high-dimensional inputs is difficult.

The transformer uses an encoder-decoder architecture. The encoder extracts features from an input sentence, and the decoder uses the features to produce an output sentence (translation). The encoder in the transformer consists of multiple encoder blocks.

The encoder, on the left-hand side, is tasked with mapping an input sequence to a sequence of continuous representations; the decoder, on the right-hand side, receives the output of the encoder together with the decoder output at the previous time step to generate an output sequence .Oct 10, 2022 ML Mastery

The decoder's job is to generate text sequences. The decoder has a similar sub-layer as the encoder. it has two multi-headed attention layers, a pointwise feed-forward layer, and residual connections, and layer normalization after each sub-layer.

This is the simplified overall structure of one layer of Transformer model, and you stack this layer N times. In one layer of Transformer, there are three multi-head attention, which are displayed as boxes in orange. These are the very parts which compare the token on several standards.

Hugging Face Transformers


Post a Comment

0 Comments