GithubHelp home page GithubHelp logo

alexanderbluhm / dasordass Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12 KB

AI NLP model to correct one of the most common error in German sentences: "das" vs. "dass".

Home Page: https://dasoderdass.de

License: MIT License

Python 100.00%
ai deep-learning nlp python pytorch

dasordass's Introduction

dasordass

AI NLP model to correct the usage of one of the most common errors in German sentences: "das" vs "dass".
The model architecture consists of a BERT model, pretrained exclusively on German language (HugginfaceModel), and a simple classifier layer on top. Docker image generated using cog and deployed to fly.io for inference (CPU, 2GB RAM).
Achieving 99.9% accuracy on the validation set.

Training

Trained for 10min on an RTX 2070 Super on 20k sentences from the alexanderbluhm/wiki_sentences_de_2k dataset. The dataset consists of sentences containing "das" or "dass" from the first 2,000 de wikipedia documents, split with spaCy.

Hyperparameters:

  • Steps: 1,500 (24,000 sentences, 2 epochs, 32 batch size)
  • Loss Function: Mean Squared Error
  • Optimizer: AdamW (default settings)
  • Learning Rate: 3e-5 with linear learning rate schedule
  • Warmup Steps: 100

Deployment

Adapted from: https://til.simonwillison.net/fly/fly-docker-registry

  • Create an empty fly.io application using flyctl launch
  • Build image using cog and tag it like registry.fly.io/your-app-name:unique-image-tag: cog build -t registry.fly.io/your-app-name:unique-tag-for-your-image
  • Run: flyctl auth docker
  • Push to the registry: docker push registry.fly.io/your-app-name:unique-image-tag
  • Deploy: flyctl deploy --image registry.fly.io/your-app-name:unique-image-tag
  • Adjust RAM amount in case of a memory error (2GB required for this model)

dasordass's People

Contributors

alexanderbluhm 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.