Pakistan's First Oracle Blog
AnythingLLM - Any LLM, Any Document, Full Control, Full Privacy, Local, Secure
This video shows how to locally install AnythingLLM to privately and securly and remotely run any LLM with any RAG document. It all runs locally with zero required internet connectivity.
How to Install OpenDevin Locally
This is a step by step easy tutorial to locally install OpenDevin which is an open-source project aiming to replicate Devin, an autonomous AI software engineer who is capable of executing complex engineering tasks and collaborating actively with users on software development projects.
Commands Used:
Pre-requisites:
Update OS:
sudo apt-get update
Install git:
sudo apt-get install git
Install Nodejs:
sudo apt-get install nodejs
Install npm:
sudo apt install npm
Install Rust:
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh
Install docker:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Install conda:
wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
bash Anaconda3-2022.05-Linux-x86_64.sh
Install uvicorn:
sudo apt install uvicorn
Backend Commands:
git clone https://github.com/OpenDevin/OpenDevin.git
cd OpenDevin
conda create -n opendevin python=3.11
conda activate opendevin
docker ps
docker pull ghcr.io/opendevin/sandbox
which python
python --version
/home/ubuntu/anaconda3/envs/opendevin/bin/python -m pip install pipenv
/home/ubuntu/anaconda3/envs/opendevin/bin/python -m pipenv install -v
/home/ubuntu/anaconda3/envs/opendevin/bin/python -m pipenv shell
uvicorn opendevin.server.listen:app --port 3000
Frontend Commands:
python -m pipenv requirements > requirements.txt && python -m pip install -r requirements.txt
PYTHONPATH=`pwd` /home/ubuntu/anaconda3/envs/opendevin/bin/python opendevin/main.py -d ./workspace/ -i 100 -t "Write a bash script that prints 'hello world'"
How to Create Urdu Hindi AI Model and Dataset from New Dataset
This video is hands on step-by-step tutorial to create a new dataset, an AI model, fine-tune the model on dataset and then push it to hugging face.
Code:
%%capture
import torch
major_version, minor_version = torch.cuda.get_device_capability()
# Must install separately since Colab has torch 2.2.1, which breaks packages
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
if major_version >= 8:
# Use this for new GPUs like Ampere, Hopper GPUs (RTX 30xx, RTX 40xx, A100, H100, L40)
!pip install --no-deps packaging ninja flash-attn xformers trl peft accelerate bitsandbytes
else:
# Use this for older GPUs (V100, Tesla T4, RTX 20xx)
!pip install --no-deps xformers trl peft accelerate bitsandbytes
pass
!pip install einops
from unsloth import FastLanguageModel
import torch
max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "unsloth/gemma-7b-bnb-4bit", # Choose ANY! eg teknium/OpenHermes-2.5-Mistral-7B
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
token = " ", # use one if using gated models like meta-llama/Llama-2-7b-hf
)
model = FastLanguageModel.get_peft_model(
model,
r = 16, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128
target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
"gate_proj", "up_proj", "down_proj",],
lora_alpha = 16,
lora_dropout = 0, # Supports any, but = 0 is optimized
bias = "none", # Supports any, but = "none" is optimized
use_gradient_checkpointing = True,
random_state = 3407,
use_rslora = False, # We support rank stabilized LoRA
loftq_config = None, # And LoftQ
)
alpaca_prompt = """ذیل میں ایک ہدایت ہے جو فلم کے نام کی وضاحت کرتی ہے، اس کے ساتھ ایک ان پٹ بھی ہے جو مزید دستاویزات فراہم کرتا ہے۔ گانے کے بول لکھنے کے لیے ایک لمحہ نکالیں جو فلم کے نام کے معنی سے میل کھاتا ہے۔
### Instruction:
{}
### Input:
{}
### Response:
{}"""
EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN
def formatting_prompts_func(examples):
instructions = examples["urdu_instruction"]
inputs = examples["urdu_input"]
outputs = examples["urdu_output"]
texts = []
for instruction, input, output in zip(instructions, inputs, outputs):
# Must add EOS_TOKEN, otherwise your generation will go on forever!
text = alpaca_prompt.format(instruction, input, output) + EOS_TOKEN
texts.append(text)
return { "text" : texts, }
pass
from datasets import load_dataset
dataset = load_dataset("fahdmirzac/urdu_bollywood_songs_dataset", split = "train")
dataset = dataset.map(formatting_prompts_func, batched = True,)
from huggingface_hub import login
access_token = "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"
login(token=access_token)
from trl import SFTTrainer
from transformers import TrainingArguments
trainer = SFTTrainer(
model = model,
tokenizer = tokenizer,
train_dataset = dataset,
dataset_text_field = "text",
max_seq_length = max_seq_length,
dataset_num_proc = 2,
packing = False, # Can make training 5x faster for short sequences.
args = TrainingArguments(
per_device_train_batch_size = 2,
gradient_accumulation_steps = 4,
warmup_steps = 5,
max_steps = 100,
learning_rate = 2e-4,
fp16 = not torch.cuda.is_bf16_supported(),
bf16 = torch.cuda.is_bf16_supported(),
logging_steps = 1,
optim = "adamw_8bit",
weight_decay = 0.01,
lr_scheduler_type = "linear",
seed = 3407,
output_dir = "outputs",
),
)
trainer_stats = trainer.train()
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
inputs = tokenizer(
[
alpaca_prompt.format(
"دیے گئے فلم کے نام کے بارے میں ایک مختصر گیت کے بول لکھیں۔", # instruction
"کیوں پیار ہو گیا", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 200, use_cache = True)
tokenizer.batch_decode(outputs)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
inputs = tokenizer(
[
alpaca_prompt.format(
"دیے گئے فلم کے نام کے بارے میں ایک مختصر گیت کے بول لکھیں۔", # instruction
"رنگ", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 200, use_cache = True)
tokenizer.batch_decode(outputs)
model.push_to_hub("fahdmirzac/Gemma_Urdu_Hindi_Bollywood_Songs", token = "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")
Using Claude 3 Haiku Vision with Amazon Bedrock Locally
This video is a hands-on guide as how to use vision features of Anthropic's Claude 3 Haiku AI model with Amazon Bedrock.
Code Used:
Create AI Agent in AWS with Boto3 Code
This video is a step-by-step tutorial with code as how to create Amazon Bedrock AI agents with boto3 in Python to integrate with Lambda.
Code used: Just use any lambda with it of your choice.
Immutable Data Integrity with Oracle's Blockchain Tables
Blockchain tables in Oracle Database implement a unique data organization model, forming chains of insert-only rows. Each row, excluding the first, links back to the previous row using cryptographic hashing. This hashing method leverages row data and the hash of the preceding row to identify any unauthorized modifications through specialized verification procedures. The added capability to store user signatures significantly enhances security against tampering and unauthorized alterations.
Beyond thwarting unauthorized changes initiated by rogue or compromised insiders, blockchain tables boast powerful functionality:
- Identification of illicit modifications made by circumventing Oracle Database protocols.
- Detection of user impersonation and unauthorized data insertions on behalf of another user.
- Safeguarding against data tampering, certifying that all data inserted into the table was done legitimately.
- The chaining mechanism ensures that each row remains linked to its predecessor through cryptographic hashing. Altering any row disrupts this chain, immediately signaling tampering. However, this additional layer of security necessitates increased processing time during commit operations to chain rows effectively.
Let's explore how to create and interact with a blockchain table in Oracle Database through the following example:
-- Creating a blockchain table
SQL> CREATE BLOCKCHAIN TABLE secure_data_table (data_value VARCHAR2(128), sequence_number NUMBER)
NO DROP UNTIL 1 DAYS IDLE
NO DELETE UNTIL 16 DAYS AFTER INSERT
HASHING USING "SHA2_512" VERSION "v1";
Table created.
-- Inserting data into the blockchain table
SQL> INSERT INTO secure_data_table VALUES ('Value1', 1);
1 row created.
SQL> COMMIT;
Commit complete.
-- Querying metadata of the blockchain table
SQL> SELECT column_id, column_name, nullable, hidden_column
FROM all_tab_cols
WHERE table_name LIKE 'SECURE_DATA_%'
ORDER BY column_id;
-- Viewing blockchain table details
SQL> SELECT * FROM dba_blockchain_tables;
In this example, secure_data_table is our blockchain table, ensuring immutable data integrity and providing robust security against unauthorized changes. The SHA2_512 hashing algorithm is employed to maintain the integrity of each chained row, guaranteeing data authenticity and traceability within Oracle Database's secure environment.
Access AWS S3 Bucket from Oracle Database
If you want to access any object stored in an AWS S3 bucket from Oracle database, then dbms_cloud package is your friend, provided you are using Oracle Autonomous database.
An AWS S3 (Simple Storage Service) bucket is a scalable storage resource in the cloud provided by Amazon Web Services. It allows you to store and retrieve any amount of data from anywhere on the web. S3 buckets are highly durable, secure, and can be configured to support various use cases including website hosting, data backup, and content distribution.
The DBMS_CLOUD package in Oracle Database is a PL/SQL package that provides procedures to interact with Oracle Cloud Infrastructure services, specifically for loading data into Oracle Database from external data sources such as object storage in Oracle Cloud. It enables seamless integration between Oracle Database and cloud-based storage for data loading operations, making it easier to ingest large volumes of data into the database from cloud-based sources. The package includes procedures like COPY_DATA for copying data from cloud storage to database tables, and CREATE_CREDENTIAL for managing credentials needed to access cloud storage securely. This package simplifies data loading tasks and enhances integration capabilities between Oracle Database and Oracle Cloud services.
In order to access the object from S3 bucket, make sure you have created a database user in Oracle with proper credentials, and also you have AWS IAM credentials to access S3 bucket.
Step 1: First, you need to create a credential in Oracle Database that allows access to your AWS S3 bucket. This credential will store the AWS access key ID and secret access key securely.
BEGIN
DBMS_CLOUD.CREATE_CREDENTIAL(
credential_name => 'MY_AWS_CREDENTIAL',
username => 'AWS_ACCESS_KEY_ID',
password => 'AWS_SECRET_ACCESS_KEY'
);
END;
/
Step 2: Now, you can use the DBMS_CLOUD package to select data from a file in your AWS S3 bucket and load it into a table in Oracle Database.
DECLARE
v_data CLOB;
BEGIN
v_data := DBMS_CLOUD.GET_OBJECT(
credential_name => 'MY_AWS_CREDENTIAL',
object_uri => 'https://s3.<region>.amazonaws.com/<bucket_name>/<file_key>'
);
-- Process the retrieved data (example: print the data)
DBMS_OUTPUT.PUT_LINE(v_data);
END;
/
Enjoy.
How AI Transcription Can Make Your Next Job Interview More Effective
If you are looking to use AI Transcription during your job interview to get help from LLM, then this video is going to help you immensely.
In the rapidly evolving landscape of recruitment, the integration of Artificial Intelligence (AI) tools has been a game-changer, especially AI transcription services. These services, which convert speech into a written or electronic text document, are now being increasingly utilized during candidate interviews. This innovative approach is not just about efficiency; it's about transforming the interview process into a more insightful, fair, and strategic component of talent acquisition. Let's delve into the merits of using AI transcription in candidate interviews and how it is reshaping the future of hiring.
Enhanced Accuracy and ObjectivityOne of the paramount benefits of using AI transcription is the enhanced accuracy and objectivity it brings to the recruitment process. Traditional note-taking methods during interviews are inherently flawed, prone to human error, and can be biased. AI transcription, on the other hand, captures every word as it is spoken, ensuring that nothing is missed or misinterpreted. This verbatim record allows hiring managers to review the interview with a fine-tooth comb, ensuring that decisions are made based on what was actually said, rather than on recollection or interpretation.
Improved Candidate ExperienceThe candidate experience is crucial in attracting top talent. AI transcription contributes to a more engaging and less intimidating interview environment. Candidates can speak freely, knowing that their responses are being accurately recorded. This level of precision in capturing responses allows candidates to feel heard and valued, improving their overall experience and perception of the company. Furthermore, the efficiency of AI transcription speeds up the interview process, enabling quicker feedback and follow-ups, which candidates appreciate.
Accessibility and InclusivityAI transcription makes interviews more accessible and inclusive, breaking down barriers for candidates who may be deaf or hard of hearing. By providing real-time transcription, these candidates can participate fully in the interview process, ensuring equal opportunities for all. This commitment to inclusivity not only enhances the company's reputation but also widens the talent pool by making it more diverse.
Streamlined Analysis and Decision MakingThe comprehensive data captured by AI transcription allows for a more streamlined analysis of candidates' responses. Hiring teams can utilize this data to identify patterns, evaluate key competencies, and make more informed decisions. AI tools can also highlight specific skills and qualifications mentioned during the interview, making it easier to assess candidates against job requirements. This data-driven approach reduces the likelihood of cognitive biases affecting hiring decisions and helps in selecting the best fit for the role.
Enhanced Collaboration Among Hiring TeamsAI transcription facilitates better collaboration among hiring team members, especially in scenarios where not all members can attend every interview. The transcribed interviews can be easily shared, allowing team members to review and provide input at their convenience. This collaborative approach ensures a more comprehensive evaluation of candidates, drawing on diverse perspectives within the team.
Legal Compliance and Record-KeepingIn today's litigious environment, maintaining accurate records of candidate interviews can be crucial for legal compliance. AI transcription provides an exact record of the conversation, which can be invaluable in defending against claims of discrimination or bias. This level of documentation ensures that the hiring process is transparent and defensible, safeguarding the company against potential legal challenges.
ConclusionThe adoption of AI transcription in candidate interviews is more than just a nod to technological advancement; it's a strategic move towards making the recruitment process more accurate, fair, and inclusive. By enhancing the accuracy of interviews, improving candidate experience, and streamlining decision-making, AI transcription is setting a new standard in talent acquisition. As companies continue to seek competitive advantages in attracting top talent, the use of AI in recruitment processes, especially transcription, is likely to become not just common but essential.
Tutorial to Implement RAG with Gemma Model Locally
Unlock the power of Retrieval-Augmented Generation (RAG) locally using the Gemma model with our detailed step-by-step tutorial. Learn how to enhance your projects by integrating RAG for insightful document processing and AI-driven content generation. Perfect for developers, data scientists, and AI enthusiasts eager to leverage advanced NLP techniques on their own documents. No prior RAG experience required!
Commands Used:
pip install -U "transformers==4.38.1" --upgrade
pip install -q pypdf
pip install -q python-dotenv
pip install llama-index==0.10.12
pip install -q gradio
pip install einops
pip install accelerate
pip install llama-index-llms-huggingface
pip install llama-index-embeddings-fastembed
pip install fastembed
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.llms.huggingface import HuggingFaceLLM
from llama_index.core import Settings
documents = SimpleDirectoryReader("/home/ubuntu/pdfs").load_data()
from llama_index.embeddings.fastembed import FastEmbedEmbedding
embed_model = FastEmbedEmbedding(model_name="BAAI/bge-small-en-v1.5")
Settings.embed_model = embed_model
Settings.chunk_size = 512
from llama_index.core import PromptTemplate
system_prompt = "You are a Q&A assistant. Your goal is to answer questions as accurately as possible based on the instructions and context provided."
query_wrapper_prompt = PromptTemplate("<|USER|>{query_str}<|ASSISTANT|>")
from huggingface_hub.hf_api import HfFolder
HfFolder.save_token('<your huggingface token from huggingface.co>')
import torch
llm = HuggingFaceLLM(
context_window=8192,
max_new_tokens=256,
generate_kwargs={"temperature": 0.7, "do_sample": False},
system_prompt=system_prompt,
query_wrapper_prompt=query_wrapper_prompt,
tokenizer_name="google/gemma-7b-it",
model_name="google/gemma-7b-it",
device_map="auto",
tokenizer_kwargs={"max_length": 4096},
model_kwargs={"torch_dtype": torch.float16}
)
Settings.llm = llm
Settings.chunk_size = 512
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
def predict(input, history):
response = query_engine.query(input)
return str(response)
import gradio as gr
gr.ChatInterface(predict).launch(share=True)
Using JSON in Oracle Database Natively
Oracle Database seamlessly integrates JSON (JavaScript Object Notation) with its robust RDBMS features, offering full support for transactions, indexing, declarative querying, and views among other functionalities.
JSON is a lightweight data interchange format widely employed for representing structured data due to its human-friendly readability and machine-friendly parsing capabilities. It utilizes key-value pairs enclosed in curly braces {}. Each key is a string followed by a colon :, and its value can be a string, number, boolean, array, object, or null. JSON arrays are ordered lists enclosed in square brackets [], while objects represent collections of key-value pairs. This versatile format finds extensive use in web development, APIs, and system-to-system data exchanges owing to its simplicity, adaptability, and clarity—a near subset of JavaScript's object literal notation.
When leveraging JSON within Oracle Database, the typical workflow involves:
Step 1: Creating a JSON-Enabled Table:
CREATE TABLE json_purchase_orders
(id VARCHAR2(32) NOT NULL PRIMARY KEY,
date_loaded TIMESTAMP WITH TIME ZONE,
po_document JSON);
Step 2: Inserting JSON Data into the Table:
INSERT INTO json_purchase_orders
VALUES (SYS_GUID(),
TO_DATE('30-DEC-2014'),
'{"PONumber": 1600,
"Reference": "ABULL-20140421",
"Requestor": "Alexis Bull",
"User": "ABULL",
"CostCenter": "A50",
"ShippingInstructions": {...},
"SpecialInstructions": null,
"AllowPartialShipment": true,
"LineItems": [...]}');
Step 3: Querying JSON Data from the Table:
SELECT po.po_document.PONumber
FROM json_purchase_orders po;
By leveraging Oracle Database's native JSON support, developers gain the flexibility to seamlessly integrate JSON data within the relational model, enabling efficient storage, retrieval, and manipulation of JSON documents alongside traditional SQL operations. This unified approach empowers enterprises to harness the best of both worlds—structured data management and JSON flexibility—within a single, powerful database environment.
Build Your Own Audio Transcription Tool with AI
In this video, you will learn how to deploy a LLM based application intro production by using Amazon Bedrock, Amazon Transcribe to summarize audio files with ASR model, Titan.
Code:
Manage and Run Gemma LLM with Keras Locally
This video shows how to install and manage Gemma LLM with Keras. Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models.
Code:
Oracle GoldenGate Script for Troubleshooting
Oracle GoldenGate is a comprehensive software product that enables real-time data integration, replication, and synchronization across heterogeneous systems. It supports continuous data streaming with minimal latency and offers high availability and data integrity. GoldenGate facilitates data replication between different database platforms, including Oracle Database, Microsoft SQL Server, MySQL, and others, allowing organizations to achieve real-time data integration for analytics, reporting, disaster recovery, and distributed data environments. Its capabilities include data transformation, filtering, conflict resolution, and support for complex replication topologies, making it a powerful solution for maintaining synchronized data across diverse IT landscapes.
This script checks if Oracle Golden Gate process is running or not and give the exact starting point to catch up:
#!/bin/bash
. /etc/profile
#. /home/oracle/.bash_profile
YYMMDD=`date +%Y%m%d`
LOG_DIR=/home/oracle/GGscript/log
WRK_DIR=/home/oracle/GGscript/work
LOG_FL=${LOG_DIR}/${ORACLE_SID}_gg_chk.log
WRK_FL=${WRK_DIR}/gg_chk_${ORACLE_SID}_gg_chk.wrk
BAD_FL=${WRK_DIR}/gg_chk_${ORACLE_SID}_gg_chk.bad
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db_home1
export PATH=$ORACLE_HOME/bin:$PATH/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/local/lib
DBA_MAIL_ADDR='ADD_EMAIL@HERE.com'
HOSTNAME=`uname -n | tr '[a-z]' '[A-Z]'`
{
echo "###########################################"
echo "GG Check Up `basename $0` started t `date`"
#check if maint flag is on
if [ -f /home/oracle/work/${ORACLE_SID}_maintenance.on ] ; then
echo "Maintenance flag is on .... stop "
exit 0
fi
### Check GG processes
cd /ggs
echo "info all" | /ggs/ggsci | sed -e '1,/^Program/d' -e '/^GGSCI/,$d' -e '/^ *$/d' | tee $WRK_FL
echo " "
cat $WRK_FL | grep -v 'RUNNING'| grep -iv 'test' | tee $BAD_FL
non_run_cnt=0
if [ -f $BAD_FL ] ; then
non_run_cnt=`wc -l $BAD_FL |awk '{print $1}'`
fi
echo "GG Process Not Running: $non_run_cnt "
if [[ $non_run_cnt -gt 0 ]] ; then
echo "\nEmail support team ($DBA_MAIL_ADDR) about failed processes "
cat $BAD_FL
mailx -s "$HOSTNAME : ALERT: One or more Goldengate Process in ${ORACLE_SID} are down ($non_run_cnt)!!!" $DBA_MAIL_ADDR < $BAD_FL
fi
rm -f $WRK_FL $BAD_FL $LAGWRK_FL $LAG_FL $LAG_LST
echo "GG Check Up `basename $0` finished at `date`"
echo "###########################################"
} 2>&1 | tee $LOG_FL
Oracle ML and Predictive Analytics with AI
In today's data-driven world, businesses are constantly seeking ways to gain a competitive edge. One of the most potent tools at their disposal is predictive analytics, powered by artificial intelligence (AI). This dynamic combination enables organizations to anticipate future trends, behaviors, and outcomes with unprecedented accuracy, revolutionizing decision-making processes across industries.
Predictive analytics leverages historical data, statistical algorithms, and machine learning techniques to identify patterns and forecast future events. By analyzing vast datasets, AI algorithms can discern hidden correlations and extrapolate insights that human intuition alone may overlook. Whether it's predicting customer behavior, optimizing supply chains, or mitigating risks, the applications of predictive analytics with AI are limitless.
One of the primary advantages of predictive analytics with AI is its ability to enhance operational efficiency and drive strategic decision-making. By harnessing AI-powered predictive models, businesses can anticipate market fluctuations, optimize resource allocation, and streamline processes. For instance, retailers can forecast demand patterns to optimize inventory levels, minimizing stockouts and overstock situations.
Fusion Analytics facilitates seamless integration with Oracle Fusion Cloud ERP and provides easy access to various data sources such as weather, demographics, and supply chain routes. This comprehensive approach allows users to visualize data in a three-dimensional, geospatial format, providing deeper insights into potential implications.
The predictive capabilities of Fusion Analytics are versatile and applicable across different departments within your organization. For instance, finance teams can utilize these capabilities to identify late payments and predict future revenue risks associated with specific customers. HR teams can conduct cluster analysis to identify correlations between employee satisfaction and customer satisfaction, or utilize diversity analysis to monitor indicators of adverse impact in hiring, terminations, and promotions.
Moreover, what sets Fusion Analytics apart is its user-friendly interface, enabling business professionals with varying levels of data expertise to leverage predictive capabilities independently. You don't need to be a data scientist to explore scenarios and make informed decisions. This accessibility has led to widespread adoption among diverse clientele, as businesses leverage Fusion Analytics to anticipate and adapt to changes effectively.
At the heart of Fusion Analytics is machine learning, which drives its predictive capabilities, empowering organizations to operate more successfully by harnessing the power of data-driven insights.
In conclusion, predictive analytics with AI represents a paradigm shift in how businesses leverage data to gain insights and drive innovation, and Oracle ML takes it to next level. By harnessing the power of AI algorithms, organizations can unlock hidden patterns in data, anticipate future trends, and make informed decisions with confidence. As the technology continues to evolve, its transformative impact on businesses and society is only expected to grow, ushering in a new era of predictive intelligence.
Step by Step Guide to Configure Amazon Bedrock with VPC Endpoints and PrivateLink
This video is step by step tutorial to setup AWS Bedrock with VPC Endpoints and PrivateLink to build secure and private generative AI applications.
Steps:
Step 0: Make sure that Private subnet with private route table without any route to internet is there.
Step 1: Create 2 SG = Bedrock-Endpoint-SG and Bedrock-Lambda-SG
Step 2: In Bedrock-Lambda-SG , ADD Bedrock-EndPoint-SG for all traffic in INBOUND, and OUTBOUND FOR 0.0.0.0
Step 3: In Bedrock-EndpointP-SG, Add Bedrock-Lambda-SG for all traffic in INBOUND and OUTBOUND
Step 4: Create 2 endpoints bedrock, bedrock-runtime in private subnet and attach Bedrock-EndpointP-SG with both
Step 5: Create lambda function, set time to 15 seconds, and attach Bedrock-Lambda-SG, lambda execution role should have bedrock permissions
Lambda Code:
import boto3
import json
def lambda_handler(event,context):
bedrock = boto3.client(
service_name='bedrock',
region_name='us-east-1'
)
# Bedrock Runtime client used to invoke and question the models
bedrock_runtime = boto3.client(
service_name='bedrock-runtime',
region_name='us-east-1'
)
models = bedrock.list_foundation_models().get('modelSummaries')
for model in models:
print(model['modelName'] + ', Input=' + '-'.join(model['inputModalities']) + ', Output=' + ''.join(model['outputModalities']) + ', Provider=' + model['providerName'])
return{
'statusCode':200,
}
How to Identify Oracle Database Orphan Sessions
In the world of database management, particularly with Oracle databases, "orphan sessions" are a common issue that can affect performance and resource utilization.
In Oracle databases, an orphan session, sometimes known as a "zombie session," is a session that remains in the database even though its corresponding client process has terminated. These sessions no longer have a user actively interacting with them, yet they consume system resources and can hold locks, leading to performance degradation and blocking issues.
Orphan sessions can occur due to various reasons such as:
- Network issues that disrupt the connection between the client and the server.
- Application or client crashes that terminate the session abnormally.
- Database bugs or misconfigurations.
Oracle OCI's Generative AI Service: A New Era in Cloud Computing
The world of cloud computing is witnessing a revolutionary change with the introduction of Oracle Cloud Infrastructure's (OCI) Generative AI Service. This innovative offering from Oracle is a testament to the rapidly evolving field of artificial intelligence (AI), particularly in the realm of generative models. As businesses and developers seek more efficient and creative solutions, Oracle's new service stands out as a significant milestone.
What is Oracle OCI's Generative AI Service?
Oracle's OCI Generative AI Service is a cloud-based platform that provides users with access to powerful generative AI models. These models are capable of creating a wide range of content, including text, images, and possibly even audio or video in the future. The service is designed to integrate seamlessly with other OCI offerings, ensuring a cohesive and efficient cloud computing experience.
Key Features and Capabilities
Advanced AI Models
At the heart of OCI's Generative AI Service are state-of-the-art AI models that have been trained on vast datasets. These models can generate high-quality, original content based on user inputs, making them invaluable for a variety of applications.
Scalability and Performance
Oracle's robust cloud infrastructure ensures that the Generative AI Service can scale to meet the demands of any project, big or small. This scalability is crucial for handling large-scale AI tasks without compromising on performance or speed.
Integration with OCI Ecosystem
The service is designed to work seamlessly with other OCI products, such as data storage, analytics, and security services. This integration allows for a more streamlined workflow, as users can easily access and combine different OCI services.
Use Cases
The potential applications of Oracle OCI's Generative AI Service are vast and varied. Here are a few examples:
Content Creation
For marketers and content creators, the service can generate written content, images, and potentially other forms of media. This capability can significantly speed up the content creation process and inspire new ideas.
Business Intelligence
Businesses can leverage the AI's ability to analyze and synthesize information to gain insights from data. This can aid in decision-making, trend analysis, and strategy development.
Research and Development
In the R&D sector, the service can assist in generating hypotheses, modeling complex systems, and even predicting outcomes, thereby accelerating the pace of innovation.
Security and Ethics
Oracle recognizes the importance of ethical AI use and has implemented measures to ensure the responsible deployment of its Generative AI Service. This includes safeguards against generating harmful or biased content and maintaining user privacy and data security.
Getting Started with OCI Generative AI Service
To start using the service, users need to have an Oracle Cloud account. Oracle provides comprehensive documentation and support to help users integrate the AI service into their projects.
Conclusion
Oracle OCI's Generative AI Service is a groundbreaking addition to the cloud computing landscape. It offers immense potential for businesses, developers, and creators to harness the power of AI for generating content and gaining insights. As the technology continues to evolve, it will be exciting to see the innovative applications that emerge from this platform.
Oracle's commitment to integrating advanced AI capabilities into its cloud services is a clear indicator of the transformative impact AI is set to have across industries. The OCI Generative AI Service is not just a tool; it's a gateway to a future where AI and cloud computing work hand in hand to unlock new possibilities.
Top Code LLM in the World - Locally Install Stable Code 3B without GPU
This video walks through step by step guide to locally install top code AI Model which can run on CPU and its very small in size.
Code:
pip install transformers torch
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stable-code-3b", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"stabilityai/stable-code-3b",
trust_remote_code=True,
torch_dtype="auto",
)
model.cuda()
inputs = tokenizer("write me a script in Java to reverse a list", return_tensors="pt").to(model.device)
tokens = model.generate(
**inputs,
max_new_tokens=500,
temperature=0.2,
do_sample=True,
)
print(tokenizer.decode(tokens[0], skip_special_tokens=True))
How to Install NVIDIA Drivers on AWS EC2 Instance Windows
This video shows how to install NVIDIA drivers for Windows in AWS EC2 Instance G4DN and other instance types.
Commands Used:
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
aws --version
In new windows, aws configure and set your IAM user key id and secret access key
Run below in Powershell as administrator:
Install-Module -Name AWS.Tools.Installer
$Bucket = "ec2-windows-nvidia-drivers"
$KeyPrefix = "latest"
$LocalPath = "$home\Desktop\NVIDIA"
$Objects = Get-S3Object -BucketName $Bucket -KeyPrefix $KeyPrefix -Region us-east-1
foreach ($Object in $Objects) {
$LocalFileName = $Object.Key
if ($LocalFileName -ne '' -and $Object.Size -ne 0) {
$LocalFilePath = Join-Path $LocalPath $LocalFileName
Copy-S3Object -BucketName $Bucket -Key $Object.Key -LocalFile $LocalFilePath -Region us-east-1
}
}
Talk with Comics Using AI in Any Language
This video shows step by step demo with code as how to analyze comics in any language and talk to them using LlamaIndex and ChatGPT.
Code Used: