Logo Stefano Giannini
  • Home
  • About
  • Skills
  • Experiences
  • Education
  • Posts
  • Notes
Logo Inverted Logo
  • Posts
  • Finance
    • Monte Carlo
      • Option Pricing
    • Stock Prediction
      • GRU
      • ARIMA
      • SARIMA
      • SARIMAX
  • Machine Learning
    • Deep Learning
      • Computer Vision
        • Florence-2 LVM
      • NLP
        • GPT-OSS
        • Gemma-2 + RAG
  • Physics
    • Percolation
    • Quantum Computing
      • Introduction
      • Teleportation
Hero Image
Tutorial: GPT-OSS 20B

Open in: GPT-OSS 20B - Tutorial 1. Install Dependencies and Imports import subprocess import sys import os import time import json from datetime import datetime from IPython.display import display, HTML, clear_output, Markdown # Install required packages print("📦 Installing required packages...") subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "openai"]) print("✅ Packages installed successfully!") from openai import OpenAI 📦 Installing required packages… ✅ Packages installed successfully! 2. Setup Display Functions def display_status(message, status="info"): """Display colored status messages""" colors = { "info": "#3498db", "success": "#2ecc71", "warning": "#f39c12", "error": "#e74c3c", "processing": "#9b59b6" } html = f""" <div style="padding: 10px; margin: 10px 0; border-left: 4px solid {colors.

  • Deep Learning
  • NLP
  • Machine Learning
Thursday, August 14, 2025 | 22 minutes Read
Hero Image
Gemma-2 + RAG + LlamaIndex + VectorDB

Open in: 1. Introduction Retrieval-Augmented Generation (RAG) is an advanced AI technique that enhances large language models (LLMs) with the ability to access and utilize external knowledge. This guide will walk you through a practical implementation of RAG using Python and various libraries, explaining each component in detail. 2. Setup and Import %pip install transformers accelerate bitsandbytes flash-attn faiss-cpu llama-index -Uq %pip install llama-index-embeddings-huggingface -q %pip install llama-index-llms-huggingface -q %pip install llama-index-embeddings-instructor llama-index-vector-stores-faiss -q import contextlib import os import torch device = torch.

  • Deep Learning
  • NLP
  • Machine Learning
Sunday, July 14, 2024 | 14 minutes Read

Liability Notice: This website is done experimentally by me, taking inspiration from the open-source Toha-Hugo theme.


Toha Theme Logo Toha
© 2025 Copyright.
Powered by Hugo Logo