Notes and Drafts

This page includes miscellaneous notes and drafts. It provides a place for me to record things that I learn and to share work-in-progress posts. Assume everything here is half-baked, a work in progress, provisional.

Styling Org Callouts for the Site

September 20, 2025

Quick walkthrough of the site’s new callout styling for Org blocks: see the raw markup, the rendered result, and the tiny bit of CSS/JS that makes it work.

Navigating between points with registers

March 8, 2025

Registers provide a very easy way to navigate between different points in Emacs. This note briefly describes how to use them.

Using Python in Emacs

November 12, 2024

I will keep this note up to date with details on how I use emacs for Python development.

Python Package Management with uv

August 21, 2024

Yesterday (<2024-08-20 Tue>), Astral released a bunch of updates to uv, their Python package/project manager, written in Rust. I've been using uv for the past month or two, mostly as a very fast drop-in replacement for venv and pip.

The new release expands uv into "an end-to-end solution for managing Python projects, command-line tools, single-file scripts, and even Python itself."

This post will very briefly explore the workflow I am most interested in—setting up an environment, installing packages, and specifying requirements.

Answer.ai, Claudette, and FastHTML

August 18, 2024

I just listened to the latest episode of the Latent Space podcast, which featured Jeremy Howard of fast.ai fame. Fast.ai was my introduction to deep learning—or at least re-introduction following a brief and theory-oriented treatment of the topic in grad school—and the course and book remain among the best learning resources I have ever encountered. The podcast was a good reminder to look into the projects Howard and his team have been working on at answer.ai, "a new kind of AI R&D lab which creates practical end-user products based on foundational research breakthroughs."

Python interpreter doesn't seem to support readline error in Emacs on MacOS

July 9, 2024

I was encountering this warning when trying to use Python in Emacs on Macos: Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions have been disabled locally. I found years of discussions on this issue, but no solutions. I also found that using Python installed with Conda instead of with virtualenv worked fine. From this, I narrowed down the root cause and found a working solution: (1) install the gnureadline Python package with pip install gnureadline; (2) override the default readline in your virtual environment with python -m override_readline.

In the rest of this note, I will briefly review the steps of the investigation that led me here. Scroll down to the Solution sectionif you're (understandably) not interested in the rest!

Asynchronous Instructor

April 18, 2024

In this example, I was extracting a list of topics from a list of 1000 JSON objects loaded as a list of Python dicts.

I used the Anthropic Haiku model.

Using the instructor library with the asynchronous Anthropic client makes it much faster to make a large number of calls to the Anthropic API fairly quickly.

Logging and Loading a QLoRA Model with MLflow

April 17, 2024

This is a minimal example of how to log an MLflow qlora model. It does not show any actual model training or data processing, just the basic process of saving the model.

Troubleshooting Flash Attention Installation

April 16, 2024

I have repeatedly run into issues getting flash-attention working correctly with whatever version of PyTorch and CUDA I happen to be working with. I found a working pattern, at least for the platform I tend to be working on (Databricks). This note is a quick summary.

Intro to QLoRA

April 5, 2024

I have a basic understanding of what QLoRA is, but given its popularity and apparent success, I am not nearly familiar enough with it. These are my notes on the Hugging Face blog post about QLoRA and quantization. Later, I will also make a note with some examples.

DBRX with MLflow

April 4, 2024

This note shows how to access Databricks foundation model APIs via OSS MLflow deployments server and via the MLflow OpenAI model flavor.

Using the DBRX Model with Instructor

April 3, 2024

This note briefly demonstrates how to use the Instructor library with the Databricks DBRX model via the Databricks Foundation Models API.

MLX Quickstart

April 1, 2024

These are my notes on the MLX quick start guide and usage notes. It's a work in progress. Ultimately, I'm interested in learning what MLX will let me do with LLMs on my laptop. I might write something more substantial on that topic in the future. For now, you're probably better off consulting the docs yourself than looking at my notes on them.

PyTorch Review

March 31, 2024

This is a quick run through the appendix on PyTorch from Sebastian Raschka's Build a Large Language Model (From Scratch) book, currently available via Manning's MEAP. I haven't spent an enormous amount of time with PyTorch in the last year or so, so it seemed worth the effort to work through it.