NotesB.Sc IT (AI)NLP & Large Language Models
Year 2 · Semester 2

NLP & Large Language Models Notes

Program:B.Sc IT (AI)
Semester:Semester 4
Hours:15
Units:8 Units

Subject Overview

How language models work, how to use them, and how to fine-tune them for specific tasks.

Read more

Six modules trace the road from classical NLP and sequence models through the transformer architecture to working with frontier and open models — prompt engineering, structured outputs and function calling — closing with adaptation techniques and the evaluation and safety practices that responsible deployment requires.

Unit-wise Syllabus

8 units — click WhatsApp below to get the full notes for each

1

Unit 1: Classical NLP (2 hours)

  • Tokenization
  • stemming
  • TF-IDF
  • word2vec
  • GloVe
  • why embeddings changed everything

Study guide

This module starts with classical NLP: tokenisation, stemming, TF-IDF, word2vec and GloVe and why embeddings changed everything. Understand embeddings as meaning represented by position in space.

2

Unit 2: Sequence Models (3 hours)

  • RNNs
  • LSTMs
  • the attention mechanism
  • the road from seq2seq to transformers

Study guide

You study sequence models: RNNs, LSTMs, the attention mechanism and the road from seq2seq to transformers. Attention is the idea to master; it explains the next unit.

3

Unit 3: Transformers Deep Dive (3 hours)

  • Self-attention
  • multi-head attention
  • positional encoding
  • reading the 'Attention is All You Need' paper

Study guide

The transformers deep dive covers self-attention, multi-head attention, positional encoding and reading the 'Attention Is All You Need' paper. Read the paper alongside a code walkthrough.

4

Unit 4: Working with LLMs (4 hours)

  • GPT
  • Claude
  • Llama and Mistral families
  • API usage
  • prompt engineering
  • structured outputs
  • function calling

Study guide

You work with LLMs: the GPT, Claude, Llama and Mistral families, API usage, prompt engineering, structured outputs and function calling. Practise writing prompts and measuring the difference they make.

5

Unit 5: Fine-tuning & Adaptation (4 hours)

  • Full fine-tuning
  • LoRA
  • QLoRA
  • instruction tuning
  • when to fine-tune versus prompt versus RAG

Study guide

You study fine-tuning and adaptation: full fine-tuning, LoRA, QLoRA, instruction tuning and when to fine-tune versus prompt versus use RAG. Start with prompting, add RAG for knowledge and fine-tune only when necessary.

6

Unit 6: Evaluation & Safety (4 hours)

  • Benchmarks
  • hallucinations
  • prompt injection
  • content safety
  • bias detection

Study guide

You study evaluation and safety: benchmarks, hallucinations, prompt injection, content safety and bias detection. Always test models on adversarial inputs, not only friendly ones.

7

Unit 7: Tools introduced

  • Hugging Face transformers
  • PEFT and TRL
  • OpenAI / Anthropic / open-source model APIs (Together, Groq, Replicate)
  • Ollama for running local models
  • LangSmith / Langfuse for LLM observability

Study guide

The tools include Hugging Face transformers, PEFT and TRL, model APIs from OpenAI, Anthropic and open-source providers, Ollama for local models and LangSmith or Langfuse for observability. Run a small open model locally to understand cost and latency.

8

Unit 8: Mini-projects

  • Build a sentiment classifier using a fine-tuned BERT
  • fine-tune a 7B open-source model on a domain-specific dataset with LoRA
  • build a chatbot with structured outputs and tool use

Study guide

The mini-projects are a fine-tuned BERT sentiment classifier, a 7B open-source model fine-tuned on a domain dataset with LoRA and a chatbot with structured outputs and tool use. A fine-tuned domain model is a distinctive portfolio item.

Why NLP & Large Language Models Matters

Language models are the most visible and fast-moving area of AI. Understanding transformers, prompting, fine-tuning and evaluation prepares you for roles such as LLM engineer, AI application developer and applied scientist.

How to Prepare for NLP & Large Language Models

  • Implement a small transformer block to understand attention.
  • Evaluate every LLM feature with a test set, not just impressions.
  • Follow current model releases but build on fundamentals.

NLP & Large Language Models: Frequently Asked Questions

What is LoRA?

LoRA is a parameter-efficient fine-tuning method that trains small added matrices instead of all model weights, greatly reducing memory and cost.

What is a hallucination in an LLM?

A hallucination is a confident but incorrect or invented output produced by a language model.

Want the Complete Notes & Past Papers?

WhatsApp us and we'll send you the full notes, question banks, and previous year papers for NLP & Large Language Models.