Skip to content

Instantly share code, notes, and snippets.

View soasme's full-sized avatar
➕
Manyan v0.11.0 is released!

Ju soasme

➕
Manyan v0.11.0 is released!
View GitHub Profile
  ┌────────────┬──────────────────────┬──────┬──────┬────────┬───────────────┬────────────────────┐
  │    spec    │   distinct states    │ TLC  │ tpp  │ tla-rs │ tpp vs tla-rs │   memory tpp /     │
  │            │                      │      │      │        │               │       tla-rs       │
  ├────────────┼──────────────────────┼──────┼──────┼────────┼───────────────┼────────────────────┤
  │ closure    │                65536 │ 2.25 │ 0.47 │   4.02 │          8.6× │         21 / 48 MB │
  ├────────────┼──────────────────────┼──────┼──────┼────────┼───────────────┼────────────────────┤
  │ counters   │               823543 │ 3.79 │ 0.76 │  16.83 │           22× │       186 / 654 MB │
  ├────────────┼──────────────────────┼──────┼──────┼────────┼───────────────┼────────────────────┤
  │ liveness   │                38880 │ 4.59 │ 0.23 │   0.79 │          3.4× │        104 / 77 MB │
@soasme
soasme / connectome_edges.csv
Last active September 10, 2026 08:48
PyTorch (cross-platform) or MLX (Apple Silicon) reservoir-computing classifier on the REAL 499-neuron MaleCNS v1.0 fly connectome circuit (MNIST demo), after oruk.ai's fruit fly emotion paper
body_pre body_post contacts
11734 10977 1878
12569 10540 1611
10169 10254 1250
10169 10456 1215
10376 10096 1203
10515 10456 1174
10515 10254 1156
10376 10459 1154
11190 10305 1097
@soasme
soasme / gist:7a18a2aa4f64e8501d549339b3c0e915
Created September 8, 2026 08:20
home-github.com-soasme-rio-b9aaca/3356db3383ae4c15a6d7bb5ece1174ee.jsonl
{"id":"0ae06a70eb82464ab2833e5d38f3c0a7","timestamp":1788852607.755248,"type":"session_info","created_at":1788852607.755248,"cwd":"/Users/soasme/github.com/soasme/rio","skill":"rio-coding"}
{"id":"4ab27d02ad4745a99d453cc6a3ad06f1","parent_id":"0ae06a70eb82464ab2833e5d38f3c0a7","timestamp":1788852607.75527,"type":"leaf","entry_id":"0ae06a70eb82464ab2833e5d38f3c0a7"}
{"id":"be8f78350190464a84f31236a9d7b10a","parent_id":"0ae06a70eb82464ab2833e5d38f3c0a7","timestamp":1788852617.606848,"type":"turn","observation":"work on https://github.com/soasme/rio/issues/45 and create a PR.","state":{"goal":"","plan":[],"findings":{},"files":{},"cwd":"/Users/soasme/github.com/soasme/rio","environment":{"cwd":"/Users/soasme/github.com/soasme/rio","os":"Darwin","shell":"/bin/zsh","date":"2026-09-08"},"blockers":[],"last_error":null,"scratch":{}}}
{"id":"c1792765fca141aca0984d5dfaadb43d","parent_id":"be8f78350190464a84f31236a9d7b10a","timestamp":1788852617.6075158,"type":"leaf","entry_id":"be8f78350190464a84f31236a9d7b10a"}
{"id"
@soasme
soasme / gist:ccce38e7a4554c9e87937eb7aa613795
Created September 8, 2026 00:44
home-github.com-soasme-rio-b9aaca/95482f5295e44e79aae7218631263b56.jsonl
{"id":"cb62dadb80734b54a67bcdc60909e834","timestamp":1788818943.5539289,"type":"session_info","created_at":1788818943.5539289,"cwd":"/Users/soasme/github.com/soasme/rio","skill":"rio-coding"}
{"id":"1e8f1ed82fce497faf84095d58f7f122","parent_id":"cb62dadb80734b54a67bcdc60909e834","timestamp":1788818943.5539541,"type":"leaf","entry_id":"cb62dadb80734b54a67bcdc60909e834"}
{"id":"c70a3f701faa43e98e43940159685be1","parent_id":"cb62dadb80734b54a67bcdc60909e834","timestamp":1788819885.45872,"type":"model_change","model":"claude-sonnet-4-6","provider":"anthropic"}
{"id":"1cf09953ed044998990df76f3175724a","parent_id":"c70a3f701faa43e98e43940159685be1","timestamp":1788819885.458742,"type":"thinking_level_change","thinking_level":"medium"}
{"id":"58679692031040b8a7660458f6d1aeee","parent_id":"1cf09953ed044998990df76f3175724a","timestamp":1788819885.458776,"type":"leaf","entry_id":"1cf09953ed044998990df76f3175724a"}
{"id":"0f42579132ab47a5aea328a5f71c91fc","parent_id":"1cf09953ed044998990df76f3175724a","timestamp":178881
@soasme
soasme / demo.py
Last active September 1, 2026 21:26
RMSNorm: a from-scratch nn.Module, checked against torch.nn.RMSNorm
"""Demo: run RMSNorm on a random batch and check it against torch.nn.RMSNorm."""
import torch
import torch.nn as nn
from rms_norm import RMSNorm
def demo() -> None:
torch.manual_seed(0)
@soasme
soasme / README.md
Last active August 31, 2026 21:39
BPE tokenizer trainer/evaluator

train_tokenizer.py

A byte-level BPE tokenizer trainer/evaluator.

Changes from the original:

  • CLI-parametrized (no hardcoded paths, vocab size, or special-token count).
  • Split into small, independently testable functions instead of one script.
  • train and eval are separate subcommands.
  • Ships with a 100-row multilingual sample corpus (English, Spanish, French,
@soasme
soasme / micromlp.py
Last active August 30, 2026 08:59
A single-file, no-dependency neural net that predicts California housing prices (Hands-On ML's chapter 2 dataset), built from scratch (autodiff + MLP)
"""
micromlp: a single file, no-dependency neural net that predicts California
housing prices — the dataset from chapter 2 of Hands-On Machine Learning.
Downloads the housing CSV, caches it locally, engineers a small feature
set, and trains a 2-layer MLP with a from-scratch autodiff engine and
plain gradient descent to predict median_house_value.
Usage: python3 micromlp.py
"""
@soasme
soasme / refresh_github_broker.py
Last active August 28, 2026 09:48
Refresh an nginx GitHub credential-broker container with a short-lived gh auth token
#!/usr/bin/env python3
"""
Demo of a GitHub credential-broker proxy: injects a short-lived `gh auth
token` into outgoing requests, so a sandboxed VM never holds the real
credential. This is a demo only — it does not implement any policy
checks (allow/deny by repo, branch, or push type). Add that at the
proxy layer before using this for anything real.
"""
import base64
import os
@soasme
soasme / gist:cbbd996f0da804a464d2c92d105c4d0e
Created June 2, 2026 21:33
small-model-finetuning.md
---
name: small-model-finetuning
description: Build, evaluate, fine-tune, quantize, and deploy small language models for narrow production tasks using an eval-first dataset factory workflow.
version: 1.0.0
language: en
tags:
- small-language-models
- fine-tuning
- qlora
- lora

The New Engineering Teams

How AI coding agents change the way teams should work


Opening

Most engineering orgs were designed for one constraint: