790 requests/$

Image for post
Image for post
Photo by Dan-Cristian Pădureț on Unsplash

Come join Maxpool — A Data Science community to discuss real ML problems!

Do you know how much GPT3 API will it cost?

A rough calculation tells me it can go a maximum of 790 requests/$.

GPT3 is pretty huge(175B parameters = 700GB) and you know how costly GPU inferences can be. Even if we find a use case for it, we still need to justify the ROI. There are many blogs on the potential applications but I haven’t found anything on its pricing.

Let’s try to guess it with the fundamentals of cloud pricing.

Note: You can use this methodology for calculating the API cost for any model. People also like to use AWS TCO(Total cost of ownership) calculator but I enjoy doing it manually. …


Model selection, FAQ engine and a brand new newsletter!

Hope you are not getting bored in this lockdown :P

Ever since I read What we do is who we are, I have been wondering how to create more value. Hence, I have started working on some mini-projects.

1. NLP Model Selection

Image for post
Image for post
http://models.pratik.ai

If you like it, do upvote it on madewithml so that it can reach more people.

2. Data Science FAQ

I made a FAQ engine to automate answering queries of aspiring and mid-level data scientists. From now on I will be sending this to anyone who needs help with finding good resources. Try it out and see for yourself. …


A framework for more effective writing

Image for post
Image for post
Photo by Andraz Lazic on Unsplash

This was originally published on pakodas.substack.com

I am a data scientist. I like writing. But I truly didn’t know what good writing is until recently.

Only when people started giving me feedback, I realized what is writing.

It is like they say in startups…

You will know when you have hit product-market fit 🚀

Ground rules

What is good writing? We need to have a numerical metric.

Writing is considered good …

If it gets more reads (not views)

or

adds less known information to global content.

It is by definition that impactful writing gets more reads!

Although if you write something which can be used only by a few people, then it might not receive many views but is still good writing. I will touch this in more detail later. …


The new tricks

Image for post
Image for post
Photo by David Boca on Unsplash

This is a follow up to my inception post Transfer Learning In NLP. In case you are just getting started in NLP, have a look at it first.

A lot has happened after Oct 2018 — when BERT was released.

Do you know BERT’s masked language modelling is old school?

Do you know attention doesn’t need to be quadratic in time?

Do you know you can steal Google’s model?

Some of the smartest people of our generation have been working intensely and churning out a lot! NLP is probably the sexiest field to be in right now 😋

NLProc has come a long way. …


Learn to write robust APIs

Image for post
Image for post
Me at Spiti Valley in Himachal Pradesh

→ ML in production series

Come join Maxpool — A Data Science community to discuss real ML problems!

My love for understanding production engineering and system design has been growing steadily.

Earlier I have written on the steps required to put a model to production but I haven't touched details of making an ML server.

Let's assume that you have finalised your supervised/unsupervised approach and now you have to build API for inference.

In this article, I will cover the basics of ML model serving and how to do a CPU/GPU deployment.

CPU deployment 🚀

Now we will look at how to write APIs for doing a CPU deployment as they are very common in practise when the load is not high. …


💯 transfer learning

Image for post
Image for post
Photo by Patrick Schneider on Unsplash

Come join Maxpool — A Data Science community to discuss real ML problems!

We started with open source ‘code’ contribution. Now we are at a phase where we do open source ‘model’ contribution.

But how to make new language models?

Image for post
Image for post

Scenario 1: Model from scratch

Recently, Huggingface released a blog on how to make a language model from scratch. It consists of training a tokeniser, defining the architecture and training the model.

Pros

  • You can make a model on your custom text or a new language
  • You have complete control of model parameters. If you are looking to make a model which works on a text of fixed domain with less vocab, you can make the smallest possible model. …


Predicting numbers through stats

Image for post
Image for post
Photo by Aron Visuals on Unsplash

So yesterday I was having a call with my family member who is educated enough to understand the risk of going out right now. But, to my horror, he surprised me by saying “People are scared unnecessarily. We are a country of 1.3B and we have only 250 reported cases so far. There is nothing to fear.” He said this even when the virus was already reported in his city.

I was baffled, frustrated and angry.

I feel that people will take things more seriously if we can calculate ‘real active cases’.

Currently, we have incorrect information about our situation — global, country and city. We really don’t have the correct idea of active cases. …


Slow-thinking vs fast-thinking

Image for post
Image for post
Risk-takers | 100x engineers | Astronauts | From Unsplash

From Google’s 43 rules of ML.

“Rule #4: Keep the first model simple and get the infrastructure right.”

With some opinions floating in the market, I feel it’s a good time to spark a discussion about this topic. Otherwise, the opinions of the popular will just drown other ideas.

Note: I work in NLP and these opinions are more focussed towards NLP applications. Cannot guarantee truthfulness for tabular and image problems.

Image for post
Image for post

Problems with simple models

  • It’s suitable for companies who want to have good enough automation. If you want to truly win the competition or delight your customers, you need to learn to work with complex models (when they make technical and financial sense). But don’t choose complex for marginal gains of like 1%. …


Fast bug-free coding

Image for post
Image for post
Photo by DeMorris Byrd on Unsplash

→ ML in production series

Come join Maxpool — A Data Science community to discuss real ML problems!

Sometimes as a data scientist we forget what are we paid for. We are primarily developers, then researchers and then maybe mathematicians. Our first responsibility is to quickly develop solutions which are bug-free.

Just because we can make models doesn’t mean we are gods. It doesn’t give us the freedom to write crap code.

Since my start, I have made tremendous mistakes and thought of sharing what I see to be the most common skills for ML engineering. …


Hi NLP fan! 🤗

I hope you are making enough models and putting them into production. I hope you are having good failures and learning a lot from it. And I hope you are not one of the NLP idiots I talked about 😆

This is my first letter ever and I would like to get your suggestions for my future writing. Would you like me to write on recent NLP papers or search engines or practical implementations or a detailed guide like I wrote on transfer learning?

What are the things in NLP you are curious about? What problems do you face at work and hope you knew more about? Which skills do you wish to acquire to become a better NLP engineer? …

About

Pratik Bhavsar

Join maxpool.club | NLP engineer | @JinaAI_ | IIT Bombay | MLOps | @nlpguy_

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store