Coder Social home page Coder Social logo

transformer-due-eng's Introduction

Transformer Attention Model for English to German Translation

This repository contains the implementation of a Transformer model for translating English (eng) to German (deu) using attention.

This project is the implementation of paper : Attention is all you need

The model architecture includes components such as cross-attention, decoder, encoder, feedforward, self-attention, and transformer. The project model is saved at models/ and includes visualizations for accuracy, loss, and learning rate at directory assets/images. You can also find the images of architecture for cross-attention, decoder, encoder, feedforward, self-attention, and transformer within directory assets/model architecture.

Installation

Clone the repository:

git clone https://github.com/yourusername/transformer-deu-to-eng.git
cd transformer-deu-to-eng

Model Architecture

The transformer model consists of the following components:

  • Encoder: Processes the input sequence.
  • Decoder: Generates the output sequence.
  • Self-Attention: Allows the model to focus on different parts of the input sequence.
  • Cross-Attention: Allows the decoder to focus on relevant parts of the input sequence.
  • Feedforward: Adds non-linearity and complexity to the model.
  • Transformer: transformer itself.

Pickle files

  • text_pairs.pickle: For pairing text among deu and eng.
  • vectorize.pickle: Vectorizing each sentence.
  • posenc-2048-512.pickle: Position encoding for the sentence.

Learning Rate

Position Encoding

PE Curves

Subplots

Loss and Accuracy

Acknowledgements

  • The implementation is based on the paper "Attention Is All You Need" by Vaswani et al. Attention is all you need
  • Thanks to the contributors of open-source libraries such as TensorFlow.

transformer-due-eng's People

Contributors

kanish-h-h avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.