Notes on AI Engineering

Better Context for your RAG with Contextual Retrieval
Add document context to RAG chunks before embedding them. Build contextual retrieval with Python and compare the retrieved results.
Read the postEarlier posts
Flux.1-Dev - Photorealistic (and Cute) Images
Generate images locally with FLUX.1 and Hugging Face Diffusers. Compare model variants and control image quality with prompts and inference settings.

Experiment Tracking with DVC
Track machine learning experiments with DVC. Version datasets and model parameters, compare metrics, and reproduce training runs.

CryptoGPT: Crypto Twitter Sentiment Analysis
Build a crypto sentiment analysis app with Python, Streamlit, ChatGPT, and LangChain. Collect tweets and turn them into structured sentiment results.

Faster LLM Inference
Benchmark LLM inference with quantization, torch.compile, batching, and Lit-Parrot. Compare generation time and memory use with Python examples.

Document Classification with LayoutLMv3
Fine-tune LayoutLMv3 with PyTorch Lightning to classify document images. Handle imbalanced classes and evaluate predictions with a confusion matrix.
