Skip to content

Instantly share code, notes, and snippets.

View uogbuji's full-sized avatar

Uche Ogbuji uogbuji

View GitHub Profile
@uogbuji
uogbuji / wordloom.md
Last active May 1, 2024 17:39
Word Loom proposed update

Word Loom is a convention for expressing language text and templates for AI language model-related uses, for example prompt templates. The format is based on TOML, and word looms are meant to be kept in resource directories for use with code invoking LLMs.

Basic principles:

  1. Separation of code from natural language
    • Must be a straightforward process to translate any natural language elements
  2. Composability of natural language elements
  3. Friendliness to mechanical comparisons (i.e. via diff)
  4. Friendliness to traditional globalization (G11N) techniques
@uogbuji
uogbuji / MLX-day-one.md
Last active March 20, 2024 06:04
MLX Day One (Apple Silicon native AI model ops)

I've been using llama.cpp on Mac Silicon for months now, and my brother, Chimezie has been nudging me to give MLX a go. I finally set aside time today to get started, with an eventual goal of adding support for MLX model loading & usage in OgbujiPT. I've been warned it's rough around the edges, but it's been stimulating to play with. I thought I'd capture some of my notes, including some pitfalls I ran into, which might help anyone else trying to get into MLX in its current state.

As a quick bit of background I'll mention that MLX is very interesting because honestly, Apple has the most coherently engineered consumer and small-business-level hardware for AI workloads, with Apple Silicon and its unified memory. The news lately is all about Apple's AI fumbles, but I suspect their clever plan is to empower a community of developers to take the arrows in their back and build things out for them. The MLX

@uogbuji
uogbuji / python-nigeria-logo-blackfill.svg
Last active March 15, 2024 23:59
Python Nigeria Logo in SVG form
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# See https://github.com/uogbuji/OgbujiPT/issues/19
import sys
import asyncio
import openai
from ogbujipt.async_helper import schedule_callable # , openai_api_surrogate
from ogbujipt import config
from ogbujipt.prompting.basic import format
from ogbujipt.prompting.model_style import ALPACA_DELIMITERS
@uogbuji
uogbuji / orca_experiments.ipynb
Created July 10, 2023 14:58
Jupyter Notebook Experiment: Trying out orca_mini_v2_13b LLM
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Python dev environment on Mac

User local install as much as possible, leaving system-wide kit alone, and no mega-distributions such as homebrew. Tested all the way through Ventura.

SSH

Make sure SSH is set up. Allow a remote computer to access your Mac and generate a new SSH Key. See appendix below.

There is automatically an ssh agent. Just use ssh-add.

@uogbuji
uogbuji / debian-pydev.md
Last active August 25, 2023 01:10
My Python dev setup for Linux (Debian, Ubuntu, Mint & ChromeOS/Crostini)

Python dev environment on Linux

User local install as much as possible, leaving system-wide kit (e.g. python & python-pip .debs) alone. Tested on Debian, Ubuntu, Mint & ChromeOS/Crostini.

Environment

Set up the dev environment (this is the only system-wide part):

sudo apt install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev
@uogbuji
uogbuji / pixelbook-dev-setup.md
Last active July 10, 2023 14:53 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook or Pixel Slate Setup

Partly updated June 2023

General caution: Chrome OS is a secure OS by design, but this has at least one key consequence. If you change your Google account password, you will still be required to enter the old password the next time you access each Chrome OS device. Devices are encrypted with that password, so the OS needs to decrypt using the old password then re-encrypt using the new one. If you forget your old password you will lose access to your Chrome OS device data. As always, make sure you keep backups up to date.

Fast User Switching

If you have multiple Chrome OS accounts (Say, work and play), you can quickly sitch between them without logging out:

Osi Ogbuji, 18, part of the DenLug Lego builder’s club, demonstrates his remote-control Lego truck that can pick up small objects. Caption: Osi Ogbuji, 18, part of the DenLug Lego builder’s club, demonstrates his remote-control Lego truck that can pick up small objects.

By David Gilbert, from "Oktoberfest offers authentic fun" in The Littleton Independent