AWS BedRock - Boto3 Demo - LLAMA2 Model

Explore LLAMA2 Model using Boto3 Demo

Published Mar 10, 2024
Last Modified Mar 11, 2024

Previous Blog on this Learning Series

All 10 Blogs are under Learning series

Github Link - Notebook

https://github.com/jayyanar/learning-aws-bedrock/blob/main/blog7-LLAMA2/Bedrock_LLAMA2_Boto3.ipynb

Environment Setup

I am using vscode local environment with AWS Credential configured.

Install Latest Python

Upgrade pip

Install latest boto3,awscli, boto3-core

Load the Library

Meta - LLAMA2 Models

Meta has released an accessible version of Llama, a family of large language models utilizing transformer architecture. Llama, trained on publicly available data, demonstrates proficiency in various natural language processing tasks like translation and summarization. Key features include coherent and contextually relevant text generation, achieved through attention mechanisms and masked language modeling during pre-training. Llama 2, an optimized dialogue variant, is tailored for commercial and research use in English, specifically in chat-based applications. It showcases advanced capabilities in text generation and chat optimization, providing a versatile tool for technical applications like chatbots and virtual assistants.
Available Models

Set the Prompt

Configure the Model configuration

Invoke the Model

Parse the response for Text Completion

Text Completion

India has been seeing a steady increase in gold prices over the past few years, and this trend is expected to continue in the near future. There are several factors that contribute to this upward trend, and as an economist with access to lots of data, I will explore some of the key reasons behind the rising gold prices in India.\n\nFirst and foremost, the increasing demand for gold in India is a major driver of its rising price. Gold has always been a prized possession in Indian culture, and it is considered a safe haven investment, especially during times of economic uncertainty. With the global economy facing headwinds, investors are increasingly turning to gold as a hedge against inflation and market volatility. This increased demand for gold has led to a rise in its price.\n\nAnother significant factor contributing to the rising gold prices in India is the country's growing wealth and prosperity. As the Indian economy grows, so does the purchasing power of its citizens. This has led to an increase in the demand for luxury goods, including gold. In fact, India is now the world's second-largest consumer of gold, after China. The rising demand for gold
 

Comments