Top 10 LLM Vulnerabilities

Top 10 LLM Vulnerabilities

In artificial intelligence (AI), the power and potential of Large Language Models (LLMs) are undeniable, especially after OpenAI’s groundbreaking releases such as ChatGPT and GPT-4. Today, there are numerous proprietary and open-source LLMs in the market that are revolutionizing industries and bringing transformative changes in how businesses function. Despite rapid transformation, there are numerous LLM vulnerabilities and shortcomings that must be addressed.

For instance, LLMs can be used to conduct cyberattacks like spear phishing by generating human-like personalized spear phishing messages in bulk. Latest research shows how easy it is to create unique spear phishing messages using OpenAI’s GPT models by crafting basic prompts. If left unaddressed, LLM vulnerabilities could compromise the applicability of LLMs on an enterprise scale.

An illustration of an LLM-based spear phishing attack

An illustration of an LLM-based spear phishing attack

In this article, we’ll address major LLM vulnerabilities and discuss how organizations could overcome these issues.

Top 10 LLM Vulnerabilities & How to Mitigate Them

As the power of LLMs continues to ignite innovation, it is important to understand the vulnerabilities of these cutting-edge technologies. The following are the top 10 vulnerabilities associated with LLMs and the steps required to address each challenge.

1. Training Data Poisoning

LLM performance is heavily reliant on the quality of training data. Malicious actors can manipulate this data, introducing bias or misinformation to compromise outputs.

Solution

To mitigate this vulnerability, rigorous data curation and validation processes are essential. Regular audits and diversity checks in the training data can help identify and rectify potential issues.

2. Unauthorized Code Execution

LLMs' ability to generate code introduces a vector for unauthorized access and manipulation. Malicious actors can inject harmful code, undermining the model’s security.

Solution

Employing rigorous input validation, content filtering, and sandboxing techniques can counteract this threat, ensuring code safety.

3. Prompt Injection

Manipulating LLMs through deceptive prompts can lead to unintended outputs, facilitating the spread of misinformation. By developing prompts that exploit the model's biases or limitations, attackers can coax the AI into generating inaccurate content that aligns with their agenda.

Solution

Establishing predefined guidelines for prompt usage and refining prompt engineering techniques can help curtail this LLM vulnerability. Additionally, fine-tuning models to align better with desired behavior can enhance response accuracy.

4. Server-Side Request Forgery (SSRF) Vulnerabilities

LLMs inadvertently create openings for Server-Side Request Forgery (SSRF) attacks, which enable threat actors to manipulate internal resources, including APIs and databases. This exploitation exposes the LLM to unauthorized prompt initiation and the extraction of confidential internal resources. Such attacks circumvent security measures, posing threats like data leaks and unauthorized system access.

Solution

Integrating input sanitization and monitoring network interactions prevents SSRF-based exploits, bolstering overall system security.

5. Overreliance on LLM-generated Content

Excessive reliance on LLM-generated content without fact-checking can lead to the propagation of inaccurate or fabricated information. Also, LLMs tend to “hallucinate,” generating plausible yet entirely fictional information. Users may mistakenly assume the content is reliable due to its coherent appearance, increasing the risk of misinformation.

Solution

Incorporating human oversight for content validation and fact-checking ensures higher content accuracy and upholds credibility.

6. Inadequate AI Alignment

Inadequate alignment refers to situations where the model's behavior doesn't align with human values or intentions. This can result in LLMs generating offensive, inappropriate, or harmful outputs, potentially causing reputational damage or fostering discord.

Solution

Implementing reinforcement learning strategies to align AI behaviors with human values curbs discrepancies, fostering ethical AI interactions.

7. Inadequate Sandboxing

Sandboxing involves restricting LLM capabilities to prevent unauthorized actions. Inadequate sandboxing can expose systems to risks like executing malicious code or unauthorized data access, as the model may exceed its intended boundaries.

Solution

For ensuring system integrity, forming a defense against potential breaches is crucial which involves robust sandboxing, instance isolation, and securing server infrastructure.

8. Improper Error Handling

Poorly managed errors can divulge sensitive information about the LLM's architecture or behavior, which attackers could exploit to gain access or devise more effective attacks. Proper error handling is essential to prevent inadvertent disclosure of information that could aid threat actors.

Solution

Building comprehensive error-handling mechanisms that proactively manage various inputs can enhance the overall reliability and user experience of LLM-based systems.

9. Model Theft

Due to their financial value, LLMs can be attractive targets for theft. Threat actors can steal or leak code base and replicate or use it for malicious purposes.

Solution

Organizations can employ encryption, stringent access controls, and constant monitoring safeguards against model theft attempts to preserve model integrity.

10. Insufficient Access Control

Insufficient access control mechanisms expose LLMs to the risk of unauthorized usage, granting malicious actors opportunities to exploit or abuse the model for their ill purposes. Without robust access controls, these actors can manipulate LLM-generated content, compromise its reliability, or even extract sensitive data.

Solution

Strong access controls prevent unauthorized usage, tampering, or data breaches. Stringent access protocols, user authentication, and vigilant auditing deter unauthorized access, enhancing overall security.

Ethical Considerations in LLM Vulnerabilities

Ethical Considerations in LLM Vulnerabilities

The exploitation of LLM vulnerabilities carries far-reaching consequences. From spreading misinformation to facilitating unauthorized access, the fallout from these vulnerabilities underscores the critical need for responsible AI development.

Developers, researchers, and policymakers must collaborate to establish robust safeguards against potential harm. Moreover, addressing biases ingrained in training data and mitigating unintended outcomes must be prioritized.

As LLMs become increasingly embedded in our lives, ethical considerations must guide their evolution, ensuring that technology benefits society without compromising integrity.

As we explore the landscape of LLM vulnerabilities, it becomes evident that innovation comes with responsibility. By embracing responsible AI and ethical oversight, we can pave the way for an AI-empowered society.

Want to enhance your AI IQ? Navigate through Unite.ai‘s extensive catalog of insightful AI resources to amplify your knowledge.

Cloudera and AWS Forge Strategic Collaboration to Enhance Data Solutions

cloudera

Cloudera, the data company specializing in enterprise AI, has officially entered into a Strategic Collaboration Agreement (SCA) with Amazon Web Services, Inc. (AWS). This agreement implies that Cloudera is committed to making cloud-based data management and analytics on AWS better and more widespread. Cloudera will harness AWS services to foster ongoing innovation and cost efficiency for customers using the Cloudera open data lakehouse on AWS, specifically tailored for enterprise generative AI.

The company is part of the AWS Independent Software Vendor (ISV) Workload Migration Program (WMP) Partner ecosystem. They also have a Cloudera Data Platform (CDP) Public Cloud listing on the AWS Marketplace. This makes it easier for customers to use credits for faster cloud workload migration and CDP procurement on AWS.

Their primary focus on elevating the open data lakehouse experience, has chosen AWS to manage critical components of CDP, such as data in motion, data lake house, data warehouse, operational database, AI/machine learning, master data management, and end-to-end security. This strategic decision enables customers to swiftly transition to CDP in the cloud without requiring application refactoring, while also supporting hybrid deployments.

Furthermore, Cloudera has seamlessly integrated CDP with AWS services, including Amazon Simple Storage Service (Amazon S3), Amazon Elastic Kubernetes Service (Amazon EKS), Amazon Relational Database Service (Amazon RDS), and Amazon Elastic Compute Cloud (Amazon EC2), providing customers with a tightly woven platform that reduces costs and capitalizes on AWS’s latest innovations. Cloudera customers gain access to AWS native services without the need for self-managed integrations.

Paul Codding, Executive Vice President of Product Management at Cloudera, stated, “Deepening our collaboration with AWS gives customers even more reasons to choose to run the Cloudera Data Platform on AWS. With tighter hardware and AWS service integration, customers get the best possible experience with strong security and governance, along with new cost reduction options to support their most critical analytical workloads.”

David Wroe, Principal Software Engineer & Solution Architect for Be The Match, a global leader in cell therapy, noted, “Our move to CDP Public Cloud on AWS for Be The Match’s search and match platform has resulted in significant cost savings for the organization and a reduction in the infrastructure maintenance expense measured in millions of dollars. As a non-profit, this affords us tremendous operational flexibility that was not previously possible.”

AWS and Cloudera will partner to expand cloud-native data management and data analytics capabilities on AWS, in addition to jointly developing marketing and co-selling initiatives for customers.

PhonePe announced that it chose the Cloudera Data Platform (CDP) to improve operational efficiency in mid August this year. CDP will facilitate the migration of some workloads to the cloud while maintaining on-premise operations. As a growing fintech company, PhonePe explained their decision saying that it aimed to address data scaling challenges by transitioning to a hybrid data platform.

The post Cloudera and AWS Forge Strategic Collaboration to Enhance Data Solutions appeared first on Analytics India Magazine.

If You Want to Master Generative AI, Ignore All (But Two) Tools

If You Want to Master Generative AI, Ignore All (But Two) Tools

It’s February 7th. Quite cold outside but apparently not enough to cool down the excitement ChatGPT sparked just before winter. Microsoft is ready to announce Bing Chat, a chatbot built on top of the next-generation model from OpenAI and capable of web search — Google is doomed (for the second time in a matter of three months, no less). Everyone will jump to Bing and Microsoft will eat Google’s search revenue.

Or will it?

It’s March 14th. Flowers are shyly blooming in the northern hemisphere. We have been particularly awaiting a rare one with 8 (or is it 16?) petals. It is about to open up (or maybe not). GPT-4 is out; the most secretive release ever for a language model. But it’s better, no — much better than GPT-3.5. Who wouldn’t pay $20/month for a 100x productivity boost? It’s a bargain.

Well, maybe not.

It’s March 21st. A soft, possibly hallucinated melody has awakened Google from a long hibernation. Bard is music for Sundar Pichai’s ears. But some notes are off-key — a rushed release? It may appear the pincer movement of the two above worked just fine. But Bard is just a tester — the real banger will come down the road with more powerful models. Google is back in the race.

Is it, though?

It’s July 18th. The summerest summer ever. The sun is high; the air is hot; GPUs will go brrr once more. Meta is done wasting time on the Metaverse and announces a widely applauded AI release: An open-source second version of their popular LLaMA model, Llama 2. They’ve done it to give OpenAI, Microsoft, and Google a lesson on how to do things in the open.

Have they really?

Alberto, I think you’re missing a few more — you know, Anthropic’s Claude? What about Perplexity? Character? Inflection’s Pi? AI21’s Jurassic? Cohere’s Xlarge? Mosaic’s MPT?… And don’t you dare forget about the gazillion tons of slightly overpriced and overvalued gift-wrapping paper coming out every week!

Oh boy, is this getting absurd.

This article is a selection from The Algorithmic Bridge, an educational newsletter whose purpose is to bridge the gap between AI, algorithms, and people. It will help you understand the impact AI has in your life and develop the tools to better navigate the future.

Maybe that’s enough

I read a piece by writer Zulie Rane about social media platform saturation inspired by the craze to sign up on Threads (only to sign out a week later). It was timely and fantastically relatable. I loved the intro style — which I borrowed for this article. The headline structure is borrowed too, from another article.

I couldn’t help it. The parallelism is uncanny: the exact same phenomenon happening with social media is happening with generative AI tools. Perhaps this is what we have become as a society, driven by the fear of missing out, the sheer amount of overwhelming information, the never-ending drive to accelerate our careers, or the desperation not to be left behind.

Whatever the case, we can’t help it. The generative AI frenzy is making us unconsciously trade off our mental sanity for the absorbing trap of overabundance. I don’t need so much of it. You don’t either. We actually need almost none of it.

The “but two” part of the headline is merely an opinion. (I was thinking of one tool for writing and another for images. But maybe you want a different one for programming. Or maybe you don’t code. Or maybe you don’t care about AI art instead. But you get the idea.) Yet it reflects a very real sensation that I — and I dare to guess you, too — have since ChatGPT went, all at once, inexplicably, unexpectedly, unprecedentedly, and — yes, thankfully — viral.

The world was unprepared for the immense benefits, the cross-sector threats, and the individually felt — yet collectively-shared — sense of AI fatigue. Influencers, marketers, and grifters don’t cause this annoying feeling. They merely adopt it for leverage; the cause precedes them and is hard to avoid.

That’s why I decided to narrow it down. I focused on what I really wanted and stuck to that. The little extra value I would have gotten otherwise wouldn’t have compensated for the mental cost.

Three reasons to avoid generative AI fatigue

So far this is a purely visceral rant but there’s a rationale underlying my emotions.

One tech trick to rule them all

Despite the amazing scope of generative AI technology, the proven efficacy of the products, and the amount of money flowing from one pair of hands to another (most of it without ever leaving Silicon Valley, though), the truth is they all stem fromthe same technical groundwork.

This isn’t to deny that on any given day I may want to use Bing’s search bar or Claude’s 100,000-token context window or GPT-4’s reasoning abilities or Bard’s prompt multimodality or Pi’s high emotional sensitivity or Character’s versatile array of personalities… But let’s be honest: Do I really need all of them?

In no time, they will be pretty much indistinguishable. The wealthiest companies will manage to commercialize the best products and all of them will share the same fundamental features. The rest — VC-backed startups and smaller LM-wrapper projects — will have to niche down or die out. The tools we use will come down to personal preference but all of them will come from a tiny bunch of big companies. The same group as always.

Even the presumed gaps in capability (which pre-trained models are better) and behavior (which haven’t been RLHFed to the point of uselessness) are irrelevant for most tasks. The alleged temporary degradation of GPT-4 is merely a by-product of OpenAI iterating in public and will be certainly resolved soon, whatever the cause.

In short: less is more in the soon-to-be-commoditized generative AI industry.

Avoid the trap.

Stay away from the tool shipping mill

But maybe you do care about those little differences.

In that case, I encourage you to try a bunch of tools and you will see that sticking to a couple of them is enough. Why? Because you will feel more naturally drawn to some and not others. As Rane says: “Your skills and interests make you a bad fit for 99% of platforms and a great fit for 1%.” She meant that for social media but it can be perfectly extrapolated to generative AI tools. My three criteria are ability (what am I good at?), preference (what do I like to do?), and activity (what do I need it for?)

For instance, let’s do a brief non-exhaustive overview for work tasks: if you’re an author or creative writer maybe high-temperature low-RLHFed base models are the best for you (e.g., GPT-3 or 3.5). If you’re a SEO content marketer or copywriter maybe tailored wrappers are the best choice (e.g., Jasper, although now ChatGPT, Bard, and Claude would do just fine). If you’re a tech-savvy writer maybe Llama 2 is better to avoid dependency. If you’re a digital artist, Midjourney. If you have coding skills and want higher steerability, Stable Diffusion instead. As a coder, GPT-4 or GitHub Copilot. Data analysis? Code interpreter.

Looking at the tools that are coming out is fine, but I’m more productive if I stick to one or two; having to analyze the news every week to see if the new thing is 0.1% better than the current thing is exhausting and the main ingredient of burnout.

The user-company inherent mismatch

There’s a third reason — rather peripheral to the others — for why it isn’t worth getting generative AI fatigue.

Although the landscape appears to be a web of race-like dynamics, conflicts of interest, and business tensions whose inevitable outcome is competition-driven consumer well-being, all the companies I’ve named above have tight, favorable, and mutually-beneficial relationships whose sole goal is to make us, the users, pay for their products (including, eventually, those which are currently free).

These companies aren’t shipping more and more and more products to provide more and more and more value but to get a portion of the succulent generative AI pie. Which isn’t bad. I mean, who wouldn’t do the same? It’s expected — in no way worse than social media platforms — but worth bearing in mind just in case you thought we are the main beneficiaries of this — we are not. Companies won’t hesitate a single second to take a direction that doesn’t benefit us. They won’t hesitate to cut off access to products and shut down entirely their services if they must.

So, in closing, generative AI tools can be a blessing. They can also be a curse. Life is too short to be chasing all the time after things we don’t really need.

Narrow down. Stay freed. Avoid fatigue.

Alberto Romero is a freelance writer who focuses on tech and AI. He writes The Algorithmic Bridge, a newsletter that helps non-technical people make sense of news and events on AI. He's also a tech analyst at CambrianAI, where he specializes in large language models.

Original. Reposted with permission.

More On This Topic

  • Wrangle Summit 2021: All the Best People, Ideas, and Technology in Data…
  • KDnuggets™ News 22:n01, Jan 5: 3 Tools to Track and Visualize the…
  • Are You Still Using Pandas to Process Big Data in 2021? Here are two better…
  • Two Simple Things You Need to Steal from Agile for Data and Analytics Work
  • Data Practitioner Survey: Want to know what you’re worth?
  • How Data Scientists Can Get the Ear of CFOs (And Why You Want It)

Meet generative AI’s ‘super users’: 70% of Gen Z use GenAI

Woman creating on laptop

Since ChatGPT's release last November, generative AI has proven to be a capable technology that can help with a range of everyday tasks. However a new study shows that only members of a specific generation use generative AI to its full potential.

On Thursday, Salesforce released its Generative AI Snapshot Research: The AI Divide, which surveyed more than 4,041 people 18 or older across the US, UK, Australia, and India regarding their AI usage.

Also: Zoom's 'AI Companion' delivers new features to all paid accounts

The survey found that although half (49%) of overall respondents have used generative AI, the numbers differ greatly between different age groups.

Specifically, generative AI users are concentrated among younger users, with 65% of generative AI users being Millennials or Gen Z, people born between 1981 and 2012, according to the Pew Research Center.

The Gen Z respondents were the most invested in generative AI, with 70% reporting using the technology and 58% saying generative AI helps them make informed decisions.

"Gen Z is paving the path for generative AI. It saves time, keeps them organized, and is considered fun to use," says Salesforce.

Also: One in four workers fears being considered 'lazy' if they use AI tools

Gen Z and Millenials are generative AI's "super users," or users who use the technology frequently and believe that they are close to mastering it. Almost half (48%) of Gen Z believe they are on their way to mastering the technology.

A person's employment status is another factor significantly impacting generative AI technology usage; 72% of generative AI users are employed.

Unsurprisingly, 68% of non-users belong to the Gen X or Baby Boomer generations, those born between 1946 and 1980, according to the Pew Research Center.

Some potential reasons for this lack of engagement are that most non-users (88%) are unclear on how generative AI will impact their lives.

Also: Why companies must use AI to think differently, and not simply to cut costs

A lack of education and safety concerns may also be behind the hesitation. Of the non-users, 70% reported using generative AI more if they knew more about the technology, and 64% would use it more if it was more secure.

The research in this study aligns with other research covered by ZDNET, which highlights the need for education and guidance on AI in making people comfortable with adopting the technology.

Artificial Intelligence

IBM rolls out new generative AI features and models

IBM rolls out new generative AI features and models Kyle Wiggers 9 hours

Fighting for relevance in the growing — and ultra-competitive — AI space, IBM this week introduced new generative AI models and capabilities across its recently-launched Watsonx data science platform.

The new models, called the Granite series models, appear to be standard large language models (LLMs) along the lines of OpenAI’s GPT-4 and ChatGPT, capable of summarizing, analyzing and generating text. IBM provided very little in the way of details about Granite, making it impossible to compare the models to rival LLMs — including IBM’s own. But the company claims that it’ll reveal the data used to train the Granite series models, as well as the steps used to filter and process that data, ahead of the models’ availability in Q3 2022.

We’ll hold the company to that.

Elsewhere, in Watsonx.ai — the component of Watsonx that lets customers test, deploy and monitor models post-deployment — IBM is rolling out Tuning Studio, a tool that allows users to tailor generative AI models to their data.

Using Tuning Studio, IBM Watsonx customers can fine-tune models to new tasks with as few as 100 to 1,000 examples. Once users specify a task and provide labeled examples in the required data format, they can deploy the model via an API from the IBM Cloud.

Also set to debut soon in Watsonx.ai is a synthetic data generator for tabular data — the collections of rows and columns found in relational databases. IBM claims in a press release that, by generating synthetic data from custom data schemas and internal data sets, companies can can use the generator to extract insights for AI model training and fine tuning with “reduced risk.”

It’s not clear what’s meant by “reduced risk,” exactly, given the pitfalls of training AI with synthetic data. (We’ve asked for clarification.) But make of that as you will.

IBM is also launching new generative AI capabilities in Watsonx.data, the company’s data store that allows users to access data while applying query engines, governance, automation and integrations with existing databases and tools. Starting in Q4 2023 as part of a tech preview, customers will be able to “discover, augment, visualize and refine” data for AI through a self-service, chatbot-like tool.

IBM, once again, was light on the specifics. But I’m picturing an experience akin to ChatGPT, albeit data visualization- and transformation-focused.

Around the same time — Q4 2023 — Watsonx.data will gain a vector database capability to support for retrieval-augmented generation (RAG), IBM says. RAG is an AI framework for improving the quality of LLM-generated responses by grounding the model on external knowledge sources — useful, obviously, for IBM’s enterprise cliente.

In other big news, IBM is embarking on the technical preview for Watsonx.governance, a toolkit that — in the company’s rather vague words — provides mechanisms to protect customer privacy, detect model bias and drift and help organizations meet ethics standards. And starting next week, IBM will launch Intelligent Remediation, which the company says will leverage generative AI models to assist IT teams with summarizing incidents and suggesting workflows to help implement solutions.

“As demonstrated by the ongoing evolution of the watsonx platform within just a few months since launch, we’re here to support clients through the entire AI lifecycle” IBM SVP of products Dinesh Nirmal said in a press release. “As a transformation partner, IBM is collaborating with clients to help them scale AI in a secure, trustworthy way — from helping to institute foundational elements of their data strategies to tuning models for their specific business uses cases to helping them govern models beyond that.”

Certainly, IBM is under pressure to prove that it can make a dent in the crowded AI field.

In the company’s second fiscal quarter, IBM reported revenue that missed analyst expectations as the company suffered from a bigger-than-expected slowdown in its infrastructure business segment. Revenue contracted to $15.48 billion, down 0.4% year-over-year, just below the analyst consensus for Q2 sales of $15.58 billion.

During the earnings call, IBM’s CEO, Arvind Krishna, repeatedly emphasized the importance of AI to IBM’s future growth — and asserted that businesses are signing up at a healthy pace to use IBM’s hybrid cloud and AI tech, including Watsonx. Over 150 corporate customers were using Watsonx as of July, when it began rolling out, Krishna said — including Samsung and Citi.

“We continue to respond to the needs of our clients who seek trusted, enterprise AI solutions, and we are particularly excited about the response to the recently launched Watsonx AI platform. Finally, we remain confident in our revenue and free cash flow growth expectations for the full year,” Krishna said during the earnings call, per Investing.com.

Slack Introduces New AI Features For Seamless Communication & Workflow 

Continuing its efforts to redefine workplace productivity, Salesforce has just announced a bunch of AI features for its messaging platform, Slack. The announcements come off the back of a major redesign of the platform that brought several workspaces into a single view, last month.

Salesforce stated this new update automates ways of working to speed up access to information. Since the success of OpenAI’s ChatGPT followed by a genAI revolution, Salesforce has gone all in on AI. These new additions bring AI, automation capabilities, and knowledge sharing into the mix, to upgrade the way teams collaborate and streamline work.

Slack AI, the standout feature of the latest update, is integrated into the platform, leveraging information from Slack’s channels. This native AI functionality is designed to simplify work processes and save users’ time. Alongside, the first batch of features is rolling out including “Channel recaps,” for instant highlights of any channel’s activity. Apart from a quick overview of essential updates the feature helps with tasks such as drafting status reports or summarising feedback.

Furthermore, Slack has announced an improved ‘Workflow Builder’ designed for anyone, regardless of coding expertise, to automate processes. Developers are also in for a treat as this next-generation platform simplifies the app development process, taking care of hosting and infrastructure management. The platform also provides a centralised hub for customers to explore and deploy automation templates quickly.

The company is also bringing Lists to loop in work management capabilities into the flow of communication on Slack, allowing users to create lists of active projects, assign to relevant parties, and track their progress all the way through completion.

However, despite the announcements, not all of these features are ready to ship – yet. According to Salesforce, Slack Lists will launch the upcoming winter, with wide availability expected in the following year. As for Slack AI, it is set to undergo a pilot phase this winter, followed by a broader rollout after a successful pilot. Meanwhile, the Workflow Builder is already accessible to users on paid plans – with its hub scheduled to debut later this month.

The post Slack Introduces New AI Features For Seamless Communication & Workflow appeared first on Analytics India Magazine.

Soon UAE Will Dethrone OpenAI

UAE’s Technological Innovation Institute (TII) yesterday released Falcon 180B, a highly scaled-up version of Falcon 40B. According to the official blog post, this is the largest open-source language model, boasting a staggering 180 billion parameters.

According to TII, Falcon 180B is trained on 3.5 trillion tokens on 4096 GPUs simultaneously, using Amazon SageMaker for a total of ~7,000,000 GPU hours.

To put it in perspective, Falcon 180B is 2.5 times bigger than Llama 2 and required four times more computational power for its training. It’s certainly intriguing how UAE’s TII manages to obtain such substantial computing power.

UAE has Oil Money

The UAE, as an oil-rich nation, has ample financial resources at its disposal. According to a report hydrocarbons continue to play a critical role in the UAE economy, with 30% of the UAE’s GDP directly based on oil and gas industry and 13% of its exports.

The UAE is allocating the money earned from oil to fund AI projects. Six years ago, they launched the National Strategy for AI 2031, aiming to make AI contribute significantly to their economy, targeting up to 13.6 percent of their GDP by 2030.

In 2020, UAE government established ARTC (Advanced Technology Research Council) to promote scientific research and innovations in AI. Few months later ARTC established TII which today is behind the creation of Falcon 180B.

There is no doubt the UAE is bullish on investing in AI initiatives. In June, when OpenAI CEO Sam Altman visited Abu Dhabi, he praised the nation’s foresight in recognizing the potential of AI, stating that the city “has been talking about AI since before it was cool.”

While the world has been struggling to Procure NVIDIA GPUs, UAE secured access to thousands of NVIDIA chips which it used to build the Falcon model in May. Moreover, the report added that UAE wants to control and own its own computational power and talent without depending on Chinese or Americans. There is no doubt that they have capital, energy resources and talent to do it.

Similarly, Saudi Arabia also purchased no less than 3,000 of NVIDIA’s H100 chips. These processors are valued at $40,000 each. The acquisition was facilitated through the public research institution, King Abdullah University of Science and Technology (KAUST).

When we crunch the numbers, it becomes apparent that Saudi invested a staggering $120 million to secure this impressive array of GPUs.

This is the reason why when the U.S tried to ban exports of AI chips to middle east nations, AMD and NVIDIA both raised eyebrows. All the major economies of the world right now are engaged in the LLM race which has led to cold war with the US trying its best that its domestic AI chip manufacturers do not lend support to their competitors.

Not only this, UAE’s G42 recently launched Arabic language AI model Jais which contains 13 billion parameters. Jais was created with the help of supercomputers produced by the Silicon Valley-based Cerebras Systems for which it had signed a $100 million deal with G42. As NVIDIA’s chips were short in supply, UAE was smart enough to seek alternatives.

Moreover, G42 in 2021 raised $800 million from U.S. tech investment firm Silver Lake, which has backing from Mubadala, the UAE’s sovereign wealth fund.

What about OpenAI?

Coming to OpenAI, the company’s progress is largely dependent on the multi-billion dollar investment it received from Microsoft at the beginning of the year. However, with the recent developments it appears that it has exhausted the investment. Recently, Sam Altman posted on X that the company is not coming up with GPT-5 or GPT- 4.5 in the near future and asked people to calm down.

Imagine that your moat is money and you try to compete with state level funding of the UAE

— Yam Peleg (@Yampeleg) September 6, 2023

According to The Information report, OpenAI losses roughly doubled to around $540 million last year as it developed ChatGPT and GPT-4. According to reports, training GPT-3 with 175 billion parameters cost them more than $4 million.

Now with GPT-4 rumoured to have about 1.76 trillion parameters, the cost of building the model comes up close to $46.3 billion, assuming a linear increase in cost per parameter. Again, this is a simplified estimate, and the actual cost may vary based on various aspects, including research and development costs, talent, hardware improvements, and more.

This explains why OpenAI has been shying away from releasing the multimodal capabilities of GPT-4 into the public, or disclosing the parameter size, which the team seem to be hiding deliberately to avoid unwanted attention. Who knows, OpenAI fooled us all and we never actually got GPT-4.

Altman previously had suggested OpenAI may try to raise as much as $100 billion in the coming years to achieve its aim of developing AGI. Maybe, OpenAI should also attract some oil money, or probably expand to the middle east. Interestingly, Microsoft is already planning to do that.

As of now, OpenAI is trying to attract enterprises in order to stay in business. It announced its inaugural developer’s conference which is supposed to take place in San Francisco on November 6, 2023, where it is hoping developers from around the world will come up with new ideas and tools for ChatGPT and APIs.

The post Soon UAE Will Dethrone OpenAI appeared first on Analytics India Magazine.

Creating Visuals with Matplotlib and Seaborn

Creating Visuals with Matplotlib and Seaborn
Image by storyset on Freepik

Data visualization is essential in data work as it helps people understand what happens with our data. It’s hard to ingest the data information directly in a raw form, but visualization would spark people's interest and engagement. This is why learning data visualization is important to succeed in the data field.

Matplotlib is one of Python's most popular data visualization libraries because it’s very versatile, and you can visualize virtually everything from scratch. You can control many aspects of your visualization with this package.

On the other hand, Seaborn is a Python data visualization package that is built on top of Matplotlib. It offers much simpler high-level code with various in-built themes inside the package. The package is great if you want a quick data visualization with a nice look.

In this article, we will explore both packages and learn how to visualize your data with these packages. Let’s get into it.

Visualization with Matplotlib

As mentioned above, Matplotlib is a versatile Python package where we can control various aspects of the visualization. The package is based on the Matlab programming language, but we applied it in Python.

Matplotlib library is usually already available in your environment, especially if you use Anaconda. If not, you can install them with the following code.

pip install matplotlib

After the installation, we would import the Matplotlib package for visualization with the following code.

import matplotlib.pyplot as plt

Let’s start with the basic plotting with Matplotlib. For starters, I would create sample data.

import numpy as np    x = np.linspace(0,5,21)  y = x**2

With this data, we would create a line plot with the Matplotlib package.

plt.plot(x, y, 'b')  plt.xlabel('X Axis')  plt.ylabel('Y Axis')  plt.title('Sample Plot')

Creating Visuals with Matplotlib and Seaborn
In the code above, we pass the data into the matplotlib function (x and y) to create a simple line plot with a blue line. Additionally, we control the axis label and title with the code above.

Let’s try to create a multiple matplotlib plot with the subplot function.

plt.subplot(1,2,1)  plt.plot(x, y, 'b--')  plt.title('Subplot 1')  plt.subplot(1,2,2)  plt.plot(x, y, 'r')  plt.title('Subplot 2')

Creating Visuals with Matplotlib and Seaborn

In the code above, we create two plot side by side. The subplot function controls the plot position; for example, plt.subplot(1,2,1) means that we would have two plots in one row (first parameter) and two columns (second parameter). The third parameter is to control which plot we are now referring to. So plt.subplot(1,2,1) means the first plot of the single row and double columns plots.

That is the basis of the Matplotlib functions, but if we want more control over the Matplotlib visualization, we need to use the Object Oriented Method (OOM). With OOM, we would produce visualization directly from the figure object and call any attribute from the specified object.

Let me give you an example visualization with Matplotlib OOM.

#create figure instance (Canvas)  fig = plt.figure()    #add the axes to the canvas  ax = fig.add_axes([0.1, 0.1, 0.7, 0.7]) #left, bottom, width, height (range from 0 to 1)    #add the plot to the axes within the canvas  ax.plot(x, y, 'b')  ax.set_xlabel('X label')  ax.set_ylabel('Y label')  ax.set_title('Plot with OOM')

Creating Visuals with Matplotlib and Seaborn

The result is similar to the plot we created, but the code is more complex. At first, it seemed counterproductive, but using the OOM allowed us to control virtually everything with our visualization. For example, in the plot above, we can control where the axes are located within the canvas.

To see how we see the differences in using OOM compared to the normal plotting function, let’s put two plots with their respective axes overlapping on each other.

#create figure instance (Canvas)  fig = plt.figure()    #add two axes to the canvas  ax1 = fig.add_axes([0.1, 0.1, 0.7, 0.7])   ax2 = fig.add_axes([0.2, 0.35, 0.2, 0.4])     #add the plot to the respective axes within the canvas  ax1.plot(x, y, 'b')  ax1.set_xlabel('X label Ax 1')  ax1.set_ylabel('Y label Ax 1')  ax1.set_title('Plot with OOM Ax 1')    ax2.plot(x, y, 'r--')  ax2.set_xlabel('X label Ax 2')  ax2.set_ylabel('Y label Ax 2')  ax2.set_title('Plot with OOM Ax 2')

Creating Visuals with Matplotlib and Seaborn

In the code above, we specified a canvas object with the plt.figure function and produced all these plots from the figure object. We can produce as many axes as possible within one canvas and put a visualization plot inside them.

It’s also possible to automatically create the figure, and axes object with the subplot function.

fig, ax = plt.subplots(nrows = 1, ncols =2)    ax[0].plot(x, y, 'b--')  ax[0].set_xlabel('X label')  ax[0].set_ylabel('Y label')  ax[0].set_title('Plot with OOM subplot 1')

Creating Visuals with Matplotlib and Seaborn

Using the subplots function, we create both figures and a list of axes objects. In the function above, we specify the number of plots and the position of one row with two column plots.

For the axes object, it’s a list of all the axes for the plots we can access. In the code above, we access the first object on the list to create the plot. The result is two plots, one filled with the line plot while the other only the axes.

Because subplots produce a list of axes objects, you can iterate them similarly to the code below.

fig, axes = plt.subplots(nrows = 1, ncols =2)    for ax in axes:        ax.plot(x, y, 'b--')      ax.set_xlabel('X label')      ax.set_ylabel('Y label')      ax.set_title('Plot with OOM')    plt.tight_layout()

Creating Visuals with Matplotlib and Seaborn

You can play with the code to produce the needed plots. Additionally, we use the tight_layout function because there is a possibility of plots overlapping.

Let’s try some basic parameters we can use to control our Matplotlib plot. First, let’s try changing the canvas and pixel sizes.

fig = plt.figure(figsize = (8,4), dpi =100)

Creating Visuals with Matplotlib and Seaborn

The parameter figsize accept a tuple of two number (width, height) where the result is similar to the plot above.

Next, let’s try to add a legend to the plot.

fig = plt.figure(figsize = (8,4), dpi =100)    ax = fig.add_axes([0.1, 0.1, 0.7, 0.7])    ax.plot(x, y, 'b', label = 'First Line')  ax.plot(x, y/2, 'r', label = 'Second Line')  ax.set_xlabel('X label')  ax.set_ylabel('Y label')  ax.set_title('Plot with OOM and Legend')  plt.legend()

Creating Visuals with Matplotlib and Seaborn

By assigning the label parameter to the plot and using the legend function, we can show the label as a legend.

Lastly, we can use the following code to save our plot.

fig.savefig('visualization.jpg')

There are many special plots outside the line plot shown above. We can access these plots using these functions. Let’s try several plots that might help your work.

Scatter Plot

Instead of a line plot, we can create a scatter plot to visualize the feature relationship using the following code.

plt.scatter(x,y)

Creating Visuals with Matplotlib and Seaborn

Histogram Plot

A histogram plot visualizes the data distribution represented in the bins.

plt.hist(y, bins = 5)

Creating Visuals with Matplotlib and Seaborn

Boxplot

The boxplot is a visualization technique representing data distribution into quartiles.

plt.boxplot(x)

Creating Visuals with Matplotlib and Seaborn

Pie Plot

The Pie plot is a circular shape plot that represents the numerical proportions of the categorical plot—for example, the frequency of the categorical values in the data.

freq = [2,4,1,3]  fruit = ['Apple', 'Banana', 'Grape', 'Pear']  plt.pie(freq, labels = fruit)

Creating Visuals with Matplotlib and Seaborn

There are still many special plots from the Matplotlib library that you can check out here.

Visualization with Seaborn

Seaborn is a Python package for statistical visualization built on top of Matplotlib. What makes Seaborn stand out is that it simplifies creating visualization with an excellent style. The package also works with Matplotlib, as many Seaborn APIs are tied to Matplotlib.

Let’s try out the Seaborn package. If you haven’t installed the package, you can do that by using the following code.

pip install seaborn

Seaborn has an in-built API to get sample datasets that we can use for testing the package. We would use this dataset to create various visualization with Seaborn.

import seaborn as sns    tips = sns.load_dataset('tips')  tips.head()

Creating Visuals with Matplotlib and Seaborn

Using the data above, we would explore the Seaborn plot, including distributional, categorical, relation, and matrix plots.

Distributional Plots

The first plot we would try with Seaborn is the distributional plot to visualize the numerical feature distribution. We can do that we the following code.

sns.displot(data = tips, x = 'tip')

Creating Visuals with Matplotlib and Seaborn

By default, the displot function would produce a histogram plot. If we want to smoothen the plot, we can use the KDE parameter.

sns.displot(data = tips, x = 'tip', kind = 'kde')

Creating Visuals with Matplotlib and Seaborn

The distributional plot can also be split according to the categorical values in the DataFrame using the hue parameter.

sns.displot(data = tips, x = 'tip', kind = 'kde', hue = 'smoker')

Creating Visuals with Matplotlib and Seaborn

We can even split the plot even further with the row or col parameter. With this parameter, we produce several plots divided with a combination of categorical values.

sns.displot(data = tips, x = 'tip', kind = 'kde', hue = 'smoker', row = 'time', col = 'sex')

Creating Visuals with Matplotlib and Seaborn

Another way to display the data distribution is by using the boxplot. Seabron could facilitate the visualization easily with the following code.

sns.boxplot(data = tips, x = 'time', y = 'tip')

Creating Visuals with Matplotlib and Seaborn

Using the violin plot, we can display the data distribution that combines the boxplot with KDE.

Creating Visuals with Matplotlib and Seaborn

Lastly, we can show the data point to the plot by combining the violin and swarm plots.

sns.violinplot(data = tips, x = 'time', y = 'tip')  sns.swarmplot(data = tips, x = 'time', y = 'tip', palette = 'Set1')

Creating Visuals with Matplotlib and Seaborn

Categorical Plots

A categorical plot is a various Seaborn API that applies to produce the visualization with categorical data. Let’s explore some of the available plots.

First, we would try to create a count plot.

sns.countplot(data = tips, x = 'time')

Creating Visuals with Matplotlib and Seaborn

The count plot would show a bar with the frequency of the categorical values. If we want to show the count number in the plot, we need to combine the Matplotlib function into the Seaborn API.

p = sns.countplot(data = tips, x = 'time')  p.bar_label(p.containers[0])

Creating Visuals with Matplotlib and Seaborn

We can extend the plot further with the hue parameter and show the frequency values with the following code.

p = sns.countplot(data = tips, x = 'time', hue = 'sex')  for container in p.containers:      ax.bar_label(container)

Creating Visuals with Matplotlib and Seaborn

Next, we would try to develop a barplot. Barplot is a categorical plot that shows data aggregation with an error bar.

sns.barplot(data = tips, x = 'time', y = 'tip')

Creating Visuals with Matplotlib and Seaborn

Barplot uses a combination of categorical and numerical features to provide the aggregation statistic. By default, the barplot uses an average aggregation function with a confidence interval 95% error bar.

If we want to change the aggregation function, we can pass the function into the estimator parameter.

import numpy as np  sns.barplot(data = tips, x = 'time', y = 'tip', estimator = np.median)

Creating Visuals with Matplotlib and Seaborn

Relational Plots

A relational plot is a visualization technique to show the relationship between features. It’s mainly used to identify any kind of patterns that exist within the dataset.

First, we would use a scatter plot to show the relation between certain numerical features.

sns.scatterplot(data = tips, x = 'tip', y = 'total_bill')

Creating Visuals with Matplotlib and Seaborn

We can combine the scatter plot with the distributional plot using a joint plot.

sns.jointplot(data = tips, x = 'tip', y = 'total_bill')

Creating Visuals with Matplotlib and Seaborn

Lastly, we can automatically plot pairwise relationships between features in the DataFrame using the pairplot.

sns.pairplot(data = tips)

Creating Visuals with Matplotlib and Seaborn

Matrix Plots

Matrix plot is used to visualize the data as a color-encoded matrix. It is used to see the relationship between the features or help recognize the clusters within the data.

For example, we have a correlation data matrix from our dataset.

tips.corr()

Creating Visuals with Matplotlib and Seaborn

We could understand the dataset above better if we represented them in a color-encoded plot. That is why we would use a heatmap plot.

sns.heatmap(tips.corr(), annot = True)

Creating Visuals with Matplotlib and Seaborn

The matrix plot could also produce a hierarchal clustering plot that infers the values within our dataset and clusters them according to the existing similarity

sns.clustermap(tips.pivot_table(values = 'tip', index = 'size', columns = 'day').fillna(0))

Creating Visuals with Matplotlib and Seaborn
Conclusion

Data visualization is a crucial part of the data world as it helps the audience to understand what happens with our data quickly. The standard Python packages for data visualization are Matplotlib and Seaborn. In this article, we have learned the primary usage of the packagesWhat other packages besides Matplotlib and Seaborn are available for data visualization in Python? and introduced several visualizations that could help our work.
Cornellius Yudha Wijaya is a data science assistant manager and data writer. While working full-time at Allianz Indonesia, he loves to share Python and Data tips via social media and writing media.

More On This Topic

  • Creating Beautiful Histograms with Seaborn
  • Data storytelling: brains are built for visuals, but hearts turn on stories
  • Data Visualization in Python with Seaborn
  • KDnuggets News 22:n16, Apr 20: Top YouTube Channels for Learning Data…
  • Introduction to Data Visualization Using Matplotlib
  • Python Matplotlib Cheat Sheets

Landmark Antitrust Trial Against Google Commences

Google is gearing up for a long-awaited antitrust trial initiated by the US Justice Department, set to commence next week. Prosecutors have accused Google of deploying illegal business deals to secure the dominance of its ubiquitous search engine.

The lawsuit, filed in 2020, alleges that Google unlawfully eliminated competitors by funneling billions of dollars annually to smartphone makers like Apple and Samsung. This financial incentive ensured that Google’s search engine would be the default option on their web browsers.

In response, Google has maintained that these deals reportedly have taken as much as $15 billion a year from Google were non-exclusive, allowing users to freely modify their device’s default settings.

The upcoming trial, which is poised to last 10 weeks, marks the first major US monopoly trial of the modern internet era. It is scheduled to begin next Tuesday, with prominent figures such as Google CEO Sundar Pichai, as well as senior executives from Apple and other tech companies, expected to take the witness stand. To date, both the DOJ and Google have interviewed over 150 individuals and produced over 5 million pages of documents in preparation for the case.

The Justice Department’s depiction of Google contrasts sharply with its image in the late 1990s and early 2000s as a scrappy startup revolutionizing internet search in Silicon Valley.

In response to these allegations, the Justice Department has called for Google to change its alleged unlawful business practices, potentially face financial penalties, and restructure its operations. Importantly, Judge Amit P. Mehta, appointed by President Barack Obama, will preside over the proceedings and issue the final verdict, as there will be no jury.

Even before the trial has commenced, both legal teams have been vigorous in presenting their arguments. Google, for instance, recently contended in a court filing that Jonathan Kanter, the head of antitrust at the Justice Department, harbors a “deep-seated bias” against the company. Google has long maintained that Kanter’s previous work for Google rivals like Microsoft, Yelp, and News Corp (parent company of New York Post), represents a conflict of interest, alleging that he received substantial compensation in private practice to advocate for antitrust action.

Google further claimed that Kanter “is using public office to accomplish what he was unable to do in private practice on behalf of his paying clients.” Meanwhile, the DOJ contended that Google has submitted “unusual, invasive, and irrelevant discovery requests” related to Kanter’s involvement in the case. The DOJ also urged the judge to prevent Google from arguing that it has selectively enforced antitrust laws.

Mehta has already ruled on parts of the federal monopoly trial, dismissing four counts from the lawsuit earlier this month. The judge concluded that government attorneys failed to demonstrate that Google had harmed rivals like Yelp and Expedia through its online search practices.

The post Landmark Antitrust Trial Against Google Commences appeared first on Analytics India Magazine.

Indian Developers Top Hugging Face Leaderboard with GenZ 70B

GenZ 70 B, an instruction fine-tuned model, which comes with a commercial licensing option, is shining on the top spot in Hugging Face’s leaderboard of instruction-tuned LLMs. It also ranks No.6 for open LLMs in all categories. This is the first time we are seeing such a development from India.

Accubits Technologies, a full-service software development and technology consulting company, is an Indian company with a corporate office in the US. The company, in collaboration with Bud Ecosystem, has open-sourced their fifth large language model – GenZ 70B.

GenZ, an advanced LLM, is fine-tuned on Meta’s open-source Llama-2 70B parameter model. The model has undergone fine-tuning, primarily to improve its reasoning, role-playing, and writing abilities. The company chose Llama-2 because it is a SOTA pretrained model architecture compared to other commercial open-source LLMs.

“GenZ 70B model uses RoPe positional embedding, which allows for context interpolations, implying that the model’s context lengths can be extended later, if required. It also comes with attention mechanisms like Ghost that provide better memory, computing, and alignment. Moreover, it is already pre-trained on 2 trillion tokens,” said Charush S Nair, CTO of Accubits Technologies in an exclusive interaction with AIM.

Surpassing Other LLMs

In initial assessments, the model showcased superior performance. It achieved a score of 70.32 on the MMLU benchmark (Measuring Massive Multitask Language Understanding), surpassing LLama-2 70 B’s score of 69.83. Furthermore, GenZ 70B achieved an outstanding score of 7.34 on the MT (multi-turn) benchmark.

“Even though numerous fine-tuned models are out there, most do not offer commercial licences. GenZ stands out mainly for two reasons: one, it offers a commercial licence, and two, it offers good performance,” said Nair.

The models have been refined through supervised fine-tuning (SFT) technique, which was achieved after multiple experiments where SFT was the best option. “Generally, PEFT (Parameter Efficient Fine-tuning) methods are used for fine-tuning LLMs. However, it does not work well for long-term multistage fine-tuning because the accuracy of the results usually drops by the number of stages and eventually leads to catastrophic forgetting & model drift. We have also noticed that PEFT methods impact the model’s generalisation capability more than supervised fine-tuning,” said Nair.

GenZ models’ capability comparison with GPT3.5. Source: Accubits

“As robust reasoning capabilities are very important for an LLM model to be used for commercial applications, we primarily instruct-tuned the model for better reasoning, roleplay, and writing capabilities. Some of the primary use cases and business applications include business analysis, risk analysis, project scoping, and conversational tools,” said Nair. He also believes that organisations can use GenZ 70B to address niche challenges and develop innovative solutions.

The smaller quantization version of GenZ models make them accessible, enabling their use even on personal computers. There are three models of different parameter counts (7B, 13B and 70B) and quantizations of 32bit and 4-bit that are available for the open-source community.

Limitations Remain

While the model offers versatility and higher capability when compared to other models, it comes with inherent limitations in its practical application. The model-maker has advised caution when considering its deployment for production purposes, and since GenZ 70B is based on extensive web data, similar to other LLMs, it may exhibit online biases and stereotypes.

“We recommend users of GenZ to consider fine-tuning it for the specific set of tasks of interest,” said the CTO. Using precautions and guardrails while using it on production has been reiterated in the company blog too.

Finding exact use cases for the open-sourced GenZ 70B model might still be a challenge. Considering how a number of big tech companies are releasing superior open-source models such as Meta’s Llama-2, Anthropic’s Claude-2, Falcon, Vicuna and others, a model such as GenZ can face hurdles when it comes to adoption in the highly competitive market.

With GenZ, the company is out on a mission to build open-source foundational models with the knowledge and reasoning capabilities of GPT-4 which focuses on privacy and can be hosted on a laptop too. “The power of LLMs should not be exclusive but should be leveraged for the collective advancement of society. After all, technological progress reaches its full potential when it can be harnessed by all, not just by a privileged few,” said Nair.

The post Indian Developers Top Hugging Face Leaderboard with GenZ 70B appeared first on Analytics India Magazine.