Skip to content

AILAB-CEFET-RJ/sbbd2025_course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ SBBD 2025 Short Course – Notebooks

This folder contains the teaching notebooks for the course Introduction to LLM-Based Agents (SBBD 2025).

πŸ› οΈ Installation

First, create and activate the conda environment, then install dependencies:

pip install -r requirements.txt

## πŸ–₯️ Running on CPU vs. GPU

All HuggingFace models in these notebooks are configured to run on the **CPU**:

```python
model_kwargs={"device": "cpu"}

Why CPU?

  • Some entry-level GPUs (e.g., GeForce GT 1030) do not support the CUDA compute capabilities required by recent PyTorch and Transformers builds.
  • Using CPU ensures the notebooks run consistently across all machines, including student laptops without dedicated GPUs.
  • Results are identical between CPU and GPU. The only difference is speed (GPU can be faster, when supported).

Can I use GPU?

Yes β€” if your GPU is compatible and you have a working CUDA installation, simply remove the explicit {"device": "cpu"} option. For example:

embedding_model = HuggingFaceEmbeddings(
    model_name="sentence-transformers/all-MiniLM-L6-v2"
)

or for text generation:

generator = pipeline("text-generation", model="gpt2")  # GPU if available

πŸ“‚ Notebook Index

  • 00_intro.ipynb β€” Environment check and first LLM calls
  • 01_ngram_vs_llm.ipynb β€” classic n-gram models x LLMs
  • 02_minimal_agent.ipynb β€” LLM as brain, agent as body
  • 03_prompting_patterns.ipynb β€” Prompting and interaction patterns
  • 04_tool_calling.ipynb β€” Structured tool calling with LangChain
  • 05_rag_pipeline.ipynb β€” Retrieval-Augmented Generation (RAG) with ChromaDB
  • 06_text_to_sql.ipynb β€” Text-to-SQL pipeline with SQLite

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published