Git Product home page Git Product logo

swebert's Introduction

Swedish BERT models

Arbetsförmedlingen (The Swedish Public Employment Service) has developed Swedish BERT models which were trained on Swedish Wikipedia with approximately 2 million articles and 300 million words.

Available Model Types

  • bert-base-swedish-uncased: 12-layer, 768-hidden, 12-heads, 110M parameters

  • bert-large-swedish-uncased: 24-layer, 1024-hidden, 16-heads, 340M parameters

Usage

The models can be used as part of the transformers package like any other built-in or community-uploaded model.

This means that both tokenizer and model can be instantiated using the from_pretrained() method of the BERT-related transformers classes like so:

pretrained_model_name = 'af-ai-center/bert-base-swedish-uncased'

tokenizer = BertTokenizer.from_pretrained(pretrained_model_name)

# PyTorch
model = BertModel.from_pretrained(pretrained_model_name)

# TensorFlow
model = TFBertModel.from_pretrained(pretrained_model_name)

Getting Started

The notebook getting_started_with_swebert.ipynb shows some more details on how to use the models.

Make sure to run it in a virtual environment with the following packages installed:

pip install torch tensorflow transformers tokenizers notebook

Remarks

Contact

[email protected]

swebert's People

Stargazers

Mohamad Jaallouk avatar  avatar Paulius Danėnas avatar Nizo Priskorn avatar Lars avatar Daniel Quernheim avatar Magnus Vilhelm Persson avatar Lukas avatar Wolmar Nyberg Åkerström avatar  avatar Mosleh Mahamud avatar Per von Rosen avatar Simon Lundell avatar Oliver Åstrand avatar  avatar Gustav Handmark avatar Robert Rhys Thomas avatar Gerardo Lisboa avatar Ali Mosavian avatar Bengt Ericsson avatar Lars Sjösund avatar Cenny avatar Fredrik Olsson avatar Åke avatar Erik Stackelberg avatar

Watchers

 avatar  avatar  avatar  avatar  avatar Natallia Lundqvist 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.