Archive | Tags

AI Tool Review - Langfuse + LiteLLM

February 11, 2024  •  llms | ai | ml | langfuse | litellm | python | ai tool review
How to use the open source projects Langfuse and LiteLLM to automatically log your LLM calls across 100+ providers under a single interface

Transformer Math (Part 1) - Counting Model Parameters

How many parameters are in a HuggingFace model? A case study with GPT2

AI Tool Review - LM-Format-Enforcer for controlling LLM outputs

January 9, 2024  •  llms | ai | ml | hallucinations | lm-format-enforcer | python | ai tool review
How to use LM Format Enforcer to guarantee your LLM outputs valid JSON

How to properly take screenshots with Playwright and Selenium

January 2, 2024  •  websites | selenium | playwright | google chrome
A trick for capturing <select> menu popups that won't normally get included.

How to view (x,y) coordinates in Chrome Debugger

January 2, 2024  •  websites | google chrome | debugging
Get the (x,y) coordinates of arbitrary points on a webpage

AI Tool Review - ChromaDB as a local vector database for RAG

December 31, 2023  •  llms | ai | ml | chromed | rag | vector db | python | ai tool review
Some code snippets / tips for using ChromaDB

AI Tool Review - Outlines library for controlling LLM outputs

December 29, 2023  •  llms | ai | ml | hallucinations | outlines | python | ai tool review
A quick tutorial on how to use Outlines to guarantee your LLM outputs valid JSON

AI Tool Review - Microsoft LIDA for data exploration

September 27, 2023  •  llms | ai | ml | data exploration | lida | eda | microsoft | pandas | python | ai tool review
Trying out LIDA, an LLM-based data exploration tool from Microsoft Research

Diffusion Models from Scratch

July 1, 2023  •  diffusion models | machine learning | python | tutorial
Beginner's tutorial on how diffusion models work, with Python code + mathematical derivations and explanations

Python Argparse Cheatsheet

June 16, 2023  •  python | cli | argparse
Basic argparse template for Python 3

Productivity Tips for Jupyter Notebook

June 15, 2023  •  jupyter | python | vscode
How to be more productive using Jupyter notebook

Publish Python Package on PyPI with Poetry

April 27, 2023  •  python | poetry | packaging

How to package a Python library using Poetry and publish it on PyPI.

Screen utility - Enable scrolling by default

March 23, 2023  •  screen | linux | cli
Add `termcapinfo xterm* ti@:te@` to your `~/.screenrc` to enable normal scrolling

The default screen utility annoyingly requires you to hit Ctrl+A [ to scroll back through your terminal’s output buffer (by switching to “copy mode”). Otherwise, scrolling will cause you to cycle past your previous commands instead of scrolling back up in your terminal’s output.

How to Run Sbatch in Slurm

March 21, 2023  •  slurm | sbatch | compute | remote server
How to create and run an Sbatch job on Slurm

Flaregun - A Tiny PyTorch Helper Library

March 20, 2023  •  pytorch | ml
Figure out how much GPU memory is available on an Nvidia device in real-time, how many params are in a PyTorch model, etc.

Notes for Harvard's CS 287 NLP Course

March 14, 2023  •  AI | nlp | lecture notes

NOTE: These are all taken from Chris Tanner’s great NLP course CS 287 (taught at Harvard). None of this is my own work. This is just a collection of screenshots and notes from my own reading of the course’s lecture slides for my own reference and understanding. I would highly recommend reading the full lecture slides available here.

Helpful Linux Commands

February 28, 2023  •  linux | terminal
A list of helpful Linux commands, such as checking GPU memory usage, listing processes running on a specific port, etc.

How to Analyze Memory Usage of Folders/Files on your Mac

January 3, 2023  •  Mac | memory

Three ways to view memory usage (i.e. “disk usage”) on your Mac, in descending order of preference.

Walkthrough of the OMOP CDM (Part 1)

December 30, 2022  •  omop | databases | health IT | ehrs | healthcare
Defining core concepts in the OMOP CDM

In Part 1 of this series on the OMOP CDM, we explain what the OMOP CDM is, define key terms such as “concept”, “source value”, “vocabulary”, and “domain”, and describe how they related to each other.

Python Line-by-Line Profiling of a Program's Speed

December 12, 2022  •  python | profiling | devops
How to profile your Python program line-by-line in 0 lines of code, 2 lines of shell commands

How long does each line in your Python program take to run?