Skip to content

Instantly share code, notes, and snippets.

View belisarius222's full-sized avatar

Ted Blackman belisarius222

  • Massachusetts
  • 23:06 (UTC -05:00)
  • X @rovnys
View GitHub Profile
@belisarius222
belisarius222 / swap-ffn-bench-a1-20260302.md
Created March 2, 2026 22:29
Swap-FFN benchmark: torch.compile + fused w13 on A100 (2026-03-02)

Swap-FFN Benchmark Results: torch.compile + Fused w13 on A100

Date: 2026-03-02 Machine: A1 (216.81.248.152), NVIDIA A100-SXM4-80GB, PyTorch 2.10.0+cu126, CUDA 12.6 Code: monarch repo, commit aa3bb6f (token-local swap-FFN state) Checkpoints: Trained baseline and hybrid1 checkpoints from s3://voltcode-artifacts-17f9c348/runs/monarch-swap-ffn/20260302/ Results: s3://voltcode-artifacts-17f9c348/runs/swap-ffn-bench/a1-compiled-20260302/

Background

@belisarius222
belisarius222 / swap-ffn-fused-vs-unfused-trace.md
Created March 2, 2026 20:17
Swap-FFN Fused vs Unfused Decode: Detailed Execution Trace (A100)

Swap-FFN Fused vs Unfused Decode: Execution Trace

Detailed execution trace comparing the fused Triton kernel path vs the unfused PyTorch/cuBLAS path for Swap-FFN decode inference.

Config: d_model=1024, d_ff=4096, core_count=512, n_events=8, k_ffn=2, d_router=64, collapse_k=8, collapse_r=224

Hardware: A100-SXM4-80GB, 108 SMs, 40 MB L2 cache


@belisarius222
belisarius222 / test.js
Created December 19, 2024 16:04
Test gist from MCP server verification
console.log("Verification test");
@belisarius222
belisarius222 / hello.js
Created December 19, 2024 15:53
Test gist from MCP server
console.log("Hello from MCP server!");
|pass &noun
:- %k %lard %base !< shed:khan
%+ slap (slop .^(vase %ca %/lib/strandio/hoon) !>(..zuse))
!, *hoon
=* strandio -
=, strand=strand:rand
^- shed:khan
=/ m (strand ,vase)
|- ^- form:m
;< =bowl:rand bind:m get-bowl:strandio
@belisarius222
belisarius222 / ulam.hoon
Last active September 15, 2024 17:09
ulam -- self-describing hoon data structures
=>
|%
+$ ulam
$~ [%coin *coin]
:: leaves
::
$% [%coin =coin] :: atom, noun, or compound coin
[%path =pith] :: hoon path syntax
[%page =mark noun=*] :: %foo|bar, bar is coin blob
::
@belisarius222
belisarius222 / update-instructions-413k.md
Last active April 27, 2023 16:05
Zuse 413k App Update Instructions
  • Apps that use JSON will need to drop compatibility for 414 and older Kelvins by default. The old %json mark from 414 will not compile on 413, and this will not be caught at build time.
    • Make sure the %json mark file in your app desk compiles on 413, and test your %json mark conversions to make sure they don't crash at runtime due to this change.
    • The json (de)serialization interface changed and is only backwards-compatible at the outermost layer (+en-json, +de-json). apex:de-json:html, part of the JSON parser internals, isn't there any more.
  • A number of arms and new tasks and gifts were added to Lull and Zuse.
    • These should not cause any issues unless your app code was expecting something very specific, such as if you were doing metaprogramming on Lull or Zuse (e.g. Pyro).
  • The %gall scry namespace has been changed:
    • %gu, to check if an app is an running, has a new path format:
      • old: .^(? %gu /=dojo=)
      • new: .^(? %gu /=dojo=/$)
  • Similar changes were made
@belisarius222
belisarius222 / scry-app.hoon
Created March 28, 2023 15:43
example app for userspace scry bindings
/+ default-agent, verb, dbug
::
|%
+$ poke
$% [%grow =case =spur =noun]
[%tomb =case =spur]
[%cull =case =spur]
==
--
::
@belisarius222
belisarius222 / app-upgrade-414k.md
Last active March 22, 2023 16:39
414k App Upgrade Instructions

How to Upgrade your App to Zuse 414k

This Kelvin requires more work to update than some previous Kelvins because the $foam type was deleted from Lull. This means if your app imports the full base-dev folder as a dependency the way most apps do and your app imports /sur/hood/hoon (as a lot of apps do), you will need to update that dependency for 414 by copying in the most recent files, and also drop support for older Kelvins by deleting their entries from /sys/kelvin and replacing them all with just [%zuse 414]. If your app does not have any files that import /sur/hood/hoon with Ford runes, you might be able to support 414 and 415 without modifying code -- if so, please test your app to be sure.

Note that Clay can still handle later commits targeted at 415, so as an app dev, you can maintain both 414 and 415 -- the constraint is that each commit to your app desk can only support one or the other if you are using the standard /sur/hood/hoon. Supporting both in the same stream of commits to

@belisarius222
belisarius222 / epoch-chop.md
Created February 7, 2023 21:53
epoch-based event log truncation
  • yes to epoch system
  • each epoch has a version file, an initial snapshot, and an event log database file
  • we will need to add code to vere to find the latest epoch folder before loading snapshot and event log
  • there are two separable operations involved in truncation:
  1. create new epoch, by copying snapshot into a new epoch folder, creating a new version file in that folder, and creating a new event log database file in that folder whose events db is empty and whose metadata db contains entries copied from the previous epoch's metadata db
  2. a "keep only N recent epochs" command, which removes all epoch folders older than that