here you goThings I’ve made, read and saved — shared here.

Archive

9,619 entries: 60 from X, 8,926 from Pinboard, saved 1998 to 2026.

Browse by tag, site, author, folder or language

Tags

Sites

Authors

Folders

Languages

Showing 1,201–1,250 of 9,619

2025

Sky-T1: Train your own O1 preview model within $450

novasky-ai.github.io

Stanford's Sky Lab announced the "Sky-T1" model that performs competitively in reasoning and coding while comparison to OpenAI's o1 model, while using a small compute budget.

They set about to produce this open-weights model because the current leaders like o1 and gemini 2.0 flash thinking while excel in reasoning, showing the ability to solve complex tasks by producing a long internal chain of thought, among other advancements. However, the technical details and model weights are un-accessible.

Summary:

  • They used QwQ to generate training data (with some cleanup using GPT-4o-mini)
  • The training data was then used to FT Qwen2.5-32B-Instruct (non-reasoning model)
  • Result was that Sky-T1 performs slightly worse than QwQ but much better than Qwen2.5 on reasoning tasks.

This is pretty interesting as it shows how you can FT a foundation model to do better at reasoning.


Inference time compute is still underutilized for AI deployments. It is better to distill the reasoning from larger models like R1 for specific tasks. Even better, one can mix in custom thinking instructions for specific sub-problems, so that a fine-tuned model learns o mix of task specific reasoning and custom logic. This can often beat custom prompt iteration. 🔗

This Guide: Train a Reasoning Model | Kiln AI Docs goes into how to distill for thinking models.

Flat Github - see data hosted on github

flatgithub.com

Flat explores how to make it easy to work with data in git and GitHub. It builds on the “git scraping” approach pioneered by Simon Willison to offer a simple pattern for bringing working datasets into your repositories and versioning them, because developing against local datasets is faster and easier than working with data over the wire.

An example of this in action is - All .gov domains via HN

Pinboard Database Schema

static.pinboard.in

the mysql database schema that powers pinboard.in. useful if you are trying to create your own pinboard like service.

-- MySQL dump 10.13   
--  
-- Pinboard database schema  
-- Feel free to use this however you like. Send questions to support@pinboard.in. 
-- For best results, use the Percona version of MySQL! http://www.percona.com/software/percona-server/  


CREATE TABLE `bookmarks` (  
    `id` int(11) NOT NULL,  
    `url` mediumtext,        -- verbatim URL (may differ from actual URL referenced by url_id)  
    `title` varchar(255),  
    `description` mediumtext,  
    `user_id` int(11) NOT NULL,  
    `toread` tinyint(1) DEFAULT '0',  
    `private` binary(1) DEFAULT '0',  
    `url_id` int(11),     
    `slug` char(20),         -- opaque token for use in URLs  
    `snapshot_id` int(11),  
    `code` char(3),          -- http response code (if crawled)  
    `source` smallint(6),    -- numeric     
    `added_at` datetime,     -- date added to Pinboard  
    `created_at` datetime,   -- stated creation date  
    `updated_at` datetime,  
  
    PRIMARY KEY (`id`),  
    UNIQUE KEY `slug` (`slug`),     
    UNIQUE KEY `bookmark` (`user_id`,`url`(255)),  
    KEY `created` (`created_at`),  
    KEY `user` (`user_id`),  
    KEY `private` (`private`),  
    KEY `url` (`url_id`),  
    KEY `toread` (`toread`),  
    KEY `updated` (`updated_at`),  
    KEY `snapshot` (`snapshot_id`),  
    KEY `code` (`code`),  
    KEY `multi` (`user_id`,`private`,`toread`,`created_at`)  
) ENGINE=InnoDB DEFAULT CHARSET=utf8;  
     
  
-- Table structure for table `btags` (short for 'bookmark tags')  

  
CREATE TABLE `btags` (  
    `id` int(11) NOT NULL,     
    `user_id` int(11) NOT NULL,  
    `bookmark_id` int(11) NOT NULL,  
    `url_id` int(11),  
    `tag` varchar(255),  
    `created_at` datetime,     
    `private` tinyint(1),     
    `seq` tinyint(4),         -- preserve display order  
    PRIMARY KEY (`id`),  
    UNIQUE KEY `btag` (`user_id`,`bookmark_id`,`tag`),  
    KEY `user` (`user_id`),  
    KEY `tag` (`tag`),  
    KEY `bookmark` (`bookmark_id`),  
    KEY `url` (`url_id`),  
    KEY `private` (`private`),  
    KEY `usertag` (`user_id`,`tag`)  
) ENGINE=InnoDB DEFAULT CHARSET=utf8;   
     
  
  
  
-- Table structure for table `snapshots`  
-- (snapshots are directories created by wget)  
  
CREATE TABLE `snapshots` (  
    `id` int(11) NOT NULL,  
    `url_id` int(11) NOT NULL,  
    `crawled_at` datetime,     
    `slug` varchar(30),  
    `content_type` varchar(200),     
    `etag` varchar(255),                  -- from Etag header     
    `last_modified` varchar(255),         -- from Last-Modified header     
    `code` char(3),                       -- http status code  
    `content_length` varchar(20),         -- from Content-Length header  
    `num_files` smallint(6),                      
    `size` int(11),                       -- size in bytes of snapshot files  
    `filename` varchar(255),              -- which file in this snapshot to serve  
    `updated_at` datetime,  
    `user_id` int(11),  
    `remote_backup` datetime,                     
    `flagged` binary(1) DEFAULT '0',  
    `actual_url_id` int(11),              -- where we ended up after redirects  
    `server` varchar(200),                -- where this snapshot is stored  
    `charset` varchar(20),                -- detected charset (don't trust servers!)  
    PRIMARY KEY (`id`),  
    UNIQUE KEY `user_url` (`url_id`,`user_id`),  
    KEY `size` (`size`),  
    KEY `content_length` (`content_length`),  
    KEY `content_type` (`content_type`),  
    KEY `slug` (`slug`),  
    KEY `user_id` (`user_id`),  
    KEY `code` (`code`),  
    KEY `crawled` (`crawled_at`)  
) ENGINE=InnoDB DEFAULT CHARSET=utf8;  
     
  
  
     
--  
-- Table structure for table `urls`  
--  
  
CREATE TABLE `urls` (  
    `id` int(11) NOT NULL,  
    `url` mediumtext CHARACTER SET latin1,  -- latin1 reduces storage requirement  
    `create

Alexander Grothendieck

Alexander Grothendieck on learning to be alone.

"In those critical years I learned how to be alone. [But even] this formulation doesn't really capture my meaning. I didn't, in any literal sense learn to be alone, for the simple reason that this knowledge had never been unlearned during my childhood. It is a basic capacity in all of us from the day of our birth. However these three years of work in isolation [1945–1948], when I was thrown onto my own resources, following guidelines which I myself had spontaneously invented, instilled in me a strong degree of confidence, unassuming yet enduring, in my ability to do mathematics, which owes nothing to any consensus or to the fashions which pass as law....By this I mean to say: to reach out in my own way to the things I wished to learn, rather than relying on the notions of the consensus, overt or tacit, coming from a more or less extended clan of which I found myself a member, or which for any other reason laid claim to be taken as an authority. This silent consensus had informed me, both at the lycée and at the university, that one shouldn't bother worrying about what was really meant when using a term like "volume," which was "obviously self-evident," "generally known," "unproblematic," etc....It is in this gesture of "going beyond," to be something in oneself rather than the pawn of a consensus, the refusal to stay within a rigid circle that others have drawn around one—it is in this solitary act that one finds true creativity. All others things follow as a matter of course.

Since then I've had the chance, in the world of mathematics that bid me welcome, to meet quite a number of people, both among my "elders" and among young people in my general age group, who were much more brilliant, much more "gifted" than I was. I admired the facility with which they picked up, as if at play, new ideas, juggling them as if familiar with them from the cradle—while for myself I felt clumsy, even oafish, wandering painfully up an arduous track, like a dumb ox faced with an amorphous mountain of things that I had to learn (so I was assured), things I felt incapable of understanding the essentials or following through to the end. Indeed, there was little about me that identified the kind of bright student who wins at prestigious competitions or assimilates, almost by sleight of hand, the most forbidding subjects.

In fact, most of these comrades who I gauged to be more brilliant than I have gone on to become distinguished mathematicians. Still, from the perspective of thirty or thirty-five years, I can state that their imprint upon the mathematics of our time has not been very profound. They've all done things, often beautiful things, in a context that was already set out before them, which they had no inclination to disturb. Without being aware of it, they've remained prisoners of those invisible and despotic circles which delimit the universe of a certain milieu in a given era. To have broken these bounds they would have had to rediscover in themselves that capability which was their birthright, as it was mine: the capacity to be alone."

From Récoltes et Semailles. via

notes#mathematics#person

Deep Dive into LLMs like ChatGPT

youtube.com

This is a general audience deep dive into the Large Language Model (LLM) AI technology that powers ChatGPT and related products. It is covers the full training stack of how the models are developed, along with mental models of how to think about their "psychology", and how to get the best use them in practical applications. I have one "Intro to LLMs" video already from ~year ago, but that is just a re-recording of a random talk, so I wanted to loop around and do a lot more comprehensive version.

LocalSend: Share files to nearby devices

Free, open-source, cross-platform. Share files without a central server. The file transfer is completely peer-to-peer.

LocalSend is available for Windows, macOS, Linux, Android, and iOS.

LocalSend is free to use. No ads, no tracking, no hidden costs.

The source code is publicly available. Everyone can contribute to the project.

End-to-end encryption ensures that only you and the recipient can access your files.

A simple user interface without registration. Other devices are discovered automatically.

notes#clippings#linux#macos#software

DeepSeek

DeepSeek is a AI research company from China that has been doing cutting edge work in the area of Large Language Models, including DeepSeek-R1.

DeepSeek tried to do one thing: transplant its own model to Huawei Ascend 910B chip to run. Through the "dynamic precision adjustment" technology, they only lost 5% of the performance in the same task, but the cost dropped by 70%. via

notes#llm#opensource

Search AI

AI enabled Search. What do we mean by that?

Search engines that deal with embeddings, rerankers, LLMs, web scrapers, classifiers over multilingual and multimodal data.

Jina.AI is a player in this arena with many models; e.g: Reader-LM-v2 to convert Raw HTML to markdown. It is a 1.5B parameter language model that converts raw HTML into markdown or JSON, handling up to 512K tokens combined input/output length with support for 29 languages. Unlike its predecessor that treated HTML-to-markdown as a 'selective-copy' task, v2 approaches it as a translation process, enabling superior handling of complex elements like code fences, nested lists, tables, and LaTeX equations.

notes

The Mathematics of Artificial Intelligence: In this introductory and highly subjective survey, aimed at a general mathematical audience, I showcase some key the…

@gabrielpeyre

The Mathematics of Artificial Intelligence: In this introductory and highly subjective survey, aimed at a general mathematical audience, I showcase some key theoretical concepts underlying recent advancements in machine learning. https://arxiv.org/abs/2501.10465 https://twitter.com/gabrielpeyre/status/1881993062441980230/photo/1

@gabrielpeyre Gabriel PeyréXPermalink1,913 likes, 400 reposts, 26 replies

Photo from the post

2024

FrigadeHQ/trench

github.com

Trench — Open-Source Analytics Infrastructure. A single production-ready Docker image built on ClickHouse, Kafka, and Node.js for tracking events. Easily build product analytics dashboards, LLM RAGs, observability platforms, or any other analytics product.

Event Driven Systems

Drasi by Microsoft makes it easy and efficient to detect and react to changes in databases; source: github/drasi-project/drasi-platform

 It tracks system changes and events without the need to copy data to a central data lake or repeatedly query data sources. Drasi uses queries to continuously evaluate incoming data changes. When the changes match the criteria and conditions specified in these queries the result sets of these queries are updated. These updates then trigger context-aware reactions defined tuned to your specific requirements.

Drasi operates through three components:

  • Sources connect to data repositories within software systems to monitor logs and feeds to track changing data.
  • Continuous Queries interpret monitored changes by applying criteria and conditions to identify significant changes. In Drasi, these Continuous Queries are written using the Cypher Query Language.
  • Reactions trigger meaningful responses based on updates to the result sets of the Continuous Queries.

Drasi uses Cypher Query Language for Continuous Query Syntax

See also:

  • Feldera -- The Incremental Compute Engine for AI, ML and data teams. Feldera is a fast query engine with the unmatched ability to evaluate arbitrary SQL programs incrementally, over any number of live and historical data sources. Process millions of events per second and scale to larger than memory datasets, even on your laptop.. Commerical offering
  • Materialize; commercial offering.

notes#distributed-systems#event-driven-systems

nother.wiki

Status: DRAFT

nother -- a wiki software that is written using javascript / typescript, and to be deployed on cloudflare using sst.

The idea came to me after learning about otterwiki; only do this purely using cloudflare infrastructure -- workers, r2 storage, and d1 db engine, all of which are provided by cloudflare.

I registered nother.wiki domain 😬

some good ideas to consider/steal:

  • make it work for obsidian users to publish their entire vault (or parts of it?)

notes#cloudflare#ideas#javascript#nother#sst#wiki

Pair Programming with LLM

Pair Programming with Google's PaLM API.

Google Generative AI Studio: https://developers.generativeai.google/

What we need:

  • API Key from above site
  • Generative AI Libraries
    • node.js, swift or python
  • Python programming skills (https://learnpython.org)

"Larger the animal, larger the model" - pip install -q google.generativeai

import google.generativeai as palm
palm.configure(api_key="....")
for m in palm.list_models():
	print(f"{m.name}")
	print(f"{m.description}")
	print(f"{m.supported_generation_methods}\n")

notes#course#llm#programming

Python Inline Script Metadata

The PEP-723 lays out the intentions and how the metadata that can be embedded into python scripts to assist launchers, IDEs etc to interact with the script. uv was the first tool (to my knowledge) that brought this into wide attention.

Since then many python ecosystem tools have started to leverage this.

notes#python

Observability Ecosystem

Papers

Dapper, a Large-Scale Distributed Systems Tracing Infrastructure (Sigelman et al. 2010)

Collectors

  • Buz serverless, auto-scaling collector that you can deploy and run yourself. Buz collects, validates, and delivers schematized data to where it needs to bee.

Sources:

  • Event-tracking SDK's like Snowplow Analytics (Segment and others in development)
  • Self-describing payloads
  • Webhooks
  • Pixels
  • Cloudevents

Destinations:

  • Databases like Postgres, Mysql, or Clickhouse
  • Streaming tech like Pub/Sub, Kinesis, or Redpanda
  • Hybrids like Kinesis Firehose
  • Message brokers like NATS or RabbitMQ
  • Indexes like Elasticsearch or Splunk

Quickstart talks about using redpanda with Buz.

Tracing

OpenTelemetry

Providers

Observability for Distributed Services | Honeycomb; Charity Major, author of many o11y blog posts, and talks works at honeycomb.

References

notes#observability

Concurrent Programming

Lock-free programming often results in slower programs at low CPU counts. Lock-free algorithms offer better scalability (w.r.t. the number of cores). But you need to pay something to achieve that, and what you pay is single-thread performance / performance on machines with only a dozen CPUs or so (depending on the problem and amount of contention).

Lock-free programming can be very, very difficult.

Lectures

Videos

Udemy

Concepts

A set of operations can be considered atomic when two conditions are met:

  1. Until the entire set of operations completes, no other process can know about the changes being made (invisibility); and
  2. If any of the operations fail then the entire set of operations fails, and the state of the system is restored to the state it was in before any of the operations began.

C++ and Beyond 2012: Herb Sutter - atomic Weapons 1 of 2 - YouTube; the C++ memory model and modern hardware.

Memory Consistency Models

memory consistency model: how memory operations behave in the parallel computer system. This is a contract between programmer and system, wherein the system guarantees that if the programmer follows the rules, memory will be consistent and the results of memory operations will be predictable.

Causal consistency is weaker than sequential consistency, which requires that all nodes see all writes in the same order

Sequential consistency was defined by Leslie Lamport (1979) for concurrent programming, as follows: the result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified by its program.

The sequence of instructions as defined by a processor’s program are interleaved with the corresponding sequences defined by the other processors’s programs to produce a global linear order of all instructions.

Mutual Exclusion principal

Mutual exclusion (often abbreviated to mutex) algorithms are used in concurrent programming to avoid the simultaneous use of a common resource, such as a global variable, by pieces of code called critical sections.

A critical section is a piece of code where a process or thread accesses a common resource.

The synchronization of access to those resources is an acute problem because a thread can be stopped or started at any time.

Mutexes are enough to handle >90% of all cases. You should resort to lock-free algos only if you know that you need them to improve scalability (or because you need the lock-freedom for some other reason, e.g., to keep worst-case time bounded in real time programs). It also depends on your system and application. If you're targeting a quad-socket NUMA system, looking at lock-free algos makes a lot more sense than when you're targeting a laptop. via

Dekker’s algorithm guarantees mutual exclusion, freedom from deadlock, and freedom from starvation.

Peterson’s algorithm is another mutual exclusion mechanism that allows two processes to share a single-use resource without conflict, using only shared memory for communication.

While Peterson’s original formulation worked with only two processes, the algorithm can be generalized for more than two, which makes it more powerful than Dekker’s algorithm.

atomic read-modify-write instruction

test-and-set

The test-and-set instruction is an instruction used to write to a memory location and return its old value as a single atomic (i.e. non-interruptible) operation.

If multiple processes may access the same memory, and if a process is currently performing a test-and-set, no other process may begin another test-and-set until the first process is done.

Compare and Swap ( CAS )

is an atomic instruction used in multithreading to achieve synchronization. It compares the contents of a memory location with a given value and, only if they are the same, modifies the contents of that memory location to a new given value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail. The result of the operation must indicate whether it performed the substitution; this can be done either with a simple boolean response (this variant is often called compare-and-set), or by returning the value read from the memory location (not the value written to it). Compare and Swap - YouTub by Rob Edwards at SDSU.


there a subset of lock-free algorithms, called wait-free algorithms, the lock-free algorithms do not give real-time guarantees.

Concurrent data structures

Concurrent data structures are designed to handle simultaneous access and modification by multiple threads or processes in a concurrent computing environment. In such environments, where multiple tasks or threads are executed in parallel, traditional data structures might encounter issues like race conditions, deadlocks, and data corruption if not appropriately managed. Concurrent data structures aim to address these challenges and allow multiple threads to work with the data structure concurrently with correctness.

Mark Moir and Nir Shavit - Concurrent Data Structures ( 32 page PDF ) is a good text book material.

See ACM review article [@10.1145/1897852.1897873]

  • Concurrent linked lists -- Lock-free or non-blocking implementations ensure that insertions, deletions, and traversals can be performed concurrently without causing conflicts.
  • Concurrent hash tables -- Techniques like fine-grained locking or lock-free approaches are used to manage access to individual buckets or entries.
  • Concurrent Queues and Stacks --  Lock-free queues, such as Michael-Scott queues, are commonly used for scenarios where multiple threads need to enqueue and dequeue items.
  • Concurrent Trees -- Concurrent versions of trees, such as binary search trees and AVL trees, are designed to enable concurrent insertion, deletion, and searching operations without causing conflicts or inconsistencies.
  • Concurrent sets and maps -- They use partitioning, sharding, or lock-free strategies to handle concurrent operations, among other techniques.

Michael Scott Queues

(Michael and Scott 1996) -- paper ( PDF)

Video lecture Michael Scott — Nonblocking data structures. Part 1. - YouTube, part 2

References

  • Michael, Scott (1996). Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms.

notes#concurrent-programming

In-Memory Data Store

Valkey -- " is an open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues, and can act as a primary database. Valkey can run as either a standalone daemon or in a cluster, with options for replication and high availability. Valkey natively supports a rich collection of datatypes, including strings, numbers, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs and more. You can operate on data structures in-place with an expressive collection of commands. Valkey also supports native extensibility with built-in scripting support for Lua and supports module plugins to create new commands, data types, and more."

notes#in-memory-datastore