Giter Site home page Giter Site logo

bert train about spago HOT 4 CLOSED

nlpodyssey avatar nlpodyssey commented on May 12, 2024
bert train

from spago.

Comments (4)

matteo-grella avatar matteo-grella commented on May 12, 2024

Hey @HaoRan98, don't worry I am here to help :)

When you talk about training your own BERT model, what are you referring to? Do you want to train a language model from scratch or do you want to fine-tune a pre-trained BERT model on a particular task?

from spago.

HaoRan98 avatar HaoRan98 commented on May 12, 2024

I want to train a language model from scratch,just like chinese.

from spago.

matteo-grella avatar matteo-grella commented on May 12, 2024

Quick answer
Unfortunately, spaGO does not support BERT's language model training at the moment.

Long answer
I wrote the code for training a BERT language model in spaGO. You can find it here, and I'll write a tutorial with an example soon.

However, that could only be used for educational purposes, to understand how such a language model works, but not to train one seriously.

I have to tell you that creating a language model from scratch is so expensive that you wouldn't be able to use the CPU only. This is the main reason why spaGO is not ready for that yet. This is one of those cases where we need, at least for the moment, to leave GO and move to another framework that natively supports optimized GPU-based computing.

Take a look at this beautiful tutorial (for Python):
How to train a new language model from scratch using Transformers and Tokenizers

If you use the HugginFace Transformers library, you can go back to spaGO to perform inference or fine-tuning on downstream tasks once you've finished training your model.

You can find some more details about this use case on the Wiki at this page.

Have I been helpful to you?

from spago.

HaoRan98 avatar HaoRan98 commented on May 12, 2024

Thank you very much. I will take more try.

from spago.

Related Issues (20)

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.