01 - Introduction To Watsonx - Ai
01 - Introduction To Watsonx - Ai
watsonx.ai
Content by:
Ahmad Muzaffar Baharudin
APAC Ecosystem Technical Enablement Specialist | Data & AI
ahmad.muzaffar@ibm.com
Instructor:
Farah Auni Hisham
Technical Enablement Specialist | Data & AI
farah.hisham@ibm.com
and legal
change at any time at IBM’s sole
© IBM Corporation 2024. discretion based on market opportunities
All Rights Reserved. or other factors and are not intended to be
disclaimer
a commitment to future product or feature
The information contained in this availability in any way. Nothing contained
publication is provided for informational in these materials is intended to, nor shall
purposes only. While efforts were made have the effect of, stating or implying that
to verify the completeness and accuracy any activities undertaken by you will result
of the information contained in this in any specific sales, revenue growth, or
IBM and Business Partner publication, it is provided AS IS without other results.
warranty of any kind, express or implied.
Internal Use Only In addition, this information is based on All client examples described are
IBM’s current product plans and strategy, presented as illustrations of how those
which are subject to change by IBM clients have used IBM products and the
without notice. IBM shall not be results, they
responsible for may have achieved. Actual environmental
any damages arising out of the use of, or costs and performance characteristics
otherwise related to, this publication or may vary by client.
any other materials. Nothing contained in
this publication is intended to, nor shall
have the effect of, creating any warranties
or representations from IBM or its
suppliers or licensors, or altering the
terms and conditions of the applicable
license agreement governing the use of
IBM software.
2 Foundation Model
4 Introduction to watsonx.ai
▪ What is Generative AI
Machine Learning (ML) ML-based systems are trained on historical data to uncover patterns.
Users provide inputs to the ML system, which then applies these inputs
Systems that learn from historical data
to the discovered patterns and generates corresponding outputs.
Deep Learning (DL) DL is a subset of ML, using multiple layers of neural networks, which are
interconnected nodes, which work together to process information. DL is
ML technique that mimics
well suited to complex applications, like image and speech recognition.
human brain function
Foundation Model
Generative AI systems
5
1950’s 1980’s 2010’s 2020’s
What is Generative AI
▪ Generative AI refers to AI model that can generate high-quality text, images, audio, video, codes and other content
based on the data they were trained on.
Prompting Response
Generative AI Model
▪ In training phase, Generative AI models are trained on large amount datasets to understand patterns and relationships
between words, pixels, or notes, resulting in the creation of a statistical model.
Training Phase
Pre-training Data
Pre-training
Generative AI Model
▪ During usage phase, when the model is given a prompt, it will predict what the expected response might be - and this
will create new content.
Usage Phase
Prompting Response
Pre-trained
Generative AI Model
Traditional AI Generative AI
Training Data Task Training Data Task
Model X
Model C Classification Generation
▪ A Traditional AI model is trained using Machine Learning (ML) • A Foundation Model can address multiple tasks.
for specific task. • Self-Supervised Learning with very large datasets.
▪ Supervised Learning with proper & large datasets. • Rapid adaptation to multiple tasks with additional small amounts
▪ Very efficient for specific task it was trained for. of task-specific data.
Generation • User stories, personas • Automate the creation of marketing • Create technical document from code • Automate report generation
• Create personalized UX code material and language translation • Automate scripts to configure, • Social engineering simulation
Generate AI to create text from experience design • Automate image, text, and video deploy, and manage hybrid cloud • Security documentation creation
• Training, and testing data for chatbots creation for articles, blogs, etc. • Co-pilot to create code across • Automate threat detection by
• Automate responses to • Create automation scripts for various multiple programming languages looking for anomaly patterns
emails and reviews workflows across applications
Classification • Classify customer sentiments from • Classify documents by different • Classify incident reports • Classify flagged items properly as
feedback or chatbot interaction criteria – types, contents, keywords • Automate workflow based on threats or other categories
For sentiment or topics • Classify typical issues raised by • Sort digital contents in storage analysis of items/status/reports • Classify the type of security risks
clients for focused improvements into pre-defined categories and find the best response
• Classify log and other monitoring
output to determine the next action
Question answering • Knowledgebase articles • Analyze emails, attachments, • Knowledge search for IT helpdesk • Knowledge search across
• Augment chatbot w/search documents, invoices, reports, etc. • Ticket resolution by suggesting security spec documents
Knowledge base search across • Agent assist • Knowledge search for company solutions from resolved tickets • External threat intelligence
the company’s proprietary data. • Contract intelligence information to provide in-house • Error log and root cause analysis • Error log and root cause analysis
• Mart search in technical manuals, day-to-day assistance • Compliance monitoring • Security incident search @ forensics
HR documents, ethics codes, and automation
product documentation, etc.
APAC Ecosystem Technical Enablement | Data & AI 11
2 Foundation
Models
▪ Foundation Models (FM) are general purpose AI models that are pre-trained on large amounts of text or other data and
have billions of parameters.
▪ FM are trained on a broad set of unlabeled data that can be used for different tasks, with minimal fine-tuning.
▪ FM are capable to do various tasks, including text, code, or image generation, classification, conversation, etc.
▪ FM can be further fine-tuned to complete different types of tasks or domains.
Summarization
Extraction
Question Answering
Coding
Conversation
Prompt Tuning
Tuning
Fine Tuning
Fine-tuned Question Answering
Model’s
Enterprise …
Response
Proprietary Data
APAC Ecosystem Technical Enablement | Data & AI … 13
Foundation
Models are a Physical Asset Business
Management Automation
paradigm shift Sensor/IoT
Data
Business
Process Data
for AI
IT Ops & Threat
IT Automation IT Cybersecurity Management
Unlock business advantage
Data Data
with Foundation Models
trained across the breadth of Foundation
enterprise data.
Models
Sustainability
Molecular Geospatial
Data Data
Natural Code
Language
Natural Code
Language
Natural Code
Language
▪ Large language models (LLM) is a category of Foundation Models pre-trained on massive amounts of data making them
capable of understanding and generating natural language such as text and other types of content.
▪ LLM can perform a wide range of tasks such as summarization, extraction, text generation, classification, question
answering, code generation, translation, etc.
LLM = Data
+
Architecture
+
Training
▪ LLM is trained on very large amount of data in term of data (file) size and token size.
▪ During training, an LLM will have billions of parameters.
– If the LLM has 70B parameters, it means that the model has 70 Billion adjustable parameters.
– These parameters are used to learn the relationship between tokens in the training data.
– The more parameters a model has, the more complex it can be and the more data it can process.
Architecture
+
Training
Decoder
Decoder
Decoder
=
Encoder
Encoder
Encoder
LLM Data
+
Architecture
+ Fine Tuning
▪ When deploying LLM for enterprise, there is a spectrum of strategies that enterprises can consider based on metrics
customized to their specific needs or conditions such as:
▪ Accuracy: How accurate are the responses?
▪ Deployment Complexity: How intricate is the deployment process?
▪ Effort: How much effort is needed for implementation?
▪ Total Cost of Ownership (TCO): What is the overall cost of owning the solution?
▪ Flexibility of updating: How flexible is the architecture for updates and changes? How straightforward is it to replace or upgrade
components?
1 2 3 4 5
• Simple Prompting (Zero-shot • Prompting with data • Prompt tune a base model to perform • Fine tune a base model for certain non- • Create a domain or use case specific
prompt), Prompting with Contexts retrieved from Vector specific tasks generative tasks model
(n-shot prompt). Embeddings. – Prompt Tuning
• Model parameter adjustment. – LoRA
▪ What is watsonx.ai
The platform
for AI and data A next generation enterprise
studio for AI builders to build,
Fit-for-purpose data store, built on
an open lakehouse architecture,
End-to-end toolkit for AI
governance across the entire model
train, validate, tune, and deploy supported by querying, governance lifecycle to accelerate responsible,
both traditional machine and open data formats to access transparent, and explainable AI
learning and new generative AI and share data. workflows
Scale and capabilities powered by
accelerate the foundation models. It enables
you to build AI applications in a
impact of AI with fraction of the time with a
fraction of the data.
trusted data
watsonx.ai
watsonx.data
Train
Deploy
Generative AI ML Ops
Capabilities Capabilities
Generative AI ML Ops
Capabilities Capabilities
▪ Foundation Models libraries includes IBM’s proprietary models, Third-Party models and Open-Source models
from Hugging Face.
▪ You can find the latest list of supported FM in watsonx.ai here. See the deprecated FM updates here.
Summarize Model creates summaries of natural language Model can be prompt tuned
Prompt Prompt tune
Tuning *Available in Tuning Studio
Classify Model classifies text (e.g., sentiment, group)
Tasks
Foundation Models
Prompting
Trustworthy
▪ The same IP protections for IBM software are applied to this LLM.
▪ Easier to govern.
▪ Full, auditable data lineage available for any IBM Model.
granite-13b-instruct slate-153m
13 billion params 153 million params
Extract Extract
Summarize Classify
Classify
*Fine-tuned for entity extraction,
relationship detection, sentiment Coming Soon Coming Soon
analysis
granite-13b-chat
13 billion params
Q&A
Generate
Trained in accordance with IBM's AI ethics Performs on par with much larger 70b-chat Granite models are competitively priced in
code and principles with transparency in model especially in financial tasks, at faster the market with an almost 3X price-cut.
data curation and processing. response rates.
Financial Acumen
Phrase Bank Question and Answering
– Stock and Earnings Call – Financial Question
Transcripts Answering (x2)
– Financial Question – Insurance
Answering
Summarization
Classification – Corporate Event Detection
– News Headline
Classification
Generative AI MLOps
Capabilities Capabilities
▪ ModelOps covers the end-to-end lifecycles for optimizing the use of models and applications, targeting Machine
Learning models, optimization models and other operational models, from development to deployment stage.
▪ Essential for effectively managing and operationalizing AI models at scale, ensuring compliance, fostering
collaboration, and driving continuous improvement in AI initiatives within enterprises.
▪ AutoAI automates data preparation, model development, feature engineering and hyperparameter optimization.
▪ With AutoAI, beginners can quickly get started and expert data scientists can speed experimentation in AI
development.
▪ Decision optimization streamlines the selection and deployment of optimization models and enables the creation of
dashboards to share results and enhance collaboration.
▪ You can reserve your own watsonx.ai TechZone Lab anytime and use it for self-practice or client demo.
▪ Go to TechZone Certified Base Images (watsonx.ai/.governance SaaS) and click Reserve.
Creating Reservation
▪ Select Purpose as Practice / Self-Education, describe your purpose, select Preferred Geography and End date and time.
Creating Reservation
▪ Select Preferred Geography as AMERICAS Dallas Region (any ITZ account is fine). Select Install DB2? as Yes.
▪ Click agree and hit Submit, wait for the system auto-approval, which usually takes about 10 minutes (Up to 2 hours).
Extending Reservation
▪ A reservation allows lab access up to 3 days. However, you may extend the reservation a few times.
▪ To extend your lab access, go to My reservations and click 3 dots icon, then click Extend.
▪ You will receive an account invitation email from IBM Cloud. Click the link Join now.
▪ Fill up the account details and accept the product Terms and Conditions.
▪ After successfully joining the invitation, you will have access to the invited IBM Cloud account created by TechZone.
▪ Note that the account name contains the itz-watsonx keyword.
▪ Navigate to watsonx.ai by selecting watsonx.ai and proceed by clicking Get started button.
▪ Select Dallas as the region and click Create account or log in button.
▪ Once the project successfully created, you will see your watsonx.ai homepage as follow.
▪ The key features in the homepage are: Prompt Lab, Tuning Studio, Jupyter Notebook Editor, Projects and Resource hub
Structured Mode
▪ Structured mode helps users create effective prompts. Text from the fields is sent to the model in a template format.
Instruction
Add an instruction if it makes sense for your use
case. An instruction is an imperative statement,
such as: Summarize the following article.
Examples
Add one or more pairs of examples that contain
the input and the corresponding output that you
want.
Freeform Mode
▪ In freeform mode you can add your prompt in plain text. Your prompt text is sent to the model exactly as you typed it.
Chat Mode
▪ In chat mode, you can input your prompt in chat style UI.
Sample prompts
▪ You can try the sample prompts provided for Generative AI use cases such as:
▪ Summarization, Classification, Generation, Extraction, Question answering, and Code.
Saving prompts
▪ You can save your prompts for more actions in your workflow.
▪ Prompts can be saved in 3 forms: Prompt template, prompt session or Notebook.
Saved prompts
▪ You can check your saved prompt template and prompt session from the left panel.
Saved prompts
▪ For prompt saved as a Notebook, you can find the notebook as an asset under your Project.
History
▪ You can view the summaries of your recent prompt entries in History tab.
▪ If you save your work as a prompt session, you retain the history. Otherwise, the history will be discarded.
▪ You can restore any of the past session as your current session by simply clicking Restore.
Model Parameters
▪ You can control some settings and techniques to influence the output during model inferencing in LLMs.
▪ These settings are specific to the model inferencing phase and do not affect the model’s training.
Decoding Method
Choose greedy or sampling
Temperature
Range from 0.0 to 2.0
Top P
Range from 0.0 to 1.0
Top K
Range from 1 to 100
Random Seed
Range from 1 to 4,294,967,295
Repetition penalty
Value between 1 or 2
Stopping criteria
Add condition to stopping criteria
▪ You may find the list of all available Foundation Models under Resource hub.
▪ By clicking the tile, you can find the details of each model.
Thank you
IBM and the IBM logo are trademarks of IBM
Corporation, registered in many jurisdictions
worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list
of IBM trademarks is available on ibm.com/trademark.