Denken
Menu
  • About Me
  • Deep Learning with Pytorch
  • Generative AI: Tutorial Series
  • Python Tutorials
  • Contact Me
Menu

Generative AI: LLMs: LangChain + Llama-2-chat on Amazon mobile review dataset 1.6

Posted on August 17, 2023August 17, 2023 by Aritra Sen

In the last post we talked about in detail how we can fine tune a pretrained Llama-2 model using QLoRA. Llama-2 has two sets of models, first one was the model used in previous blogpost which is pretrained model then there is a instruction finetuned Llama-2 chat model which we will use in this post.
Llama-2 has been pretrained on an extensive corpus of self-supervised data, followed by alignment with human preferences via techniques such as Reinforcement Learning with Human Feedback (RLHF) to obtain the Llama-2 chat as shown in the below given image (Source: Llama2 paper)

Prompt formats are kind of different in case of Llama-2 and Llama-2 as shown below-

Langchain:

LangChain gives us the building blocks to interface with any language model.

  • Prompts: Templatize, dynamically select, and manage model inputs
  • Language models: Make calls to language models through common interfaces.
  • Output parsers: Extract information from model outputs.
Langchain flow (Source: Model I/O | 🦜️🔗 Langchain)

In the below notebook, we will try out Llama-2-chat model and will explore the benefits of using Langchain as a platform to several LLM tasks like

  1. Text summarization
  2. Sentiment Analysis
  3. Topic extraction
  4. Battery issues identification from mobile review.

Do like, share and comment if you have any questions or suggestions.

Category: Aritra Sen, Machine Learning, Python

Post navigation

← Generative AI: LLMs: Finetuning Llama2 with QLoRA on custom dataset 1.5
Generative AI: LLMs: Semantic Search and Conversation Retrieval QA using Vector Store and LangChain 1.7 →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

RSS Feeds

Enter your email address:

Delivered by FeedBurner

Pages

  • About Me
  • Contact Me
  • Deep Learning with Pytorch
  • Generative AI: Tutorial Series
  • Python Tutorials

Tag Cloud

Announcements Anrdoid BERT Bias Celebration Cricket CyanogenMod deep-learning Denken Experience Facebook Features Finetuning GCN GenerativeAI GNN Google HBOOT HBOOT downgrading HTC Wildfire huggingface India Launch Life LLM Lumia 520 MachineLearning mobile My Space nlp Orkut People Python pytorch pytorch-geometric Rooting Sachin Share Social Network tranformers transformers Tutorials Twitter weight-initialization Windows Phone

WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

Categories

Random Posts

  • Android Apps-You must have
  • #SachinIsGod
  • Deep Learning with Pytorch-CNN – Getting Started – 2.0
  • Orkut vs Facebook
  • Generative AI: LLMs: Getting Started 1.0

Recent Comments

  • Generative AI: LLMs: Reduce Hallucinations with Retrieval-Augmented-Generation (RAG) 1.8 – Denken on Generative AI: LLMs: Semantic Search and Conversation Retrieval QA using Vector Store and LangChain 1.7
  • vikas on Domain Fuss
  • Kajal on Deep Learning with Pytorch -Text Generation – LSTMs – 3.3
  • Aritra Sen on Python Tutorials – 1.1 – Variables and Data Types
  • Aakash on Python Tutorials – 1.1 – Variables and Data Types

Visitors Count

AmazingCounters.com

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright

AritraSen’s site© This site has been protected from copyright by copyscape.Copying from this site is stricktly prohibited. Protected by Copyscape Original Content Validator
© 2025 Denken | Powered by Minimalist Blog WordPress Theme