Photoshop’s new generative AI feature lets you ‘uncrop’ images

Photoshop’s new generative AI feature lets you ‘uncrop’ images Kyle Wiggers 8 hours

Adobe is building on Firefly, its family of generative AI models, with a feature in Photoshop that “expands images beyond their original bounds,” as the company describes it.

Aptly called Generative Expand, the capability, available in the beta version of Photoshop, lets users expand and resize images by clicking and dragging the Crop tool, which expands the canvas. After clicking the “Generate” button in Photoshop’s contextual taskbar, Generative Expand fills the new white space with AI-generated content that blends in with the existing image.

“Suppose your subject is cut off, your image isn’t in the aspect ratio you want or an object in focus is misaligned with other parts of the image,” Adobe writes in a blog post shared with TechCrunch. “You can use Generative Expand to expand your canvas and get your image to look like anything you can imagine.”

Generated content can be added to a canvas via Generative Expand with or without a text prompt. But when using a prompt, expanded images will include any content mentioned in the prompt.

Generated content is added as a new layer in Photoshop, allowing users to discard it if they deem it not up to snuff.

Adobe Generative Expand

An image before Generative Expand has been applied to it. Image Credits: Adobe

Adobe Generative Expand

Photoshop’s Generative Expand, applied to the original image. Image Credits:Adobe

Generative Expand isn’t an especially novel feature in the field of generative AI. OpenAI has long offered an “uncropping tool” via DALL-E 2, its text-to-art AI model, as have platforms such as Midjourney and Stability AI’s DreamStudio.

But native integration with Photoshop is clearly Adobe’s play, here — and, given that Photoshop had an estimated 29 million members worldwide, it’s a strategic one.

Alongside Generative Expand, Adobe announced that it’s bringing support for Photoshop’s Firefly-powered text-to-image features — which the company claims have been used to generate more than 900 images to date — to over 100 languages, including Arabic, Czech, Greek and Thai. Both the expanded language support and Generative Expand are available in the Photoshop beta as of today.

Netflix Offers Whopping $900,000 for AI Product Manager Position 

AI in Hollywood

Amidst the current strike by actors and writers demanding improved compensation, Hollywood is investing heavily in AI. Netflix, for instance, has offered an astounding $900,000 limit for the salary on a single AI product manager, raising eyebrows and intensifying the debate over Hollywood’s priorities.

The job description of the product manager at Netflix mentioned that they would use AI in all parts of the company’s work, like improving content creation and purchasing. They would also use AI in more regular ways, like customising content suggestions for users.

“So $900k/yr per soldier in their godless AI army when that amount of earnings could qualify thirty-five actors and their families for SAG-AFTRA health insurance is just ghoulish,” actor Rob Delaney, who had a lead role in the “Black Mirror” episode, told The Intercept. “Having been poor and rich in this business, I can assure you there’s enough money to go around; it’s just about priorities.”

From May, this year, roughly 11,500 members of the Writers Guild Academy (WGA) have been on strike because they’ve been forced into a ‘gig economy’ because of changes brought by the streaming era. They are employed on a weekly and episodic basis with no job security, health benefits, pension plans or even paid parental leave.

Writers also have to pay their lawyers and agents from their meagre salaries, while there is no security that they’ll be paid all year. The strike has shut down the production of late night shows such as ‘Jimmy Kimmel Live’ among others.

WGA was then joined by Screen Actors Guild (SAG); the two unions had a joint strike back in the 1960s due to payment problems. Now, after sixty years, actors and writers are walking out again due to contract disagreements. The concern for better pay may resonate with older actors and actresses, but newer issues like streaming royalties and the impact of A.I. may seem worrisome and reminiscent of the themes in George Orwell’s “1984” to those from Old Hollywood.

While other industries are still struggling to find the real case of generative, Hollywood seems to have a definite answer. In the coming days, other production houses will also join the AI league of Netflix, making writers and other prominent artists in the film industry obsolete.

The post Netflix Offers Whopping $900,000 for AI Product Manager Position appeared first on Analytics India Magazine.

6 Brilliant Video Resources on Generative AI by Andrej Karpathy

Former AI director at Tesla Andrej Karpathy returned to OpenAI pretty recently. He came to fame for his immense contribution working alongside Elon Musk to create “Optimus,” a groundbreaking humanoid robot. Additionally, Andrej played a pivotal role as the head of Tesla Autopilot’s computer vision team.

He released NanoGPT, a fast repository for training and tuning medium-sized GPTs, building upon his earlier work with miniGPT for GPT language models. His latest project is baby Llama which he made by tuning nanoGPT to use the Llama 2 architecture instead of GPT-2.

Apart from his big contributions to generative AI, the computer vision genius has been a huge contributor to the open-source community through his mini projects, educational resources, coding tutorials on YouTube and more.

He’s also known for creating courses on building deep neural networks, including NanoGPT, based on GPT-2/GPT-3 and the ‘Attention is All You Need’ paper. Here are some of the free important resources for you.

Let’s build GPT from Scratch

In this two hour long youtube video, Karpathy takes you on a journey to build a GPT model, based on Google’s research paper “Attention is All You Need” and OpenAI’s GPT-2 and GPT-3. To help the audience grasp the concepts better, he suggests watching earlier make more videos, which cover autoregressive language modelling framework and the fundamentals of tensors and PyTorch nn, essential knowledge they assume viewers already possess in the current video. The video is a great resource for anyone who wants to learn more about how GPT works or how to build their own GPT model. It is also a good introduction to the attention mechanism, which is a powerful tool for natural language processing.

State of GPT

If you want to learn more about the training process of GPT assistants like ChatGPT, this video is most suitable for you. It covers tokenization, pretraining, supervised finetuning, and Reinforcement Learning from Human Feedback (RLHF). Additionally, you will also get to know about practical approaches and conceptual frameworks for utilising these models effectively. This includes prompting strategies, finetuning techniques, the ever-expanding toolkit available, and potential future advancements in this field.

Intro to Neural Networks and Backpropagation: Building Micrograd

One of his most admired videos of all time, in this comprehensive guide to backpropagation and neural network training, Karpathy presents a highly detailed and easily understandable explanation. The tutorial assumes minimal prerequisites, needing only a fundamental understanding of Python and basics of high school-level calculus. By breaking down complex concepts into step-by-step instructions, Karpathy ensures that you can understand the complexities of the subject without feeling overwhelmed.

The Spelled-Out Intro to Language Modeling: Building Makemore

By developing a bigram character-level language model as a starting point, Karpathy later advanced it into a contemporary Transformer language model similar to GPT. The main objectives of this particular video are to introduce the audience to torch.Tensor and its nuances, demonstrating its significance in the effective evaluation of neural networks; secondly, to provide an overview of the language modeling framework encompassing tasks such as model training, sampling, and evaluating loss measures like the negative log likelihood utilized in classification tasks. He has explained the process through five detailed videos.

Building Makemore: Activations & Gradients, BatchNorm

This video teaches you the working of internals of Multi-Layer Perceptrons (MLPs) encompassing multiple layers, primarily revolving around the analysis of especially the results of improper scaling. Moreover, the study focuses on the diagnostic tools and visualisations crucial for understanding how complex neural networks work. You will also learn about the fragility of training deep neural networks and discover the revolutionary technique known as Batch Normalisation, which greatly simplifies the process.

Building a WaveNet

By taking a 2-layer MLP (Multi-Layer Perceptron), Karpathy shows you how to turn it into a deeper neural network using a tree-like structure, similar to DeepMind’s WaveNet (2016) architecture. The WaveNet paper implements a more efficient version of this hierarchical structure using causal dilated convolutions, which are not yet covered in the video. Throughout the process, viewers gain a better understanding of torch.nn, how it works behind the scenes, and what a typical deep learning development process involves—like reading documentation, keeping track of tensor shapes, and switching between Jupyter notebooks and repository code.

The post 6 Brilliant Video Resources on Generative AI by Andrej Karpathy appeared first on Analytics India Magazine.

ChatGPT Code Interpreter: Do Data Science in Minutes

ChatGPT Code Interpreter: Do Data Science in Minutes
Image from Midjourney

As a data scientist, I’m always looking for ways to maximize efficiency and drive business value with data.

So when ChatGPT released one of its most powerful features yet?—?the Code Interpreter plugin, I simply had to try and incorporate it into my workflows.

What is ChatGPT Code Interpreter?

If you haven’t already heard about Code Interpreter, this is a new feature that allows you to upload code, run programs, and analyze data within the ChatGPT interface.

For the past year, every time I’ve had to debug code or analyze a document, I’d have to copy my work and paste it into ChatGPT to get a response.

This proved to be time-consuming and the ChatGPT interface has a character limit, which restricted my ability to analyze data and execute machine learning workflows.

The Code Interpreter solves all these issues by allowing you to upload your own datasets onto the ChatGPT interface.

And although it’s called the “Code Interpreter,” this feature isn’t limited to programmers?—?the plugin can help you analyze text files, summarize PDF documents, build data visualizations, and even crop images according to your desired ratio.

How Can You Access Code Interpreter?

Before we get into its applications, let’s quickly go through how you can start using the Code Interpreter plugin.

To access this plugin, you need to have a paid subscription to ChatGPT Plus, which is currently at $20 a month.

Unfortunately, Code Interpreter hasn’t been made available to users who aren’t subscribed to ChatGPT Plus.

Once you have a paid subscription, simply navigate to ChatGPT and click on the three dots at the bottom-left of the interface.

Then, select Settings:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Click on “Beta features” and enable the slider that says Code Interpreter:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Finally, click on “New Chat”, select the “GPT-4” option, and select “Code Interpreter” on the drop-down that appears:

You will see a screen that looks like this, with a “+” symbol near the text box:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Great! You have now successfully enabled ChatGPT Code Interpreter.

In this article, I will show you five ways in which you can use Code Interpreter to automate data science workflows.

1. Data Summarization

As a data scientist, I spend a lot of time just trying to understand the different variables present in the dataset.

Code Interpreter does a great job at breaking down each data point for you.

Here’s how you can get the model to help you summarize data:

Let’s use the Titanic Survival Prediction dataset on Kaggle for this example. I am going to be using the “train.csv” file.

Download the dataset and navigate to Code Interpreter:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Click on the “+” symbol and upload the file you want to summarize.

Then, ask ChatGPT to explain all the variables in this file in simple terms:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Voila!

Code Interpreter provided us with simple explanations of each variable in the dataset.

2. Exploratory Data Analysis

Now that we have an understanding of the different variables in the dataset, let’s ask Code Interpreter to go one step further and perform some EDA.

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

The model has generated 5 plots that allow us to better understand the different variables in this dataset.

If you click on the “Show work” drop-down, you will notice that Code Interpreter has written and run Python code to help us achieve the end result:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

You can always copy-paste this code into your own Jupyter Notebook if you’d like to perform further analysis.

ChatGPT has also provided us with some insight into the dataset based on the visualizations generated:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

It’s telling us that females, first-class passengers, and younger passengers had higher survival rates.

These are insights that would take time to derive by hand, especially if you aren’t well-versed with Python and data visualization libraries like Matplotlib.

Code Interpreter generated them in mere seconds, significantly reducing the amount of time consumed to perform EDA.

3. Data Preprocessing

I spend a lot of time cleaning datasets and preparing them for the modelling process.

Let’s ask Code Interpreter to help us preprocess this dataset:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Code Interpreter has outlined all the steps involved in the process of cleaning this dataset.

It’s telling us that we need to handle three columns with missing values, encode two categorical variables, perform some feature engineering, and drop columns that are irrelevant to the modelling process.

It proceeded to create a Python program that did all the preprocessing in mere seconds.

You can click on “Show Work” if you’d like to understand the steps taken by the model to perform the data cleaning:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Then, I asked ChatGPT how I could save the output file, and it provided me with a downloadable CSV file:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Note that I did not even have to run one line of code throughout this process.

Code Interpreter was able to ingest my file, run code within the interface, and provide me with the output in record time.

4. Building Machine-Learning Models

Finally, I asked Code Interpreter to use the preprocessed file to build a machine-learning model to predict whether a person would survive the Titanic shipwreck:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

It built the model in under a minute and was able to reach an accuracy of 83.2%.

It also provided me with a confusion matrix and classification report summarizing model performance, and explained what all the metrics represented:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

I asked ChatGPT to provide me with an output file mapping the model predictions with passenger data.

I also wanted a downloadable file of the machine learning model it created, since we can always perform further fine-tuning and train on top of it in the future:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author 5. Code Explanations

Another application of Code Interpreter that I found useful was its ability to come up with code explanations.

Just the other day, I was working on a sentiment analysis model and found some code on GitHub that was relevant to my use case.

I didn’t understand the entire code, as the author had imported libraries I wasn’t familiar with.

With Code Interpreter, you can simply upload a code file and ask it to explain each line clearly.

You can also ask it to debug and optimize the code for better performance.

Here is an example?—?I uploaded a file containing code I wrote years ago to build a Python dashboard:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Code Interpreter broke down my code and clearly outlined what was done in each section.

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

It also suggested refactoring my code for better readability and explained where I could include new sections.

Instead of doing this myself, I simply asked Code Interpreter to refactor the code and provide me with an improved version:

ChatGPT Code Interpreter: Do Data Science in Minutes
Image by Author

Code Interpreter rewrote my code to encapsulate each visualization into separate functions, making it easier to understand and update.

What Does ChatGPT Code Interpreter Mean For Data Scientists?

There is a lot of hype around Code Interpreter right now, since this is the first time we are witnessing a tool that can ingest code, understand natural language, and perform end-to-end data science workflows.

However, it is important to keep in mind that this is just another tool that is going to help us do data science more efficiently.

So far, I’ve been using it to build baseline models on dummy data, since I’m not allowed to upload sensitive company information onto the ChatGPT interface.

Furthermore, Code Interpreter does not have domain-specific knowledge. I generally use the predictions it generates as baseline forecasts?—?I often have to tweak the output it generates to match my organization’s use case.

I cannot present the numbers generated by an algorithm that has no visibility into the inner workings of the company.

Finally, I don’t use Code Interpreter for every project, since some of the data I work with comprise millions of rows and reside in SQL databases.

This means that I still have to perform much of the querying, data extraction, and transformation by myself.

If you are an entry-level data scientist or aspire to become one, I’d suggest learning how to leverage tools like Code Interpreter to get the mundane parts of your job done more efficiently.

That’s all for this article, thanks for reading!
Natassha Selvaraj is a self-taught data scientist with a passion for writing. You can connect with her on LinkedIn.

More On This Topic

  • Free ChatGPT Course: Use The OpenAI API to Code 5 Projects
  • 7 Ways ChatGPT Makes You Code Better and Faster
  • 7 Tips To Produce Readable Data Science Code
  • How to Use ChatGPT to Improve Your Data Science Skills
  • ChatGPT for Data Science Cheat Sheet
  • ChatGPT for Data Science Interview Cheat Sheet

The Copyright Tussle AI Companies are Sure to Win 

Is AI Copyright Really Necessary?

Last week, more than 8,000 published authors wrote an open letter to the founders of generative AI platforms. They addressed the letter to the CEO’s of all the big tech companies calling for fair compensation for using their copyrighted works to train their models.

This clash is yet another intellectual property issue that plagues AI development. In another interesting case, a U.S District Judge for the Northern District of California dismissed a majority of lawsuits filed by a group of artists. He did so asking for more evidence about the alleged copyright infringement from Stability AI’s relevant source code.

Here lies the problem

The problem with defining copyright isn’t one that came with generative AI. Historically, with the advent of any new technology there has been a massive overhaul in the laws of copyright claims.

For generative AI, Professor Pamela Samuelson, an esteemed scholar of Law and Information at UC Berkeley, raises three pivotal questions. Firstly, Whether making copies of works as training data for generative AI systems infringe copyright. Second, When are AI-generated outputs infringing derivative works, and then who owns copyright and the outputs of computer programs that are copyright subject matter? Lastly, Who, if anybody, owns that copyright now?

These questions address fundamental legal and ethical complexities surrounding generative AI, impacting the rights of original creators and the expanding domain of AI-driven innovations.

AI vs. Artists

In January 2006, a court held that search engines that copied internet content of copyrighted work for the purpose of indexing the contents was fair use and not infringement. The Field vs. Google lawsuit was important because the court held that digitising millions of copyright books from research libraries and serving up snippets in response to search queries and other computational uses was fair use.

Google wasn’t exploiting the expression of the work, it was just giving you a gist of the work when asked about it. Stability AI and other defendants use these cases to claim ‘fair use’ because web crawling the Internet to make copies of that for training purposes is actually a fair use and not an infringement.

“We figured these large tech firms were preparing larger sets of data they could use,” said John Degen, the Canadian organisation’s executive director. “We were right.” Practically, there is a distinction between making it easier for people to find the copyright owners’ works and training an AI model to make new content from training data ingesting copyrighted material. The artificially created images or text compete with the original data and the authors of the content didn’t consent to it.

According to that open letter, they think that it’s only fair that they should get compensated. Because the value of the material that’s being ingested is what makes the generative AI turn out good stuff. The argument is pretty strong for them. Otherwise, the generative AI systems produce garbage. The carefully curated works of authorship are things that somebody should get paid for, according to this perspective.

If copyright law only cares about protecting the original expression in a work. Well, that should be a factor because the people who were ingesting the works as training data don’t think about them in terms of their expression. They think about them more in terms of being raw material for computational uses and text and data mining has been widely thought to be fair use in the past.

Generative AI systems enable the creation of new works, and the constitutional purpose of copyright is about promoting the progress of science by which the founders meant knowledge and useful arts. Certainly, the generative AI systems can be said to advance that purpose, and fair use provides a little breathing room for new creation, and that may also bear on whether the ingestion is fair use or not.

The Japanese route

In April this year, Japan confirmed that their existing laws allow the use of data collected on the internet for both non-commercial and commercial purposes. There is no new policy that was rolled out but the copyright holders by the provisions of Japan’s existing text-and-data-mining exception from 2018.

Content used from illegal sites – compensation claims, injunctive relief and criminal penalties applies but it is very hard to prove that the language models have indeed scraped these sites without a confession from the companies themselves. Israel follows a similar principle with a few exceptions. Language models can’t be trained on specific datasets to compete with the original works. For example, you can’t train an AI model on the Game of Thrones series to derive works very similar to the original.

Germany also has sided with the technology, refusing to address the concerns of more than 140,000 authors and performers. The government sees no need for stricter regulations. Maximilian Funke-Kaiser, spokesman for digital policy, said, “Publishers and media companies also benefit from this technology, for example through AI-supported text generation.”

The European Union on the other hand requires companies deploying generative AI tools, to disclose any copyrighted materials used to develop their systems. This is the bare minimum and is considered fair but as we mentioned earlier the process to prove it is arduous and close to impossible. But according to Pamela Samuelson, this aligns with fair use according to copyright law. Training AI on material that is copyrighted and created a non-derivative original character using the AI is in the clear.

While you cannot copyright the style of anime, the unique style of drawing and storytelling is entirely owned by the and cannot be exactly regenerated. So what exactly are the claims in which companies are sued on copyright infringement? And why is it so hard to get them to share details of their training data instead?

The post The Copyright Tussle AI Companies are Sure to Win appeared first on Analytics India Magazine.

How India will Transform ChatGPT Forever

OpenAI launched ChatGPT back in November 2022 and since then, there has been no looking back for its web version. However, it gave them little opportunity to tap the Indian market as the majority of users do not have access to a desktop and are primarily user smartphones. According to the similarweb stats, in India 78.02% of traffic is generated from mobile users as compared to 21.39% from desktop.

Then later in May 2023, OpenAI released ChatGPT for the iOS Apple App store. While this move was commendable, it still presented a challenge from India’s perspective, where a vast majority of users do not own iPhones, primarily due to their higher price points. According to Statista, Android held a share of 95.26% of the mobile operating system market in India, which was followed by Apple’s iOS, a distant second, with 3.92%market share in 2022.

Launched this week in June, OpenAI’s decision to make this advanced language model available on the Google Android Play Store has opened up a world of possibilities for millions of users in India. The app has already garnered an impressive 1 million downloads in 24 hours of the launch.

The prospect of reaching and serving such a massive user base in India holds great promise for the future of ChatGPT.

Multilingual nation

By launching itself in India, ChatGPT has taken a significant step. It will introduce ChatGPT to a new user base with distinct needs and preferences. Gathering feedback from Indian users will help it identify areas for improvement and fine-tune the AI’s responses to be more contextually relevant and culturally sensitive.

India is known for its cultural richness and linguistic diversity, and it does not have a single national language specified in its constitution. As one moves across the country, they find a striking array of languages spoken by various communities including Hindi, Rajasthani, Gujarati, Marathi, Bengali, Oriya, Assamese, Sanskrit, Kashmiri, Punjabi and many more. By interacting with users in different languages, ChatGPT can learn from diverse language patterns and enhance its multilingual capabilities.

Moreover, India’s geographical expanse gives rise to diverse cultural practices. From the enchanting landscapes of Kashmir to the southern tip of Kanyakumari and the vibrant cultures of West Bengal to the vibrant traditions of Gujarat, each region boasts distinct habits and customs. Understanding the nuances of Indian culture and customs can help ChatGPT provide more contextually relevant and culturally appropriate responses, thus enhancing the user experience.

Access to authentic content

There is a wealth of knowledge that is not available on the internet and books and is transferred verbally from generation to generation. For instance, within the rural farming communities, this oral passing on knowledge plays a pivotal role . The knowledge shared among farmers is deeply rooted in their cultural heritage and adapted to the specific geographical and climatic conditions of their regions.

While interacting with ChatGPT in their local language they will pass on the knowledge to ChatGPT, which will increase its training data set. Additionally, farmers can interact with ChatGPT to seek advice, ask questions, and learn about modern farming practices. This collaborative approach will enable ChatGPT to better understand the unique challenges and needs of Indian farmers.

ChatGPT will become like one collective universal book containing the entire sea of knowledge from around the world. The unique prompts entered by Indians will trigger ChatGPT to generate new content which in turn will become its own data set.

Opportunity to become Mass App

It is a great opportunity for ChatGPT to become one of the most used and popular apps on the Google Play Store. Right now Meta’s WhatsApp and Instagram hold the top two positions. There is a possibility that Google search might see a decrease in usage as ChaGPT provides you with exact information you ask for without going through different web pages. With its mobile availability, ChatGPT will offer convenience and flexibility, while its simple interface ensures a seamless user experience. Notably, users can now interact with the app using voice prompts, adding an extra layer of convenience. Its main competitor, Google’ Bard hasn’t come out with an Android app yet, which gives ChatGPT a good first mover advantage.

The post How India will Transform ChatGPT Forever appeared first on Analytics India Magazine.

AWS’ Amazon Bedrock adds more Foundation Models and Generative AI Capabilities with Cohere, Stability AI, and Anthropic

Amazon Web Services (AWS) announced at the AWS Summit in New York about their expansion plans for their fully managed foundation model service Amazon Bedrock. The latest foundation models of Cohere, Anthropic and Stability AI will be available on the platform. With Amazon Bedrock, customers can build and grow generative AI applications. They can access these models through an API without having to manage any technical capabilities.

Amazon Bedrock is already being used by Coda, Lonely Planet, Ryanair, Showpad and Travelers for their businesses. The recent announcement emphasises on how Amazon Bedrock offers customer choices and flexibility in finding the right foundational model for their needs.

A new, fully-managed feature called ‘Agents for Amazon Bedrock’ helps simplify processes for developers to create generative AI-based applications. Developers can set up these agents in a few simple steps, which then breaks down tasks and creates a plan without requiring manual coding. These agents connect company’s data through simple API and transform data into a machine readable format.

AWS’ Chief Technologist Olivier Klein in an exclusive interview with AIM said that Amazon Bedrock makes it easy for people to take existing pre-trained models, fine-tune them within one’s virtual private Cloud so that “you are in control of what the model is doing.” The company is giving everyone access to all these capabilities via Bedrock.

Amazon Continues to Win

Being one of the first marketplace-like platforms for foundation models, AWS is expanding its reach in a big way by bringing in significant players in the AI space. Anthropic Claude 2 will be available in addition to Cohere which is the newest player to be added onto the platform. Furthermore, exclusive launches are also being integrated onto the platform now. Stability AI announced their latest model Stable Diffusion XL 1.0 to be available on Amazon Bedrock for developers.

Amazon is ultimately winning by bringing developers to pay to use the APIs and infrastructure. According to data from Grand View Research, Bedrock is estimated to reach a valuation of $110 billion by 2030.

With big tech tie-ups happening in the space, the latest being Meta- Microsoft with Llama-2, Amazon’s race in Generative AI is a different route, one of bringing all all open source platforms to one place. Considering how OpenAI is also planning to come up with an app store-like marketplace for AI models, Amazon’s first-mover advantage has already placed them in the forefront.

The post AWS’ Amazon Bedrock adds more Foundation Models and Generative AI Capabilities with Cohere, Stability AI, and Anthropic appeared first on Analytics India Magazine.

AMD’s Zenbleed Exploit is Too Big to Handle for Enterprises

For the past few years, Intel has been facing flak over security flaws in its processors, but now it seems that it’s AMD’s turn. Security researchers have found a new exploit, titled Zenbleed in all AMD CPUs using the Zen 2 architecture which doesn’t even require physical hardware access, instead being able to be exploited remotely. When considering the fact that these chips have been deployed in the enterprise environment, it creates a huge security issue that companies can’t yet solve.

The chipmaker has already rolled out an update for EPYC 7002 series chips, which have seen heavy adoption by cloud service providers and other HPC clients. However, AMD is yet to release a firmware update that can solve this issue. AMD has stated that the problem has not been further exploited, but it is only a matter of time before malicious actors find a way to leverage the issue.

Now, the race has begun, as AMD tries to roll out a firmware update to fix the problem before it is exploited. However, considering the sluggish nature with which enterprises adopt security updates, the Zenbleed problem might be bigger than it seems.

Zenbleed explained

Processor-level exploits are nothing new. Intel’s Meltdown and Spectre exploits caused a huge uproar in the computer world when they were disclosed in 2018, and still are not patched completely. Zenbleed works similarly to these exploits, as it uses the internal workings of the CPU to leak sensitive data strings, such as passwords and other credentials.

The bug works by leveraging the limitations present in the CPU’s functioning known as XMM Register Merge Optimisations. At its base, it is a data leakage exploit, allowing a malicious actor to access the contents of CPU registers, which are commonly used to store short strings of text, which can include sensitive information like passwords.

Registers are software pointers to an area in the CPUs quick access memory, better known as cache. Similar to how deleted files aren’t actually deleted and just marked as empty space, regsters set to a zero value aren’t actually wiped, but instead marked as zero with a flag. If this zero flag is rolled back, the malicious actor can gain access to data stored in the registers’ storage, which is shared among all CPU cores.

By gaining access to a part of the storage that is marked free, hackers can glean the information that is being written to the storage, which can potentially contain sensitive knowledge like passwords and credentials. This data can be extracted at a rate of 30 KB per core per second, giving attackers a stream of potentially sensitive data.

This exploit, given the designation CVE-2023-20593 under the common vulnerabilities and exploits (CVE) database, was discovered by white hat hacker and Google vulnerability researcher Tavis Ormandy. As mentioned previously, the attack does not require physical access to the hardware, and can even be executed through malicious Javascript code in websites.

The issue affects a wide variety of CPUs, including Ryzen 3000, 4000, and 5000 chips manufactured using the Zen 2 process. According to a statement by AMD, these consumer chips will get an update in November to December of this year that will patch this vulnerability. The EPYC class of chips used in the enterprise servers has already been patched before the public disclosure of this vulnerability, as they are the juiciest targets for malicious hackers.

Currently, this bug can be fixed from the software level through the operating system, but the security researcher has found that this comes with a performance penalty. Even though AMD was quick in rolling out a fix to the problem, there is no solution to the sluggish nature of enterprise patching practices.

Patch hesitancy leaves enterprises vulnerable

Some of the top attack vectors and methods that swept through the enterprise could have easily been avoided by timely patching of vulnerable hardware and software. Ransomware such as WannaCry, NotPetya, and SamSam were able to impact such a large number of devices due to vulnerabilities exposed by patched issues, and this is a trend that is quite widespread.

A report released by Microsoft in 2015 showed that most of its customers are breached through vulnerabilities that the company patched years ago. Another piece of research shows that 80% of data breaches could have been prevented by patching an issue on time.

Add to this the statistic that organisations take on average 67 days to close a discovered vulnerability, and that 20% of vulnerabilities caused by unpatched software are high-risk or critical, and a disturbing picture of the enterprise begins to emerge. This isn’t even a resource problem; the seemingly simple problem of patching has a lot more pitfalls than are apparent.

According to a study, around 55% of companies revealed that they spend more time navigating the processes around patching than actually patching the issues. More than the sluggish nature of companies, research shows that around 72% of decision makers are also reluctant to push out patches in fear of breaking the infrastructure in some way.

To remedy this solution, the organisational approach to cybersecurity needs to change. Fernando Serto, chief technologist and evangelist, APJC, at Cloudflare, said to AIM, “My biggest recommendation for them is, they should be looking into how they can do the orchestration of [security] tools in the same way they do software development, because then it becomes very natural for them.”

While vulnerabilities like Zenbleed are fairly common, the real problem lies within the difficulty of rolling out the fixes. Also, security vulnerabilities get stronger the longer they are in the wild, so while Zenbleed might not be a big problem now, it might become the spearhead of a larger hack strategy.

The post AMD’s Zenbleed Exploit is Too Big to Handle for Enterprises appeared first on Analytics India Magazine.

Andrew Ng & HuggingFace Introduce New Course on Generative AI 

Prominent AI expert Andrew Ng is back with yet another short, free course called “Building Generative AI Applications with Gradio,” in collaboration with Hugging Face.

The course will teach you to create and demonstrate machine learning applications quickly. The course is designed for beginners and will be conducted by Apolinário Passos, ML Art Engineer at Hugging Face.

New course with @huggingface! Building Generative AI Applications with Gradio, taught by Apolinário Passos @apolinariosteps, shows you how to quickly create demos of your machine learning applications to test and iterate/share with others. Check it out! https://t.co/SQZK6y7fnI pic.twitter.com/GbrgLE1qIG

— Andrew Ng (@AndrewYNg) July 26, 2023

Throughout the course, participants will explore various tasks, including image generation, image captioning, and text summarisation, using Gradio. Gradio is an open-source Python library that enables rapid development of user-friendly and adaptable user interface components for your machine learning model or any API and allows you to build user-friendly applications even for non-coders.

With Gradio, you can effortlessly build intuitive graphical elements to interact with your models or APIs, making them accessible and customisable for users.

By the end of the one-hour course, you will have gained practical knowledge on how to develop interactive apps and demos, facilitating project validation and faster implementation.

Sign up for the course here.

Read more: Top 7 Generative AI Courses by Andrew Ng

Boosting AI Education

Amid mass layoffs and the fear of AI replacing jobs, the founder of DeepLearning.AI has been instrumental in AI literacy. He has said that AI and coding are important to society, that gaining AI and coding skills is empowering individuals, and that schools should teach it to every child.

His courses are comprehensive, covering an extensive range of topics in generative AI, including diffusion models, generative adversarial networks (GANs), and variational autoencoders (VAEs).

Earlier Ng has partnered with AWS, Google, OpenAI, Langchain and more such tech giants to offer free yet valuable courses on generative AI.

Remarkably, these courses are provided completely free of cost and can typically be completed within one to two hours, making them easily accessible and time-efficient.

Besides these short courses, Ng also provides specialised courses on more specific topics like AI for medicine, TensorFlow practices, ethical AI and more.

Read more: Top 10 Free Specialised Courses by Andrew Ng

The post Andrew Ng & HuggingFace Introduce New Course on Generative AI appeared first on Analytics India Magazine.

LMQL: The Cure for LLM Chatbot Hallucination?

Large Language Models don’t always respond correctly to your questions. They are difficult to control because the user cannot fully understand what goes on inside them. Recently, there are a lot of complaints about LLM chatbots hallucinating, giving unsatisfactory responses, and a good option to fix it, is to improve prompting techniques. Language Model Query Language (LMQL) solves this issue by combining language prompting with simple scripting.

Researchers from ETH Zurich wrote a paper titled ‘Prompting is Programming’ an emerging discipline of clever prompting, which is an intuitive combination of natural language and programming language prompts. Users can specify constraints on a language model’s output, get it to perform multiple tasks at the same time by providing high-level semantics.

How does it work?

LMQL is a declarative programming language, meaning the language states only what the end result of the task is and abstracts the control flow of logic required for the software to perform the action. It is inspired by SQL but integrates Python into its framework. Users can ask the model prompts that contain both text and code.

The language grammar, according to the paper, has five essential parts. The decoder, as the name suggests, decodes the algorithm that generates the text. It is a string of code which transforms the output into meaningful results, improving the quality and diversity of words.

The Query block written in python syntax serves as the core interaction mechanism with the language model. Each top-level string within the query block is a direct query to the language model. The Model/from clause specifies the model being queried. This defines the underlying language model used for text generation and Where Clause on the other hand allows users to define the constraints that influence the generated output. It defines the output required by the language model to stick to the desired qualities.

And finally, Distribution Instructions, which is an optional instruction, guides the distribution of generated values. It defines how the generated results should be distributed and presented, enabling the user to control the outcome’s format and structure.

Control the interaction

For simple queries, users can guide the language model using natural language, but when the tasks increase in complexity and when the user requires responses to specific questions it is better to have full control of the query. If yodu’re tech savvy, even for simple tasks like asking the model to tell you a joke, you can be in full control of the result you wish to get.

LMQL offers a dedicated Playground IDE to make query development easier. Users can examine the interpreter’s status, validation outcomes, and model responses at any stage of text generation. This comprises the capability to analyze and explore various hypotheses produced during beam search, providing useful insights to refine the language model’s behavior.

Efficiency and performance are a big challenge according to the paper. Despite being more efficient, the inference step in modern Language Models rely on costly, high-end GPUs to achieve satisfactory performance.

With LMQL, the generation of text closely aligned with desired output becomes possible in the first attempt, eliminating the need for subsequent iterations. The evaluations show that LMQL improves accuracy in various tasks while significantly reducing the computational costs in pay-to-use APIs. This translates to an impressive cost savings ranging from 13% to 85%.

One of the author’s of LMQL said on HackerNews, “Cost is definitely a dimension we are considering (research has limited funding after all), especially with the OpenAI API. Lock-step token-level control is difficult to implement with the very limited OpenAI API. As a solution to this, we implement speculative execution, allowing us to lazily validate constraints against the generated output, while still failing early if necessary. This means, we don’t re-query the API for each token (very expensive), but rather can do it in segments of continuous token streams, and backtrack where necessary.”

Language Model Programming

This isn’t the first hybrid approach to prompt engineering. Jargon, SudoLang, and prlang all do something similar. “LLMs+PLs is a very interesting field right now, with lots of directions to explore,” said another author of LMQL. They offer users the ability to express both common and advanced prompting techniques in a simple and concise manner.

But if you can use any programming language on LLMs, why learn a specific query language like LMQL?

LMQL gives you a concise way to define multi-part prompts and enforce constraints on LLMs. For instance, you can make sure the model always adheres to a specific output format, where parsing of the output is automatically taken care of. Also abstracts a number of things like APIs and local models, tokenisation, optimisation and makes tool integration (e.g. tool function calls during LLM reasoning) much easier. This is also language model agnostic, improving portability and can be used across LLMs.

Language Model Programming (LMP) makes it easier to adapt language models for different tasks while abstracting the model’s internals and providing high-level semantics. LMQL represents a promising development, as evidenced by its ability to enhance the efficiency and accuracy of language model programming. It empowers users to achieve their desired results with fewer resources, making text generation more accessible and efficient.

The post LMQL: The Cure for LLM Chatbot Hallucination? appeared first on Analytics India Magazine.