Comments (4)
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.
I want to train a language model from scratch,just like chinese.
from spago.
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.
Thank you very much. I will take more try.
from spago.
Related Issues (20)
- Multi-label BERT classifier from PyTorch HOT 3
- bart-large-mnli multi_class does not agree with Python version HOT 7
- Suitable for categorising intents and slots? HOT 2
- Differences in the output of zero shot classification between python & spago for the same model HOT 1
- Nearly 4 times the memory usage when compared to python for the same model HOT 3
- Gorgonia tensors
- QA Chinese model result does not match python version HOT 2
- v1.0.0-alpha.0: operator gradients are sometimes null in non-obvious ways
- The `deepset` dir must created by manually HOT 4
- flair models no longer work HOT 2
- How to train a lstm network with spago? HOT 1
- how to convert hf models to spago format? HOT 2
- Comparing python and go gives different embeddings HOT 4
- I fucked up HOT 1
- is:issue is:open Issue with bert compiling Q6A example HOT 2
- Moved methods HOT 2
- Detailed Instructions? HOT 2
- Loading converting PyTorch/ Lightning models HOT 1
- Question server example should use http not https
- Help with German zero shot HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spago.