After all the attention OpenAI got for making the GPT-3 API semi-publicly-available, I wonder if Google has considered making some of their research models available via API. It would be pretty neat to be able to try these things out, rather than just reading papers about them.
Releasing model weights has been common for a long time, it was OpenAI that regressed and refused to release its GPT models until it released GPT-3 hidden behind a semi-public API. The google BERT models are released pre-trained in full (as mentioned in the article), you can easily play around with them on your own.
BERT isn't a forward LM like GPT, so it's a little less easy to play with for the uninitiated - although there are papers showing text generation with BERT.
It's really ironic that they are regressing and keeping their research behind a curtain when the entire pretense for their existence (and their name) is to open things up.
It’s not like it’s a new across-the-board policy for them. They were just being cautious in this particular case because they were worried about social ramifications. Arguably some other research should have been made less readily available like this (think deepfakes for example).
To be fair, IIRC OpenAI did release GPT-2-large after some community pressure, and it was somewhat doable for some people to actually train from scratch. GPT-3 is too large, so even if they released it, nobody apart from large companies like Google could do anything with it. If anything, they've made GPT-3 more open than it would have been if they just released the weights.
At least that's my understanding. Feel free to correct me if I'm wrong.
I'm not really up in arms about OpenAIs decision, but I just don't want people to frame this as "why can't more companies release models like OpenAI does" when in reality the opposite is pretty much true.
GPT-2 wasn't really feasible for most actors to train from scratch, otherwise it would have been released by a third party. GPT-3 is technically feasible for a single actor to do inference with, although not really really.
I agree with your comment here but I think for the type and size of model, OpenAI has done the best they could with such large models. So I wouldn't say they've "regressed and refused to release its GPT models" they just had to take a different route with GPT models.
I don't know. It has 175 billion parameters, thus, about 500GiB for floating point parameters. If these are bfloat16, it is mere 300GiB. We know CPU is about 50 times slower than GPU for transformer models, hence, we are looking at 4 to 8 minutes per inference (parameter loading on demand from SSD takes 200 seconds or so, and probably the bottleneck here). If the parameters can be loaded into memory (seems you have to be on a >= 8-channel machine with unbuffered RAM or with buffered RAM), it will be probably 1 to 2 minutes per inference.
Still in the realm of doing inference in homelab territory (barely).
Those figures make sense as a rough ballpark -- max FLOPS estimates including impacts from FMA and whatnot roughly correspond to the throughput we would expect for a compute-bound linear algebra problem, and current top of the line consumer grade GPUs are 15-30x better in that metric than equivalent CPUs.
Aside from having to slice and dice things a bit to fit in the accelerator's memory and incurring a higher memory bandwidth cost in doing so, is there any reason a home lab's GPU couldn't be used for GPT-3?
It absolutely can. PCIe 3x16 is at around 16GB/s speed, hence, uploading parameters at full speed would be around 50 seconds. That probably is the bottleneck for this case though. A minor issue is that the NVIDIA consumer cards (or any cards besides the new A100) doesn't support bfloat16, I am uncertain fp16 is sufficient for this model or not.
Edit: It probably is, considering you only need weights to be fp16, while intermediate layers can be fp32 and reuse these memory.
They do only have an API and the (trained) model (parameters) are not released. But I believe the "semi-public" here refers to the fact that access to the API is limited to invitees (with the ability to add your name to a waitlist).
Releasing model weights is more powerful, but far less accessible than releasing an API. You can easily waste an hour trying to get a model from a research paper running, even when everything works smoothly, just having the wrong environment or dependencies. And that’s for people who are already savvy with ML. Releasing a Docker container is a lot closer to making things easily accessible but still not close to an API. If you look at the audience using GPT-3, a lot of it is software engineers who are experienced but don’t have AI-centric experience. In practice, making an API available is making the model available to many more people.
Learn to appreciate papers? This piece of research is far more interesting than openai's work which essentially involves spending more money on bigger compute and more data. The API is actually a massive turn off for me as I like to know how things work. While I understand your wanting to try things out via an API, I don't think that its the way things should be moving forward. Furthermore I think its very important that engineers using ML actually read the papers to understand what is going on otherwise you'll be finding idiots who apply facial recognition models to predict criminals running around in the wild saying that ML is some black magic when all its doing is reflecting social bias.
Typical ML-based paper where everything is about machine learning and nothing is about languages... The biggest issue is nothing is said about how the languages were selected. That’s the basis when dealing with multilingual languages as the features they share or not is important and will impact the results. In this respect the last figure is the more interesting one: it mentions ido and interlingua, two constructed languages. Why does they get included since NLP is supposed to deal with natural languages? It not a bad choice per se, but the selection criteria needs to be explain more than just picking languages to get a large number on a research paper.
There is also no reflection on why some languages got better results than others. Again looking at the last figure in the top three best performing languages with no data two are Sinitic languages (Cantonese and Wu) which likely happens since their closeness to standard Chinese for which there is huge ressources available for training. On the reverse Breton for which there is probably very few apparented language data in the initial models and training set besides Irish get very poor results, which tends to show the model actually don’t transfer very well if at all...
NLP is not my main field but still relevant to my work because I often use models and resources from NLP as tools. I'm also personally interested in Linguistics and Languages so I follow related news, sometimes attend NLP conferences and follow people in those fields on Social Media.
It is very concerning how few thought is usually put into linguistic or language characteristics when dealing with these topics. I also rarely see cultural considerations etc. Basically everything is considered as "machine learning will hopefully get this right if having enough data" which is unfortunate (ML is a great tool but the conferences are about language processing).
Another big issue I noticed is that a majority of research only targets or evaluates English texts. In many cases the language is not even specified (although it is clear they use English from figures or examples). I even heard people complaining that work on non-English data is treated as too minor by many reviewers so stuff like that often just gets rejected.
I think this is a really weird development for a field which centers around natural languages.
Yes, this is exactly my point. NLP is about processing language (which have a century old field dedicated to it) yet the new trend is to totally discard that as a minor details. It's not. It's also fine if people mostly focus on English but then they should be clear about it and not claim to address language in general when they are in fact doing English processing in particular.
While I sort-of recognize the emotion you describe in myself, it cannot be ignored that these ignoramuses are simply blowing "traditional" research out of the water in terms of results. That's true across the board, from NLP to image data to computational biology.
It's also a bit simplified to consider it a bifurcation between "traditional" linguists and AI experts entirely ignorant of the discipline. Long before the current wave of AI started, Google liked to hire linguists and computational scientists. These teams probably do have plenty of subject matter experts, but for now they are reaping the low-hanging fruits of the suddenly-improved generic methods. As the marginal improvements are inevitably diminished, subject matter will become more salient again.
I'm a computational biologist by training, and have great appreciation for the often beautiful algorithms, many created in the 70s or 80s and allowing then-spectacular feats of tackling large datasets. Unfortunately, it isn't always obvious how to transfer that knowledge to the new way of doing things.
Yes, the seeming performance of (especially) neural models compared to traditional models is probably the main factor. Although, some voices[1] argue that traditional or much simpler approaches still often do a similar job compared to super over-engineered models, especially when going even slightly beyond an existing target-dataset or task.
I'd argue, that improving the ML models is really the job of ML researchers and should be mainly targeting ML conferences like AAAI (Adv. of AI). In other conferences (directly targeting NLP, CV, Comp. Biology, etc.) it should be the main job to combine those models with the domain-specific characteristics (e.g., language information for NLP) or "traditional" methods to make it an interesting discussion.
I was recently doing reviewing for a multimedia conference and quite a lot of the papers I reviewed were basically pure ML papers. A colleague had the same experience.
The ML papers wouldn't bother me if they included specialists of the targeted domain to address the obvious pitfall. I've analyzed the figures in the blog post and skimmed the paper and both one novelty claim ((2) A single massively multilingual model spanning 109 languages and showing cross-lingual transfer even to zeroshot cases.) and an "explanation" (Such positive language transfer across languages is only possible due to the massively multilingual nature of LaBSE) can be debunked just by looking carefully at the figures like I did in the past hour. The languages on which they test the things are also poorly selected (6 constructed languages, one duplicate and one macro-lang) which shows clear lack of attention to details and poor understanding of some basic linguistics notions. But hey it's an ML paper, it's from Google and it has BERT in the title so get attention and will be cited even if it's half-crap.
I think it's pretty obvious how the languages were selected: they used all languages where data was readily available. And I think that's a pretty good choice, since there's no reason to arbitrarily exclude languages when the goal is to test generalisation across languages. (Okay, limited computing resources would be a reason, but Google can afford it.)
I agree that there should be some discussion on why transfer to certain languages is easier than to others (and maybe that's actually in the paper, I've only read the blog post so far). Language relatedness is one obvious explanation, but another possibility is contamination of the training data. It's rare to find Cantonese on the internet marked with lang="yue", much more often it's simply labeled as Chinese, i.e. lang="zh". That makes it hard to collect "pure" Standard Mandarin data that doesn't include other varieties.
> And I think that's a pretty good choice, since there's no reason to arbitrarily exclude languages
There is a reason, which is akin to why balanced corpus are used for capturing various aspects of a language: language features are unevenly distributed between languages but quite consistent within a family.
Let's take the example of word order [1]. The SVO order is very common on the raw number of languages, but actually represented by a small number of families (4 times less families than SOV for about the same number of languages). Which mean if the so-called "agnostic" model is trained mainly on languages of the same family (spoiler: it is), the raw number of languages used can be high, yet the difference between them is minor so the task is made easier.
In ML term the model is kind of overfitting the feature from the language that are the most represented, yet the result can pass as good when tested on languages similar to those used for learning. This is clearly what could be happening here, from the previous example I gave. Also Catalan: 75% accuracy for a language that is linguitically very close to French and Spanish (themselves close together) which are the top 5th and 9th language in number of data in the training set. The first two best non constructed languages are the closest to the 4th language in the training set...
Besides, I don't think anyone really on lang tag as it often missing or simply wrong. Besides, taking Cantonese from Standard Chinese is a very easy task as their is a few words that appears very frequently in Cantonese and never in SM (係, 嘅, 冇 for instance).
"We adapt multilingual BERT to produce language-agnostic sentence embeddings for 109 languages. %The state-of-the-art for numerous monolingual and multilingual NLP tasks is masked language model (MLM) pretraining followed by task specific fine-tuning. While English sentence embeddings have been obtained by fine-tuning a pretrained BERT model, such models have not been applied to multilingual sentence embeddings. Our model combines masked language model (MLM) and translation language model (TLM) pretraining with a translation ranking task using bi-directional dual encoders. The resulting multilingual sentence embeddings improve average bi-text retrieval accuracy over 112 languages to 83.7%, well above the 65.5% achieved by the prior state-of-the-art on Tatoeba. Our sentence embeddings also establish new state-of-the-art results on BUCC and UN bi-text retrieval."
35 comments
[ 4.7 ms ] story [ 65.7 ms ] threadReleasing model weights has been common for a long time, it was OpenAI that regressed and refused to release its GPT models until it released GPT-3 hidden behind a semi-public API. The google BERT models are released pre-trained in full (as mentioned in the article), you can easily play around with them on your own.
BERT isn't a forward LM like GPT, so it's a little less easy to play with for the uninitiated - although there are papers showing text generation with BERT.
At least that's my understanding. Feel free to correct me if I'm wrong.
GPT-2 wasn't really feasible for most actors to train from scratch, otherwise it would have been released by a third party. GPT-3 is technically feasible for a single actor to do inference with, although not really really.
Still in the realm of doing inference in homelab territory (barely).
Where's this heuristic from? Seems handy if true.
Edit: It probably is, considering you only need weights to be fp16, while intermediate layers can be fp32 and reuse these memory.
There is also no reflection on why some languages got better results than others. Again looking at the last figure in the top three best performing languages with no data two are Sinitic languages (Cantonese and Wu) which likely happens since their closeness to standard Chinese for which there is huge ressources available for training. On the reverse Breton for which there is probably very few apparented language data in the initial models and training set besides Irish get very poor results, which tends to show the model actually don’t transfer very well if at all...
https://1.bp.blogspot.com/-eqH1ZsnTP2o/XzwlDjy3X5I/AAAAAAAAG...
It is very concerning how few thought is usually put into linguistic or language characteristics when dealing with these topics. I also rarely see cultural considerations etc. Basically everything is considered as "machine learning will hopefully get this right if having enough data" which is unfortunate (ML is a great tool but the conferences are about language processing).
Another big issue I noticed is that a majority of research only targets or evaluates English texts. In many cases the language is not even specified (although it is clear they use English from figures or examples). I even heard people complaining that work on non-English data is treated as too minor by many reviewers so stuff like that often just gets rejected.
I think this is a really weird development for a field which centers around natural languages.
It's also a bit simplified to consider it a bifurcation between "traditional" linguists and AI experts entirely ignorant of the discipline. Long before the current wave of AI started, Google liked to hire linguists and computational scientists. These teams probably do have plenty of subject matter experts, but for now they are reaping the low-hanging fruits of the suddenly-improved generic methods. As the marginal improvements are inevitably diminished, subject matter will become more salient again.
I'm a computational biologist by training, and have great appreciation for the often beautiful algorithms, many created in the 70s or 80s and allowing then-spectacular feats of tackling large datasets. Unfortunately, it isn't always obvious how to transfer that knowledge to the new way of doing things.
I'd argue, that improving the ML models is really the job of ML researchers and should be mainly targeting ML conferences like AAAI (Adv. of AI). In other conferences (directly targeting NLP, CV, Comp. Biology, etc.) it should be the main job to combine those models with the domain-specific characteristics (e.g., language information for NLP) or "traditional" methods to make it an interesting discussion.
I was recently doing reviewing for a multimedia conference and quite a lot of the papers I reviewed were basically pure ML papers. A colleague had the same experience.
1: https://arxiv.org/abs/1907.06902
I agree that there should be some discussion on why transfer to certain languages is easier than to others (and maybe that's actually in the paper, I've only read the blog post so far). Language relatedness is one obvious explanation, but another possibility is contamination of the training data. It's rare to find Cantonese on the internet marked with lang="yue", much more often it's simply labeled as Chinese, i.e. lang="zh". That makes it hard to collect "pure" Standard Mandarin data that doesn't include other varieties.
There is a reason, which is akin to why balanced corpus are used for capturing various aspects of a language: language features are unevenly distributed between languages but quite consistent within a family.
Let's take the example of word order [1]. The SVO order is very common on the raw number of languages, but actually represented by a small number of families (4 times less families than SOV for about the same number of languages). Which mean if the so-called "agnostic" model is trained mainly on languages of the same family (spoiler: it is), the raw number of languages used can be high, yet the difference between them is minor so the task is made easier.
In ML term the model is kind of overfitting the feature from the language that are the most represented, yet the result can pass as good when tested on languages similar to those used for learning. This is clearly what could be happening here, from the previous example I gave. Also Catalan: 75% accuracy for a language that is linguitically very close to French and Spanish (themselves close together) which are the top 5th and 9th language in number of data in the training set. The first two best non constructed languages are the closest to the 4th language in the training set...
Besides, I don't think anyone really on lang tag as it often missing or simply wrong. Besides, taking Cantonese from Standard Chinese is a very easy task as their is a few words that appears very frequently in Cantonese and never in SM (係, 嘅, 冇 for instance).
[1] https://en.wikipedia.org/wiki/Word_order#Distribution_of_wor...
"We adapt multilingual BERT to produce language-agnostic sentence embeddings for 109 languages. %The state-of-the-art for numerous monolingual and multilingual NLP tasks is masked language model (MLM) pretraining followed by task specific fine-tuning. While English sentence embeddings have been obtained by fine-tuning a pretrained BERT model, such models have not been applied to multilingual sentence embeddings. Our model combines masked language model (MLM) and translation language model (TLM) pretraining with a translation ranking task using bi-directional dual encoders. The resulting multilingual sentence embeddings improve average bi-text retrieval accuracy over 112 languages to 83.7%, well above the 65.5% achieved by the prior state-of-the-art on Tatoeba. Our sentence embeddings also establish new state-of-the-art results on BUCC and UN bi-text retrieval."
(Found via https://tfhub.dev/google/LaBSE/1)