Skip to content

Instantly share code, notes, and snippets.

@mseri
mseri / index.html
Last active April 24, 2026 09:10
color checker from photo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<style>
*{box-sizing:border-box;margin:0;padding:0}
body{background:#111;color:#f0f0f0;font-family:system-ui;padding:12px;max-width:500px;margin:0 auto}
h2{font-size:17px;margin-bottom:10px}
.btns{display:flex;gap:8px;margin-bottom:10px}
@mseri
mseri / llm-wiki.md
Created April 5, 2026 06:40 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@mseri
mseri / granite-speech.py
Created March 18, 2026 08:54
Pure PyTorch implementation of granite speech and simple cli (using VAD to reduce memory footprint). Implemented with substantial help from copilot
# /// script
# requires-python = ">=3.9"
# dependencies = [
# "torch>=2.1.0",
# "torchaudio>=2.1.0",
# "transformers>=4.40.0",
# "soundfile>=0.12.1",
# "silero-vad>=5.1.2",
# ]
# ///
@mseri
mseri / README.md
Created February 19, 2026 11:06
Local transcription on low resource laptops (e.g. intel macs) with qwen-asr

Preparation

First download mic2wav.swift above and compile it with swiftc mic2wav.swift. Move it to a bin folder on the path, or in the qwen-asr folder once it has been created.

Get and compile qwen-asr:

git clone https://github.com/antirez/qwen-asr
cd qwen-asr
make blas
@mseri
mseri / hr-to-newpage.lua
Created January 28, 2026 09:18
convert markdown to pdf - atkinson font - decent
function HorizontalRule(el)
return pandoc.RawBlock('tex', '\\newpage')
end
@mseri
mseri / qwen3_tts_play.py
Created January 23, 2026 16:12
qwen-3 tts player
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "transformers>=5.0.0rc1",
# "mlx-audio==0.3.0rc1",
# "click",
# "numpy",
# "soundfile",
# "sounddevice",
# ]
@mseri
mseri / textbooks.md
Created December 2, 2025 09:21 — forked from mikephys8/textbooks.md
Alex Stef's list of freely-available mathematics textbooks

Textbooks in Mathematics

A list of links to useful mathematical textbooks available for free on the Internet. They are all legal and maintained by their authors or by the legitimate publisher.

All the documents are in English. They are in a printable format - Postscript or Adobe Portable Document Format. You are free to download, read and print them. Here are some links to other sites offering lists of free mathematical textbooks.

For any comments, please, contact me: alex_stef@yahoo.com

@mseri
mseri / grpo_demo.py
Created November 6, 2025 19:57 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
@mseri
mseri / lll.sh
Last active December 3, 2025 17:44
llama-launcher
#!/bin/bash
set -euo pipefail
MODELS="aquif, gemma3, granite4, granite4-moe, lfm2, lfm2-moe, lfm2-vl, ministral3 (3,8B;i,r), nemotron, qwen3(i,r), voxtral"
function usage() {
echo "Usage: $0 <model> [options]"
echo "Models: $MODELS."
echo "Options:"
echo " --dry to see the invocation string only"
@mseri
mseri / llm-hackathon.md
Created July 8, 2025 15:31 — forked from chriscarrollsmith/llm-hackathon.md
Coders' Colaboratory mini-hackathon on `llm` by simonw

Let's hack on llm!

If you have uv installed (and you should!), you can install llm globally in a uv-managed tool environment with:

uv tool install llm

If you want to use models other than OpenAI models, you'll need some extensions: