Top 6 Open Source Text-to-Image Models

Text to image models emerged in the mid-2010s due to advancements in deep neural networks. However, much before ChatGPT, the buzz around generative AI grew with text-to-image models OpenAI’s DALL-E, Google Brain’s Imagen, and StabilityAI’s Stable Diffusion. These generative AI models have garnered attention because of resembling real photographs and hand-drawn artwork.

So, let’s take a look at the top five open-source image generation models that can come to your help.

DeepFloyd IF

Backed by Stability AI, research group DeepFloyd’s open-source text to image model DeepFloyd IF combines realistic visuals and language comprehension. It consists of a modular design, featuring a fixed text encoder and three interconnected pixel diffusion modules. The initial module generates 64×64 px images based on text prompts, while the subsequent super-resolution modules create images of increasing resolution: 256×256 px and 1024×1024 px. The entire model leverages a frozen text encoder derived from the T5 transformer to extract text embeddings. These embeddings are then utilized in a UNet architecture, which is enhanced with cross-attention and attention pooling. As a result, this model surpasses existing models, achieving an impressive zero-shot FID score of 6.66 on the COCO dataset.

Check out their GitHub repository here.

Stable Diffusion v1-5

Latent text to image model Stable Diffusion v1-5 merges an autoencoder with a diffusion model to create photo realistic images. It has been trained on the extensive laion-aesthetics v2 5+ dataset and fine-tuned over 595k steps at a resolution of 512×512 pixels, this model has the remarkable capability of generating highly realistic images based on any given text input. It has flexibility in generating images from a wide range of latent spaces, as opposed to being restricted to a fixed set of text prompts. Its training on a large image dataset enables it to possess a deeper understanding of image characteristics, resulting in more lifelike image generation.

Stable Diffusion v1-5 is accessible in both the Diffusers library and the RunwayML GitHub repository. Check it out here.

OpenJourney

Openjourney is a free, open-source text-to-image model that produces AI art in the style of Midjourney as it is trained on a dataset of over 124k Midjourney v4 images. It’s a fine-tune of Stable Diffusion. Developed by PromptHero, a leading prompt engineering website, Openjourney is the second most downloaded text-to-image model on HuggingFace, following Stable Diffusion. Users prefer Openjourney for its ability to generate impressive images with minimal input and its suitability as a base model for fine-tuning.

Click here to access the model.

DreamShaper

Built on diffusion model architecture, fan favourite Dream Shaper V7 introduces improvements in LoRA support and overall realism. It builds upon the enhancements made in Version 6, which included increased LoRA support, general style improvements, and better generation at a height of 1024 pixels (though caution is advised when using this feature). It produces photorealistic image with a noise offset, and enhances anime-style generation with booru tags. It also improves eye performance at lower resolutions, serving as a “fix” for earlier versions. The impact of Version 3.32’s “clip fix” may differ from Version 3.31, recommending its use for mixing. It also involves inpainting and outpainting.

If you want to know more about it, check this out.

Dreamlike Photoreal

Dreamlike Photoreal 2.0 is a photorealistic model based on Stable Diffusion 1.5. Made by DreamlikeArt, you can enhance the realism of your generated images by incorporating photos into your prompt. For best results, use non-square aspect ratios. For portrait-style photos, a vertical aspect ratio is recommended, while a horizontal aspect ratio is more suitable for landscape photos. This model was trained on images with dimensions of 768×768 pixels, although it can also handle higher resolutions like 768x1024px or 1024x768px effectively. Running on server-grade A100 GPUs, it boasts an average generation speed of 4 seconds, surpassing the performance of 8x RTX 3090 GPUs. With the capability to process up to 30 images simultaneously and generate up to 4 images concurrently, it ensures an efficient workflow. It includes several features like upscaling, natural language editing, facial enhancements, pose, depth, sketch replication, and others.

You can access it here.

Waifu Diffusion

Last but not the least, we have Waifu Diffusion, a fine-tuned version (1.3) of the Stable Diffusion model, derived from Stable Diffusion v1.4. This model specialises in generating realistic anime-style images and has gained recognition for its impressive variety and high quality.

The model was trained on dataset of 680k text-image samples obtained from a booru site.

Find their GitHub repository here.

The post Top 6 Open Source Text-to-Image Models appeared first on Analytics India Magazine.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

This data science project has been used as a take-home assignment in the recruitment process at Meta (Facebook). In this take-home assignment, we will discover how Rotten Tomatoes is making labeling as ‘Rotten’, ‘Fresh’ or ‘Certified Fresh’.

Link to this data science project: https://platform.stratascratch.com/data-projects/rotten-tomatoes-movies-rating-prediction

To do that, we will develop two different approaches.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach
Image by Author

Throughout our exploration, we will discuss data preprocessing, various classifiers, and potential improvements to enhance the performance of our models.

By the end of this post, you will have gained an understanding of how machine learning can be employed to predict movie success and how this knowledge can be applied in the entertainment industry.

But before going deeper, let’s discover the data we will work on.

Second Approach: Predicting Movie Status Based on Review Sentiment

In the second approach, we plan to predict the movie's success by assessing the sentiment of its reviews. We will specifically apply sentiment analysis to evaluate the overall sentiment of the review and classify the film as 'Fresh' or 'Rotten' based on this sentiment.

Yet, before we start the sentiment analysis, we must first prepare our dataset. In contrast to the preceding strategy, this one entails dealing with text data (reviews) rather of numerical and categorical variables. For this challenge, we will continue to employ the Random Forest model. Let's take a closer look at our data before we go on.

First, let’s read the data.

Here's the code.

df_critics = pd.read_csv('rotten_tomatoes_critic_reviews_50k.csv')  df_critics.head()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach
Image by Author

Great, let’s start with the Data Preprocessing.

Data Preprocessing

In this dataset, we do not have the movie names and corresponding statuses. For this dataset, we have review_content and review_type variables.

That’s why we will merge this dataset with our previous one, on rotten_tomatoes_link, and select the necessary features with index bracketing as follows.

Here's the code:

df_merged = df_critics.merge(df_movie, how='inner', on=['rotten_tomatoes_link'])  df_merged = df_merged[['rotten_tomatoes_link', 'movie_title', 'review_content', 'review_type', 'tomatometer_status']]  df_merged.head()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

In this approach, we will use only the review_content column as the input feature and review_type as the ground truth label.

To ensure that the data is usable, we need to filter out any missing values in the review_content column since empty reviews cannot be used in the sentiment analysis.

df_merged = df_merged.dropna(subset=['review_content'])

After filtering out missing values, we will visualize the distribution of review_type to gain a better understanding of the distribution of data.

# Plot distribution of the review  ax = df_merged.review_type.value_counts().plot(kind='bar', figsize=(12,9))  ax.bar_label(ax.containers[0])

This visualization will help us determine whether there are any class imbalances in the data and will guide us in selecting an appropriate evaluation metric for our model.

Here's the whole code:

df_merged = df_merged.dropna(subset=['review_content'])  # Plot distribution of the review  ax = df_merged.review_type.value_counts().plot(kind='bar', figsize=(12,9))  ax.bar_label(ax.containers[0])

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

It looks like we have an imbalance problem between our features.

And also, we have too many data points, which might decrease our speed.

So, we will pick 5000 entries from the original dataset first.

df_sub = df_merged[0:5000]

Then we will do the ordinal encoding.

review_type = pd.DataFrame(df_sub.review_type.replace(['Rotten','Fresh'],[0,1]))

Finally, we will create a data frame, that contains the encoded labels with review content by using the concat() method in Python and view the first 5 rows by using the head() method.

df_feature_critics = pd.concat([df_sub[['review_content']]                          ,review_type], axis=1).dropna()  df_feature_critics.head()

Here's the whole code.

# Pick only 5000 entries from the original dataset  df_sub = df_merged[0:5000]    # Encode the label  review_type = pd.DataFrame(df_sub.review_type.replace(['Rotten','Fresh'],[0,1]))    # Build final DataFrame  df_feature_critics = pd.concat([df_sub[['review_content']]                          ,review_type], axis=1).dropna()  df_feature_critics.head()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Great, now as a final step for this section, let’s split our dataset into trainset and test set.

X_train, X_test, y_train, y_test = train_test_split( df_feature_critics['review_content'], df_feature_critics['review_type'], test_size=0.2, random_state=42)

Default Random Forest

To use the text reviews in our DataFrame for machine learning methods, we must transform them into a format that can be processed. In Natural Language Processing, this is known as tokenization, where we translate text or words into n-dimensional vectors and then use these vector representations as training data for our machine learning algorithm.

To do this, we are going to use scikit-learn's CountVectorizer class to turn the text reviews into a matrix of token counts. We begin by creating a dictionary of unique terms from the input text.

For example, based on the two reviews "This movie is good" and "The movie is bad," the algorithm would create a dictionary of unique phrases such as ;

Then, based on the input text, we calculate the number of times of each word in the dictionary.

["this", "movie", "is", "a", "good", "the", "bad"].

For instance, the input "This movie is a good movie" would result in a vector of [1, 2, 1, 1, 1, 0, 0]

Finally, we input the generated vector into our Random Forest model.

We can predict the sentiment of the reviews and classify the movie as 'Fresh' or 'Rotten' by training our Random Forest classifier on the vectorized text data.

The following code instantiates a CountVectorizer class that transforms text data into numerical vectors, and specifies that a word must appear in at least one document to be included in the vocabulary.

# Instantiate vectorizer class  vectorizer = CountVectorizer(min_df=1)

Next, we are going to transform the training data into vectors using the instantiated CountVectorizer object.

# Transform our text data into vector  X_train_vec = vectorizer.fit_transform(X_train).toarray()

Then, we instantiate a RandomForestClassifier object with a specified random state and fit the random forest model using the training data.

# Initialize random forest and train it  rf = RandomForestClassifier(random_state=2)  rf.fit(X_train_vec, y_train)  

Now it is time to predict by using the trained model and transformed test data.

Then we will print out the classification report that contains evaluation metrics such as precision, recall, and f1-score.

# Predict and output classification report  y_predicted = rf.predict(vectorizer.transform(X_test).toarray())    print(classification_report(y_test, y_predicted))

Finally, let’s create a new figure with a specified size for the confusion matrix plot and plot the confusion matrix.

fig, ax = plt.subplots(figsize=(12, 9))  plot_confusion_matrix(rf, vectorizer.transform(X_test).toarray(), y_test, cmap ='cividis', ax=ax

Here is the whole code.

# Instantiate vectorizer class  vectorizer = CountVectorizer(min_df=1)    # Transform our text data into vector  X_train_vec = vectorizer.fit_transform(X_train).toarray()    # Initialize random forest and train it  rf = RandomForestClassifier(random_state=2)  rf.fit(X_train_vec, y_train)    # Predict and output classification report  y_predicted = rf.predict(vectorizer.transform(X_test).toarray())    print(classification_report(y_test, y_predicted))    fig, ax = plt.subplots(figsize=(12, 9))  plot_confusion_matrix(rf, vectorizer.transform(X_test).toarray(), y_test, cmap ='cividis', ax=ax

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Weighted Random Forest

As we can see from our latest confusion matrix, the performance of our model is not good enough.

Yet, this might be expected due to working with a limited number of data points.(5000 instead of 100000).

Let’s see if we can increase the performance by solving the imbalance issue with class weights.

Here's the code.

class_weight = compute_class_weight(class_weight= 'balanced', classes= np.unique(df_feature_critics.review_type),                         y = df_feature_critics.review_type.values)    class_weight_dict = dict(zip(range(len(class_weight.tolist())), class_weight.tolist()))  class_weight_dict

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

We now train our Random Forest classifier on the vectorized text input, but this time including the class weight information to increase the evaluation metrics.

We first create the CountVectorizer class and, like previously, turn our text input into vectors.

And transform our text data into a vector.

vectorizer = CountVectorizer(min_df=1)  X_train_vec = vectorizer.fit_transform(X_train).toarray()

Then we will define a random forest with calculated class weight and train it.

# Initialize random forest and train it  rf_weighted = RandomForestClassifier(random_state=2, class_weight=class_weight_dict)  rf_weighted.fit(X_train_vec, y_train)

Now it is time to make a prediction by using test data and printing out the classification report.

# Predict and output classification report  y_predicted = rf_weighted.predict(vectorizer.transform(X_test).toarray())    print(classification_report(y_test, y_predicted))

In final step, we set the figure size and plot the confusion matrix.

fig, ax = plt.subplots(figsize=(12, 9))  plot_confusion_matrix(rf_weighted, vectorizer.transform(X_test).toarray(), y_test, cmap ='cividis', ax=ax)

Here is the whole code.

# Instantiate vectorizer class  vectorizer = CountVectorizer(min_df=1)    # Transform our text data into vector  X_train_vec = vectorizer.fit_transform(X_train).toarray()    # Initialize random forest and train it  rf_weighted = RandomForestClassifier(random_state=2, class_weight=class_weight_dict)  rf_weighted.fit(X_train_vec, y_train)    # Predict and output classification report  y_predicted = rf_weighted.predict(vectorizer.transform(X_test).toarray())    print(classification_report(y_test, y_predicted))    fig, ax = plt.subplots(figsize=(12, 9))  plot_confusion_matrix(rf_weighted, vectorizer.transform(X_test).toarray(), y_test, cmap ='cividis', ax=ax)

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Now our model’s accuracy is slightly better than the one without class weights.

Furthermore, because the weight of class 0 ('Rotten') is greater than the weight of class 1 ('Fresh,' the model now performs better in predicting 'Rotten' movie reviews but worse in predicting 'Fresh' movie reviews.

This is because the model pays more attention to the data classed as 'Rotten'.

Movie Status Prediction

Let's use our Random Forest model to predict movie status now that we've trained it to predict the sentiment of a movie review. We'll go through the following stages to determine a movie's status:

  • Collect all of the reviews for a certain film.
  • Make use of our Random Forest model to estimate the state of each review (for example, 'Fresh' or 'Rotten').
  • To classify the final status of a movie based on the total review status, use the rule-based approach given on the Rotten Tomatoes website.

Here in the following code, we first create a function name predict_movie_statust, which take a prediction as an argument.

Then, depending on the positive_percentage value, we identify the movie status, assigning either 'Fresh' or 'Rotten' to the prediction variable.

Finally, it will output the positive review percentage with the movie status.

Here is the code.

def predict_movie_status(prediction):      """Assign label (Fresh/Rotten) based on prediction"""      positive_percentage = (prediction == 1).sum()/len(prediction)*100            prediction = 'Fresh' if positive_percentage >= 60 else 'Rotten'            print(f'Positive review:{positive_percentage:.2f}%')      print(f'Movie status: {prediction}')

In this example, we'll predict the status of three films: Body of Lies, Angel Heart, and The Duchess. Let us begin with Body of Lies.

'Body of Lies' Prediction

Now as it stated above, first let’s collect all of the reviews of Body of Lies movie.

Here is the code.

# Gather all of the reviews of Body of Lies movie  df_bol = df_merged.loc[df_merged['movie_title'] == 'Body of Lies']    df_bol.head()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Great, at this stage let’s apply a weighted random forest algorithm to predict status. Then we use this in the custom function we defined earlier, which takes a prediction as an argument.

Here is the code.

y_predicted_bol = rf_weighted.predict(vectorizer.transform(df_bol['review_content']).toarray())  predict_movie_status(y_predicted_bol)

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

And here is our result, let’s check our result whether it is valid or not by comparing it with ground_truth status.

Here is the code.

df_merged['tomatometer_status'].loc[df_merged['movie_title'] == 'Body of Lies'].unique()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

It looks like our prediction is pretty valid because the status of this movie is Rotten as we predict.

'Angel Heart' Prediction

Here we will repeat all steps.

  • Gather all of the reviews
  • Make prediction
  • Comparing

Let’s first gather all of the reviews for Anna Karenina's movie.

Here is the code.

df_ah = df_merged.loc[df_merged['movie_title'] == 'Angel Heart']  df_ah.head()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Now it is time to make a prediction by using random forest and our custom function.

Here is the code.

y_predicted_ah = rf_weighted.predict(vectorizer.transform(df_ah['review_content']).toarray())  predict_movie_status(y_predicted_ah)

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Let’s make a comparison.

Here is the code.

df_merged['tomatometer_status'].loc[df_merged['movie_title'] == 'Angel Heart'].unique()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Our model predicts correct again.

Now let’s try one more time.

'The Duchess' Prediction

First let’s collect all reviews.

Here is the code.

df_duchess = df_merged.loc[df_merged['movie_title'] == 'The Duchess']  df_duchess.head()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Then now it is time to make a prediction.

Here is the code.

y_predicted_duchess = rf_weighted.predict(vectorizer.transform(df_duchess['review_content']).toarray())  predict_movie_status(y_predicted_duchess)

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

Let’s compare our prediction with the ground truth.

Here is the code.

df_merged['tomatometer_status'].loc[df_merged['movie_title'] == 'The Duchess'].unique()

Here is the output.

Data Science Project of Rotten Tomatoes Movie Rating Prediction: Second Approach

And the movie's ground-truth label is 'Fresh,' indicating that our model's forecast is incorrect.

Yet, it can be noticed that our model's predicted is very close to the 60% threshold, indicating that a minor tweak to the model might alter its prediction from 'Rotten' to 'Fresh'.

Obviously, the Random Forest model that we trained above is not the best model, since there is still potential for improvement. In the next part, we will provide many suggestions for improving the performance of our model.

Suggestions for Performance Improvement

  1. Increase the amount of data you have.
  2. Set different hyperparameters of the random forest model.
  3. Apply different machine learning models to find the best.
  4. Adjust the method used to represent the text data.

Conclusion

In this article, we explored two different approaches to predict movie status based on numerical and categorical features.

We first performed data preprocessing and then applied a decision tree classifier and random forest classifier to train our model.

We also experimented with feature selection and a weighted random forest classifier.

In the second approach, we used the default random forest and weighted random forest to predict the movie status of three different films.

We provided suggestions for improving the performance of our models. We hope this article has been informative and helpful.

If you want some beginner level projects, check out our post “Data Science Project Ideas for Beginners”.
Nate Rosidi is a data scientist and in product strategy. He's also an adjunct professor teaching analytics, and is the founder of StrataScratch, a platform helping data scientists prepare for their interviews with real interview questions from top companies. Connect with him on Twitter: StrataScratch or LinkedIn.

More On This Topic

  • Data Science Project of Rotten Tomatoes Movie Rating Prediction: First…
  • KDnuggets™ News 20:n44, Nov 18: How to Acquire the Most Wanted Data…
  • How to Future-Proof Your Data Science Project
  • Data Science Project Infrastructure: How To Create It
  • 19 Data Science Project Ideas for Beginners
  • 4 Steps for Managing a Data Science Project

Will AI take programming jobs or turn programmers into AI managers?

frustrated man working on laptop

Prior to the last ten years or so when I've been mostly a full-time advisor, pundit, and columnist, I was a manager. I was a product marketing executive earlier in my career, and a publisher later in my career. I had people directly reporting to me for years.

I managed editors, salespeople, programmers, manufacturing teams, and other executives.

You want to know one of the best things about my encore career? No direct reports. I don't have to manage anyone.

Also: 7 advanced ChatGPT prompt-writing tips you need to know

People who haven't been managers think bosses get to spend their time dumping work on underlings and just bossing people around. Managers know that the reality is they spend oh so much time simply trying to get the people who work for them to execute their job duties as instructed.

Some of that falls on the manager, who may or may not give clear instructions. But an equal amount of that challenge falls on the direct reports who misinterpret instructions, passive-aggressively follow directions to the letter (this was my karma payback, because I did this to my bosses), or simply need to be negotiated with to do what needs doing.

Also: How to use ChatGPT to write code

It's part of why I like programming so much. With programming, the computer will also do exactly what you tell it to do. Exactly. Of course, the precision with which a program follows instructions often leads to bugs, especially on the first try. But that's okay, because whatever it does wrong is somewhere there, right in the code.

It may be a challenge to come up with the right algorithm or to translate the algorithm and data structures in your head into working code, but code is code. It's consistent and reasonably predictable.

Then there's AI. Giving instructions to an AI like ChatGPT is much more like managing a programmer than it is like programming. Everything is subject to interpretation and negotiation. Yes, you can get results, and sometimes you can get results you couldn't have gotten without a lot of coding, but there's still some degree of haggling, negotiating, reframing requests, and try after try to get it right.

Also: Okay, so ChatGPT just debugged my code. For real.

You can give an AI a prompt twice and it will return two different results. Unless your code has some sort of randomization function or serious bug, you can run your code twice and it will return the same exact results.

Will AI take programming jobs?

I've been giving this question a lot of thought, especially in light of some prompt writing I did this weekend while working on an article on advanced prompt writing. In that article, I tried to get ChatGPT to solve a very simple problem, and it would up taking me hours and more than 20 prompt attempts to get it to work reliably. The prompt was:

Word similar to devolve that begins with a B

ChatGPT kept giving me answers that began with a "D", seeming fully confident in its answers. When I pointed out that the words it returned did not begin with a "B", it apologized and made the same mistake. Over and over and over again. It felt very much like I was talking to a particularly stubborn employee, trying to get them to see what I wanted them to do.

Also: How ChatGPT can rewrite and improve your existing code

There was a time when I managed a few salespeople who sold over the phone. They were asked to call a fairly warm prospect list and pitch our services. I gave them an exact description of how to pitch our services, but we had one salesperson who just refused to stick to the script.

As such, some of the people she called were turned into hot leads…until we met with the prospects, only to find out that they had the wrong idea about the services we offered. She liked her description better because it made getting appointments easier.

But it wasn't about making appointments. It was about making sales. She wasn't even compensated on making appointments, but that didn't matter. She liked her way better.

ChatGPT is like that. By the time I spent a few hours trying to get it to return a word beginning with a B, I reached the stage where I wanted to yell at it, "Well, what would it take to convince you that the word DEVOLVE begins with a D?"

I wasn't coding. I was negotiating. I spent a good part of my Sunday haggling with a robot, all the while thinking, "So this is progress?"

Also: How to use ChatGPT to create an app

I've always been fascinated by AI, and we're at the point where the technology is close to what I dreamed it would become. I've worked with AI and the implications of AI as far back as my thesis work in college. And yet, after a few hours, I felt like banging my head against a wall. I wanted to scream at the top of my lungs and tear my hair out.

So it was a lot like managing some of the direct reports I've had over the years — and, if I'm honest, a lot like how my bosses felt managing me when I was younger.

I did eventually come up with a reliable prompt, and the article describes why it works. But it became very clear to me that while it looks like AIs might take low-level programming jobs, the fact that the AIs work so much like employees might provide some human worker protection.

Also: The best AI chatbots to try

The following table shows that there are some tasks where doing coding is easier, and other tasks where using an AI is easier. As you can see, the combination of the two is particularly interesting, but using an AI certainly doesn't remove the requirement for human skill and expertise.

Code

AI

Getting data

You'll need to find a large dataset and use a specific API to retrieve individual data items

Just describe what you need and the AI will find it somewhere. It's easy to do.

Accuracy of data

If the data set is accurate and your code runs correctly, the data will be accurate.

There is no provenance to the data you retrieve. It could even be completely made up by the AI.

Creating instructions

You need to be familiar with how to code and how to design an algorithm, as well as various APIs and language interactions.

If you can describe it, you can generally make it happen by simply telling the AI what you want.

Following directions

Your code will do exactly what you tell it, including make errors if you haven't fully debugged it.

The AI will roughly interpret what you asked for and will sometimes stubbornly do whatever it wants anyway.

Executing complex instructions and getting reliable results

You need to be an experienced coder with a full grasp of how to construct algorithms and write code.

You need to be an experienced "prompt engineer" with a full grasp of how to specify problems and how they should be solved.

Are skills and training required?

Newbie programmers can do some projects, but real work requires deep understanding of how to get the job done.

Anyone can write simple prompts, but solving complex problems requires deep understanding of how to get the job done.

Here on ZDNET, we've run a few articles that spotlight surveys of programmers' experience using generative AI to help with code. The prevailing impression is that AI can make programmers more productive and help teach more junior programmers new techniques. But as I've shown in my numerous programming articles on AI, the code doesn't always work.

Also: The 10 best ChatGPT plugins (and how to make the most of them)

I have no doubt that AI will transform programming jobs, and take some of the work away from real people. But, at least for the current generation of AI engines, getting anything real done will require some level of expertise, whether that be coding expertise, prompt writing expertise, or — more likely — a mix of both. Plus a healthy dose of patience.

You can follow my day-to-day project updates on social media. Be sure to follow me on Twitter at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, and on YouTube at YouTube.com/DavidGewirtzTV.

More on AI tools

Meesho Teams Up with IISc to Boost Generative AI Research

Leading online marketplace Meesho has entered into a one-year memorandum of understanding (MoU) with the Vision & AI Lab (VAL) of the Indian Institute of Science (IISc) to propel research in generative AI and drive technological advancements in the e-commerce industry.

Over the years, the leading online marketplace platform has used AI and analytics to revolutionise the way we shop. As part of the MoU, Meesho’s data scientists will collaborate with leading researchers from the Vision & AI Lab at IISc. Together, they will concentrate on developing multimodal representation learning and generative AI capabilities to make a significant impact on the e-commerce industry. The research efforts will also aim to assist Meesho in creating solutions that enhance the e-commerce experience for its users.

“At Meesho, AI and ML are fundamental components to solve a wide range of problems across every aspect of an e-commerce platform,” Debdoot Mukherjee, chief data scientist, and head of AI and demand engineering at Meesho told AIM in an earlier conversation.

Generative AI and multimodal large language models (LLMs) are crucial technologies in the e-commerce industry. The 60-member data science team is actively exploring the use of generative AI in different areas such as recommendation systems. Now the data scientists will also benefit from the mentorship of distinguished experts in the domains of generative AI and multimodal LLMs from IISc.

Meesho, an e-commerce platform, leverages AI and ML to engage users and enhance their experience. Their personalized feeds and push notifications are powered by AI and ML algorithms. Recommendations play a vital role, with a substantial number of orders coming through ML and deep learning-powered recommendation systems. These recommendations are based on user and product analysis using computer vision and NLP models. Meesho also supports suppliers by offering automated cataloguing using computer vision models and assists them in optimizing pricing through ML-driven suggestions. They employ large-scale ML models for order efficiency, customer issue resolution, fraud detection, and prevention. They use TensorFlow, PyTorch, XGBoost, and Databricks for model training, data engineering, and infrastructure. Additionally, Meesho develops custom tools, including a shopping intent detection model, product cataloguing models, and a proprietary fraud detection system to combat various types of fraud.

On the other hand, a while ago, Honeywell Hometown Solutions India Foundation (HHSIF), a philanthropic organisation affiliated with Honeywell, teamed up with the Society of Innovation and Development (SID) at IISc to assist deep-tech startups. This collaboration aims to help startups progress from the initial incubation stage to receiving early seed investments. In a similar vein, Samsung Semiconductor India Research (SSIR) has recently joined forces with the IISc to advance research and development in on-chip Electrostatic Discharge (ESD) Protection within India’s semiconductor industry.

Read more: Data Science Hiring Process at Meesho

The post Meesho Teams Up with IISc to Boost Generative AI Research appeared first on Analytics India Magazine.

NYC’s anti-bias law for hiring algorithms goes into effect

NYC’s anti-bias law for hiring algorithms goes into effect Kyle Wiggers 8 hours

After months of delays, New York City today began enforcing a law that requires employers using algorithms to recruit, hire or promote employees to submit those algorithms for an independent audit — and make the results public. The first of its kind in the country, the legislation — New York City Local Law 144 — also mandates that companies using these types of algorithms make disclosures to employees or job candidates.

At a minimum, the reports companies must make public have to list the algorithms they’re using as well an an “average score” candidates of different races, ethnicities and genders are likely to receive from the said algorithms — in the form of a score, classification or recommendation. It must also list the algorithms’ “impact ratios,” which the law defines as the average algorithm-given score of all people in a specific category (e.g., Black male candidates) divided by the average score of people in the highest-scoring category.

Companies found not to be in compliance will face penalties of $375 for a first violation, $1,350 for a second violation and $1,500 for a third and any subsequent violations. Each day a company uses an algorithm in noncompliance with the law, it’ll constitute a separate violation — as will failure to provide sufficient disclosure.

Importantly, the scope of Local Law 144, which was approved by the City Council and will be enforced by the NYC Department of Consumer and Worker Protection, extends beyond NYC-based workers. As long as a person’s performing or applying for a job in the city, they’re eligible for protections under the new law.

Many see it as overdue. Khyati Sundaram, the CEO of Applied, a recruitment tech vendor, pointed out that recruitment AI in particular has the potential to amplify existing biases — worsening both employment and pay gaps in the process.

“Employers should avoid the use of AI to independently score or rank candidates,” Sundaram told TechCrunch via email. “We’re not yet at a place where algorithms can or should be trusted to make these decisions on their own without mirroring and perpetuating biases that already exist in the world of work.”

One needn’t look far for evidence of bias seeping into hiring algorithms. Amazon scrapped a recruiting engine in 2018 after it was found to descriminate against women candidates. And a 2019 academic study showed AI-enabled anti-Black bias in recruiting.

Elsewhere, algorithms have been found to assign job candidates different scores based on criteria like whether they wear glasses or a headscarf; penalize applicants for having a Black-sounding name, mentioning a women’s college, or submitting their résumé using certain file types; and disadvantage people who have a physical disability that limits their ability to interact with a keyboard.

The biases can run deep. A October 2022 study by the University of Cambridge implies the AI companies that claim to offer objective, meritocratic assessments are false, positing that anti-bias measures to remove gender and race are ineffective because the ideal employee is historically influenced by their gender and race.

But the risks aren’t slowing adoption. Nearly one in four organizations already leverage AI to support their hiring processes, according to a February 2022 survey from the Society for Human Resource Management. The percentage is even higher — 42% — among employers with 5,000 or more employees.

So what forms of algorithms are employers using, exactly? It varies. Some of the more common are text analyzers that sort resumes and cover letters based on keywords. But there’s also chatbots that conduct online interviews to screen out applicants with certain traits, and interviewing software designed to predict a candidate’s problem solving skills, aptitudes and “cultural fit” from their speech patterns and facial expressions.

The range of hiring and recruitment algorithms is so vast, in fact, that some organizations don’t believe Local Law 144 goes far enough.

The NYCLU, the New York branch of the American Civil Liberties Union, asserts that the law falls “far short” of providing protections for candidates and workers. Daniel Schwarz, senior privacy and technology strategist at the NYCLU, notes in a policy memo that Local Law 144 could, as written, be understood to only cover a subset of hiring algorithms — for example excluding tools that transcribe text from video and audio interviews. (Given that speech recognition tools have a well-known bias problem, that’s obviously problematic.)

“The … proposed rules [must be strengthened to] ensure broad coverage of [hiring algorithms], expand the bias audit requirements and provide transparency and meaningful notice to affected people in order to ensure that [algorithms] don’t operate to digitally circumvent New York City’s laws against discrimination,” Schwarz wrote. “Candidates and workers should not need to worry about being screened by a discriminatory algorithm.”

Parallel to this, the industry is embarking on preliminary efforts to self-regulate.

December 2021 saw the launch of the Data & Trust Alliance, which aims to develop an evaluation and scoring system for AI to detect and combat algorithmic bias, particularly bias in hiring. The group at one pointed counted CVS Health, Deloitte, General Motors, Humana, IBM, Mastercard, Meta, Nike and Walmart among its members, and garnered significant press coverage.

Unsurprisingly, Sundaram is in favor of this approach.

“Rather than hoping regulators catch up and curb the worst excesses of recruitment AI, it’s down to employers to be vigilant and exercise caution when using AI in hiring processes,” he said. “AI is evolving more rapidly than laws can be passed to regulate its use. Laws that are eventually passed — New York City’s included — are likely to be hugely complicated for this reason. This will leave companies at risk of misinterpreting or overlooking various legal intricacies and, in-turn, see marginalized candidates continue to be overlooked for roles.”

Of course, many would argue having companies develop a certification system for the AI products that they’re using or developing is problematic off the bat.

While imperfect in certain areas, according to critics, Local Law 144 does require that audits be conducted by independent entities who haven’t been involved in using, developing or distributing the algorithm they’re testing and who don’t have a relationship with the company submitting the algorithm for testing.

Will Local Law 144 affect change, ultimately? It’s too early to tell. But certainly, the success — or failure — of its implementation will affect laws to come elsewhere. As noted in a recent piece for Nerdwallet, Washington, D.C., is considering a rule that would hold employers accountable for preventing bias in automated decision-making algorithms. Two bills in California that aim to regulate AI in hiring were introduced within the last few years. And in late December, a bill was introduced in New Jersey that would regulate the use of AI in hiring decisions to minimize discrimination.

How Generative AI is Reshaping Observability Solutions

Observability solutions are becoming increasingly important in today’s digital age. As more and more companies rely on technology to run their business operations, the need to monitor, analyse, and optimise their systems and applications in real-time has become critical. Organisations are now prioritising customer experience and accessibility through digital transformation.

However, these initiatives can introduce complexity and challenges for engineers. “Efficient observability solutions are crucial for businesses scaling their digital outreach, as they face increasing device diversity.

“Engineers require end-to-end observability to untangle data, understand business performance, monitor service availability, and optimise further. New Relic serves as a comprehensive observability solution, offering real-time insights and empowering engineers to make data-driven decisions throughout the software lifecycle,” Ganesh Narasimhadevara, Principal Technologist, APJ, New Relic told AIM.

New Relic’s comprehensive platform offers over 30 capabilities, delivering a seamless and connected experience throughout the various layers of the technology stack at every stage of the software lifecycle. “We started our journey with the very first capability of application performance monitoring and then we extended ourselves along with the tech advancements that we’re seeing in the market. We extended into infrastructure monitoring, not limited to the VMs or just to the conference servers. As of today, we have the most advanced Kubernetes monitoring in the industry.”

New Relic Grok

But today, we are in the age of generative AI and it is finding use cases in the observability solutions space as well. New Relic, a US-based analytics company announced New Relic Grok, the world’s first generative AI assistant for observability.

Narasimhadevara, in an exclusive conversation with AIM, said that New Relic’s generative AI powered observability is what engineers would need to be more productive every day. “New Relic Grok empowers users to identify instrumentation gaps and provides guidance for onboarding new services. It can sift through extensive documentation to answer questions and generate queries for specific metrics or application trends. Additionally, it facilitates common use cases such as creating alerts or reproducing service levels.”

New Relic is leveraging generative AI capabilities through Microsoft OpenAI Azure services (GPT models) and is not exploring building its own proprietary models. However, it is something that New Relic could look into in the future.

“Currently, I don’t see the immediate necessity for building our own language models. Many organisations, including those in India, are partnering with hyperscalers to leverage their existing efficient models. The focus is on understanding how generative AI can enhance observability before investing resources in model development. Building our own model may be a future plan once we have assessed its benefits and potential.”

How gen AI can benefit observability solutions

Today, companies in the observability space are developing new generative AI solutions that can help automate monitoring, visualisation, and analysis of complex systems, reducing manual effort, speeding up issue identification and resolution, and improving overall system performance.

In short, generative AI is making it easier for users to find the root cause of an issue and fix the errors. “Observability solutions have evolved to be a single source of truth. Having a generative AI system as part of the product is going to eliminate the need of jumping between a tool like ChatGPT, and observability solutions,” Narasimhadevara said.

The advantages that generative AI brings to observability solutions will help in reducing the workload of engineers and help save a lot of time allowing them to focus on more strategic work. “Another way generative AI solutions with observability can evolve is by bypassing the tribal knowledge, according to Narasimhadevara. Tribal knowledge refers to experience and knowledge that is shared among team members but is not documented or shared more widely across the organisation.

“Team members may vary in their expertise and product knowledge. Imagine having the capability to analyse vast amounts of data, process tribal knowledge, detect anomalies, and connect various metrics to provide insights such as identifying the cause of an anomaly due to a recent deployment. Generative AI solutions integrated effectively can offer such capabilities, providing relevant suggestions and allowing users to train the model to meet their specific needs.”

Moreover, another good advancement in observability that could emerge from generative AI is automation. Going forward, we could foresee a scenario where a Large Language Model would be able to perform a task without any human intervention. “In future engineers will have the ability to instruct the generative AI assistant to monitor the application performance, provide some recommendations and also implement them through automation.”

Will GenAI make observability solution providers obsolete?

Narasimhadevara believes there are similarities between observability solutions and large language models. “The reason why it’s very similar is they get as good as the data that you feed them.”

However, large language models are not going to make observability solutions providers obsolete. The effectiveness of language models is contingent on the data they have access to. Observability solutions, on the other hand, provide critical insights into system states that are exclusive to their functionality. “Integrating observability solutions with advanced or current language models can enhance contextual understanding. Without the relevant data from observability solutions, the language model’s power is limited.”

The post How Generative AI is Reshaping Observability Solutions appeared first on Analytics India Magazine.

5 Highest-paid Languages to Learn This Year

5 Highest-paid Languages to Learn This Year
Image by Author

This year's Stack Overflow Developer Survey came with surprises — a lot has changed in a year. You must think JavaScript or Python would be at the top, but the rankings are based on demand, not popularity. Companies are willing to pay more for niche languages, and today we're going to learn all about them.

1. Zig

Medium Yearly Salary: $103,611

Zig is a programming language focused on helping developers build reliable, efficient and reusable software.

Zig aims to create robust software that:

  • Works well in all situations, even edge cases.
  • Performs efficiently by using system resources optimally.
  • Can be reused in different environments.
  • Remains maintainable over time. The code is clear, so it is easy to fix issues later.

Zig balances high-level abstractions for productivity with low-level control for optimal performance.

Demo

Create hello.zig file with the hello world code.

const std = @import("std");    pub fn main() !void {      const stdout = std.io.getStdOut().writer();      try stdout.print("Hello, {s}!n", .{"world"});  }

Run it in the terminal.

$ zig build-exe hello.zig  $ ./hello  Hello, world!

Read the documentation to learn more about Zig Syntax and functions.

2. Erlang

Medium Yearly Salary: $99,492

Erlang is a programming language well-suited for building large, distributed systems that require high scalability, high availability, and fast performance. Ericsson originally designed Erlang in the mid-1980s for building telecommunications systems.

Erlang is a popular choice for building mission-critical, soft real-time systems in domains like telecommunications, banking, e-commerce, and instant messaging, where high availability, scalability, and responsiveness are essential. Erlang's runtime system provides built-in support for the concurrency, distribution, and fault tolerance features that the language relies on.

Demo

% hello world program  -module(helloworld).   -export([start/0]).     start() ->      io:fwrite("Hello, world!n").

Output:

Hello, world!

Learn the basic Erlang syntax on tutorialspoint.com.

3. F#

Medium Yearly Salary: $99,311

F# is a general-purpose, cross-platform programming language designed for functionality, interoperability and performance. Its main goals are to help developers write:

  • Succinct code: It focuses on writing code that is clear, concise and self-documenting by default.
  • Robust code: It uses powerful type providers and an advanced type system to catch errors at compile-time.
  • Performant code: Under the hood, F# code compiles to efficient .NET IL or JavaScript.

F# runs on the .NET Framework and offers seamless interoperability with other .NET languages like C# while also allowing you to target web and mobile through JavaScript compilation.

Key Feature:

  1. Minimal syntax makes code more readable.
  2. Variables are immutable by default, reducing bugs and making code easier to reason about.
  3. The compiler infers types for most variables, reducing boilerplate.
  4. Piping data between functions reduces intermediate variables.
  5. Asynchronous workflows make scalable, asynchronous code natural to write.
  6. Powerful pattern matching on unions, tuples, arrays, strings and more.
  7. Supports inheritance, interface implementation and encapsulation.
  8. Learn more features on the F# docs — get started, tutorials, reference.

Demo

Run the following command in terminal to create your app:

dotnet new console -lang F# -o MyApp -f net7.0

Navigate to the new directory

cd MyApp

Edit Program.fs file.

printfn "Hello World"

Run the following command in terminal to run the app:

dotnet run

4. Ruby

Medium Yearly Salary: $98,522

Ruby is an open-source, dynamic programming language that prioritizes productivity and simplicity. It was created in the mid-1990s by Yukihiro "Matz" Matsumoto and has gained popularity for web development, scripting, and general-purpose programming.

Ruby's elegant syntax is easy to read and write, and its object-oriented nature allows for flexibility. It is an interpreted language, which means that code can be executed directly without compilation, making development faster. Ruby has a large and active community of developers who contribute to its development, resulting in a rich ecosystem of libraries and tools.

Demo

Create a file hello.rb and add the code.

puts "Hello, world!"

Run the ruby file in terminal using:

ruby hello.rb

Output:

Hello, world!Hello, world!

5. Clojure

Medium Yearly Salary: $96,381

Clojure is a programming language that combines the ease of use and interactivity of a scripting language with the efficiency and robustness of a compiled language. It is especially good at handling multithreaded programming and has easy access to Java frameworks. Clojure is a dialect of Lisp and is predominantly a functional programming language. When a mutable state is needed, it offers a software transactional memory system and reactive agent system.

Demo

Start a Clojure REPL using the clj command in the terminal, then paste the below code to see the output.

(defn sum [numbers]    (reduce + numbers))    (println (sum [1 2 3 4 5]))

Output:

15  nil

Conclusion

In conclusion, the Stack Overflow Developer Survey has revealed that the demand for niche programming languages is on the rise, which is reflected in their high pay scales. While JavaScript and Python remain popular, companies are willing to invest more in developers who specialize in less mainstream languages. As a result, it's worth considering expanding your skill set to include one of the five highest-paid languages of the year, which include Zig, Erlang, F#, Clojure, and Ruby.

Additionally, you may want to explore the top four languages that have experienced an increase in salaries between 2022 and 2023.

5 Highest-paid Languages to Learn This Year
Image from Stack Overflow Developer Survey 2023

Abid Ali Awan (@1abidaliawan) is a certified data scientist professional who loves building machine learning models. Currently, he is focusing on content creation and writing technical blogs on machine learning and data science technologies. Abid holds a Master's degree in Technology Management and a bachelor's degree in Telecommunication Engineering. His vision is to build an AI product using a graph neural network for students struggling with mental illness.

More On This Topic

  • 6 Highest Paying Companies for Data Scientists
  • State of AI Report 2022: Be Prepared for Next Year
  • Top Programming Languages and Their Uses
  • 2021: A Year Full of Amazing AI papers — A Review
  • 2020: A Year Full of Amazing AI Papers — A Review
  • Data Science Programming Languages and When To Use Them

AI gold rush makes basic data security hygiene critical

data security concept

The ongoing obsession with artificial intelligence (AI), and generative AI specifically, signals a need for businesses to focus on security — but critical data protection fundamentals are still somewhat lacking.

Spurred largely by OpenAI's ChatGPT, growing interest in generative AI has pushed organizations to look at how they should use the technology.

Also: How to use ChatGPT: Everything you need to know

Almost half (43%) of CEOs say their organizations are already tapping generative AI for strategic decisions, while 36% use the technology to facilitate operational decisions. Half are integrating it with their products and services, according to an IBM study released this week. The findings are based on interviews with 3,000 CEOs across 30 global markets, including Singapore and the U.S.

The CEOs, though, are mindful of potential risks from AI, such as bias, ethics, and safety. Some 57% say they are concerned about data security and 48% are worried about data accuracy or bias. The study further reveals that 76% believe effective cybersecurity across their business ecosystems requires consistent standards and governance.

Some 56% say they are holding back at least one major investment due to the lack of consistent standards. Just 55% are confident their organization can accurately and comprehensively report information that stakeholders want concerning data security and privacy.

Also: ChatGPT and the new AI are wreaking havoc on cybersecurity in exciting and frightening ways

This lack of confidence calls for a rethink of how businesses should manage the potential threats. Apart from enabling more advanced social-engineering and phishing threats, generative AI tools also make it easier for hackers to generate malicious code, said Avivah Litan, VP analyst at Gartner, in a post discussing various risks associated with AI.

And while vendors that offer generative AI foundation models say they train their models to reject malicious cybersecurity requests, they do not provide customers with the tools to effectively audit the security controls that have been put in place, Litan noted.

Employees, too, can expose sensitive and proprietary data when they interact with generative AI chatbot tools. "These applications may indefinitely store information captured through user inputs and even use information to train other models, further compromising confidentiality," the analyst said. "Such information could also fall into the wrong hands in the event of a security breach."

Also: Why open source is essential to allaying AI fears, according to Stability.ai founder

Litan urged organizations to establish a strategy to manage the emerging risks and security requirements, with new tools needed to manage data and process flows between users and businesses that host generative AI foundation models.

Companies should monitor unsanctioned uses of tools, such as ChatGPT, leveraging existing security controls and dashboards to identify policy violations, she said. Firewalls, for instance, can block user access, while security information and event management systems can monitor event logs for policy breaches. Security web gateways can also be deployed to monitor disallowed application programming interface (API) calls.

Most organizations still lack the basics

Foremost, however, the fundamentals matter, according to Terry Ray, senior vice president for data security and field CTO at Imperva.

The security vendor now has a team dedicated to monitoring developments in generative AI to identify ways it can be applied to its own technology. This internal group did not exist a year ago, but Imperva has been using machine learning for a long time, Ray said, noting the rapid rise of generative AI.

Also: How does ChatGPT work?

The monitoring team also vets the use of applications, such as ChatGPT, among employees to ensure these tools are used appropriately and within company policies.

Ray said it still was too early to determine how the emerging AI model could be incorporated, adding that some possibilities could surface during the vendor's annual year-end hackathon, when employees would probably offer some ideas on how generative AI could be applied.

It's also important to state that, until now, the availability of generative AI has not led to any significant change in the way organizations are attacked, with threat actors still sticking mostly to low-hanging fruits and scouring for systems that remain unpatched against known exploits.

Asked how he thought threat actors might use generative AI, Ray suggested it could be deployed alongside other tools to inspect and identify coding errors or vulnerabilities.

APIs, in particular, are hot targets as they are widely used today and often carry vulnerabilities. Broken object level authorization (BOLA), for instance, is among the top API security threats identified by Open Worldwide Application Security Project. In BOLA incidents, attackers exploit weaknesses in how users are authenticated and succeed in gaining API requests to access data objects.

Such oversights underscore the need for organizations to understand the data that flows over each API, Ray said, adding that this area is a common challenge for businesses. Most do not even know where or how many APIs they have running across the organization, he noted.

Also: People are turning to ChatGPT to troubleshoot their tech problems now

There is likely an API for every application that is brought into the business, and the number further increases amid mandates for organizations to share data, such as healthcare and financial information. Some governments are recognizing such risks and have introduced regulations to ensure APIs are deployed with the necessary security safeguards, he said.

And where data security is concerned, organizations need to get the fundamentals right. The impact from losing data is significant for most businesses. As custodians of the data, companies must know what needs to be done to protect data.

In another global IBM study that polled 3,000 chief data officers, 61% believe their corporate data is secure and protected. Asked about challenges with data management, 47% point to reliability, while 36% cite unclear data ownership, and 33% say data silos or lack of data integration.

The rising popularity of generative AI might have turned the spotlight on data, but it also highlights the need for companies to get the basics right first.

Also: With GPT-4, OpenAI opts for secrecy versus disclosure

Many have yet to even establish the initial steps, Ray said, noting that most companies typically monitor just a third of their data stores and lakes.

"Security is about [having] visibility. Hackers will take the path of least resistance," he said.

Also: Generative AI can make some workers a lot more productive, according to this study

A Gigamon study released last month found that 31% of breaches were identified after the fact, either when compromised data popped up on the dark web, or when files became inaccessible, or users experienced sluggish application performance. This proportion was higher, at 52%, for respondents in Australia and 48% in the U.S., according to the June report, which polled more than 1,000 IT and security leads in Singapore, Australia, EMEA, and the U.S.

These figures were in spite of 94% of respondents saying their security tools and processes offered visibility and insights into their IT infrastructure. Some 90% said they had experienced a breach in the past 18 months.

Asked about their biggest concerns, 56% pointed to unexpected blindspots. Some 70% admitted they lacked visibility into encrypted data, while 35% said they had limited insights into containers. Half lacked confidence in knowing where their most sensitive data was stored and how the information was secured.

"These findings highlight a trend of critical gaps in visibility from on-premises to cloud, the danger of which is seemingly misunderstood by IT and security leaders around the world," said Gigamon's security CTO Ian Farquhar.

"Many don't recognize these blindspots as a threat… Considering over 50% of global CISOs are kept up at night by the thought of unexpected blindspots being exploited, there's seemingly not enough action being taken to remediate critical visibility gaps."

Artificial Intelligence

Google is Counting Years Instead of Qubits

Google Quantum Computer

We still have to come to a conclusion if quantum computing is ever going to be useful or is it just a failed cause. While this happens, big-tech companies are pushing towards achieving quantum supremacy, without realising if it would be beneficial for speeding up systems beyond classical computers or not.

Along these lines, Google has made a huge claim. The company recently announced that it has created a quantum computer that is almost 47 years ahead of its competitors as it performs calculations within seconds that top-performing supercomputers take years to perform. Google is ready to say that they are over classical computing and are ready to move to quantum computing as the new processor has 70 operational qubits.

Sebastian Weidt from Universal Quantum said, “This is a very nice demonstration of quantum advantage. While a great achievement academically, the algorithm used does not really have real world practical applications though.” It highlights how we need to get to the utility of quantum computing, where the thousands of qubits actually deliver value to society.

History of tall claims

The past hasn’t been great for Google and quantum computing – a history of tall claims. In a declaration made four years ago, Google asserted that it had become “quantum supremacy,” a pivotal milestone indicating that quantum computers had surpassed their conventional counterparts.

At that time, the company claimed that its Sycamore supercomputer performs abstruse calculations in 200 seconds, that others would do in 10,000 years. The company had also claimed its supremacy back from IBM by saying that it had a working 72-qubit processor in 2018, when IBM had a 50-qubit processor.

During that period, Google faced opposition from competitors who contended that the disparity between their machine and traditional supercomputers was being exaggerated. IBM called out Google’s claim saying that the claim of doing something that classical computers can’t is still unmatched.

Now, Sergio Boixo, the principal scientist of Google Quantum AI, acknowledged in a written communication that the Google team was aware that their advantage may not remain sustainable for an extended period. “In our 2019 publication, we stated that classical algorithms would make advancements,” Boixo explained. However, he emphasised that they do not believe this classical methodology can match the progress of quantum circuits in 2022 and the years ahead.

Realising the quantum dream

Google is supposedly making this claim come true now. In April, Google published another research paper titled “Phase Transition in Random Circuit Sampling” presenting a more advanced quantum device, intended to settle the ongoing debate. Comparing to the 2019 Sycamore that consisted of 53 qubits, the fundamental units of quantum computers, the latest-generation device incorporates 70 qubits.

In the research paper co-authored by Google Quantum AI and its partners, the company’s AI division has announced positive outcomes from their experimental endeavours in Random Circuit Sampling (RCS). The authors highlight RCS as the most promising candidate for demonstrating capabilities beyond classical systems, as it maximises the propagation of quantum correlation at high speeds.

To elaborate, RCS involves randomly selecting gates within a defined and efficient quantum circuit, which generates samples based on the resulting distribution of outputs. Employing this methodology enabled the Google team to discern significant phases in the conducted experiments, arising from the interplay between quantum dynamics phenomena and noise.

Although the recent experiments conducted by Google Quantum AI mark a significant advancement in the field of quantum computing, the team acknowledges that further efforts are necessary. In their paper, the team states, “Despite the accomplishments attained thus far with RCS, the identification of practical applications for near-term noisy quantum processors continues to present a significant challenge.”

Catching up

Google is not the only one who is in the quantum race though. IBM, the first name that pops in the, is possibly miles ahead. But the other tech-giant, Microsoft, has been making big claims about quantum supremacy as well.

Microsoft recently shared its roadmap for building a quantum supercomputer. In the virtual event, Azure Quantum: Accelerating Scientific Discovery, Satya Nadella said the company’s goal is to make the discovery quicker. For this, the company has announced its roadmap for building one using the topological qubits, which the company has been working on for some years now.

Krysta Svore, Microsoft’s VP of advanced quantum development, told TechCrunch that even though there are a lot of milestones ahead, it will take less than a decade for the company to build its quantum supercomputer, which would be able to perform one million quantum operations per second.

Moreover, last year Microsoft made a major breakthrough in quantum computing. Researchers developed a new type of Majorana-based qubit, which is a fundamental component of quantum supercomputers. These qubits are more stable and easier to scale up resulting in the need for fewer of them.

Clearly, the road ahead for quantum is still a long one. For the big-tech, it comes with competition. Everyone can keep making claims and combining qubits, but Google should possibly start making use of its quantum technology, instead of comparing it with others, and claim it supremacy then.

The post Google is Counting Years Instead of Qubits appeared first on Analytics India Magazine.

MPT-30B: MosaicML Outshines GPT-3 With A New LLM To Push The Boundaries of NLP

Featured Blog Image-MPT-30B: MosaicML Outshines GPT-3 With A New LLM To Push The Boundaries of Language Models

MosaicML is a generative AI company that provides AI deployment and scalability solutions. Their latest large language model (LLM) MPT-30B is making waves across the AI community.

MosaicML’s LLM journey started with the release of MPT-7B (Mosaic Pretrained Transformer) in May 2023 which came with three variants:

  1. MPT-7B-StoryWriter-65k+ (for long-form story generation)
  2. MPT-7B-Instruct (for short-form instruction following)
  3. MPT-7B-Chat (for dialogue generation)

The models witnessed massive success in the ML community because of their open-source nature, commercial usability, and exceptional capability to handle extended context windows.

Most importantly, the model was at par and, in some cases, outperformed the other comparable models (LLaMA-7B, StableLM 7B, etc). By June, the MPT-7B series had been downloaded over 3 million times. On 22nd June, MosaicML released MPT-30B which raised the bar even further for open-source foundation models.

The MPT-30B: A Powerful LLM That Exceeds GPT-3

MPT-30B is an open-source and commercially licensed decoder-based LLM that is more powerful than GPT-3-175B with only 17% of GPT-3 parameters, i.e., 30B. It outperforms GPT-3 on several tasks. Here’s a comparison between MPT-30B and GPT-3.

The MPT-30B: A Powerful LLM That Exceeds GPT-3-GPT3-vs-MPT-30B-Comparison

Source

MPT-30B builds upon the previous MPT-7B model. It is computationally efficient to train compared to models with similar sizes. For instance, LLaMA-30B used approximately 1.44 times more FLOPs budget than MPT-30B, while Falcon-40B had a 1.27 times higher FLOPs budget than MPT-30B. Here’s an illustration of MPT-30B’s improvement on various tasks over its predecessor.

The MPT-30B: A Powerful LLM That Exceeds GPT-3-MPT-30B-MPT-7B-Comparison

Source

Some special features of MPT-30B are as follows:

8k Token Context Window

Context window in LLMs refers to the range of tokens the model can consider before generating the output. MPT-30B had a context window of 8000 tokens at training time. It was first trained on 1T token using 2k token sequences and then an additional 50B tokens of 8k token sequences (roughly 6000 words).

ALiBi Support

To explain this feature, let’s consider a question:

How can MPT-30B understand and make predictions for longer sequences than what it was trained on?

MPT-30B uses an Attention with Linear Biases (ALiBi) technique to understand longer sequences and extend the context window beyond 8k tokens during finetuning or inference.

Instead of calculating positional embeddings in which we assign a vector to each word in the sequence, ALiBi calculates attention scores between key and query tokens. When the key and query tokens are close together, the penalty is low but higher otherwise. As a result, the underlying transformer architecture can extrapolate to long-form inputs.

Efficient Inference & Training Performance via FlashAttention

Attention i.e., focusing on relevant parts of the input sequence, is a critical component of transformers, but it can be slow and memory-intensive, especially when processing long text sequences.

FlashAttention is an approach proposed by researchers at Cornell University that addresses this problem for MPT-30B. Using a technique called tiling, FlashAttention reduces the number of times the model needs to read from or write to memory, speeding up the processing. Hence, the model employs the state-of-the-art FlashAttention technique and NVIDIA’s FasterTransformer optimization library for efficient training and inference.

Ease of Training & Deployment

Developers can train MPT-30B from scratch or use MosaicML’s checkpoints for quicker deployments. Also, it can be finetuned for domain-specific use cases on a particular dataset.

The model's size was chosen to enable effortless deployment on a single GPU, specifically 1xA100-80GB in 16-bit precision or 1xA100-40GB in 8-bit precision. This means that the model was designed to fit within the memory limitations of these GPUs.

Coding Capabilities

MPT-30B provides exceptional coding capabilities as well. HumanEval is a dataset released by OpenAI that contains 164 handcrafted programming problems. On the HumanEval dataset, the model surpasses purpose-built LLM models, such as the StarCoder series.

Coding Capabilities

Source

Fine-Tuned Variants: MPT-30B-Instruct & MPT-30B-Chat

MPT-30B-Instruct

LLMs are primarily used for instructions such as question answering, text summarization, language translation, etc. MPT-30B-Instruct is a commercially usable (maintains commercial CC-By-SA-3.0 license) variant of MPT-30B fine-tuned specifically for instruction following tasks. For fine-tuning, the following datasets were used:

  1. FLAN
  2. P3
  3. Alpaca
  4. Dolly-15k

The Dolly dataset was further augmented with Anthropic’s Helpful and Harmless dataset for instruction finetuning. Additionally, a diverse range of datasets were used for data augmentation, which are as follows:

  1. CompetitionMath
  2. GradeSchoolMath
  3. DialogSum
  4. DuoRC
  5. QASPER
  6. QuALITY
  7. SummScreen
  8. Spider

MPT-30B-Chat

MPT-30B-Chat is a fine-tuned version of MPT-30B for dialogue generation. It is a research artifact released under the CC-By-NC-SA-4.0 license, allowing only non-commercial use. The model was fine-tuned using various language datasets, including:

  1. Airoboros/GPT4-1.2
  2. Baize
  3. Camel
  4. GPTeacher
  5. Guanaco
  6. LongCoversations
  7. ShareGPT
  8. WizardLM

LLMs share a big chunk of the multi-billion dollar generative AI market, which has experienced tremendous growth in no time after ChatGPT revolutionized the landscape last year. The MPT family is a foundational part of this revolution. In the near future, we can expect to see commercially available open-source models that are far more powerful and efficient than the MPT family.

For the latest AI news, visit unite.ai.