Skip to content

Instantly share code, notes, and snippets.

View abatilo's full-sized avatar

Aaron Batilo abatilo

View GitHub Profile
@abatilo
abatilo / dflash2_seed_ideas.md
Last active August 19, 2026 00:12
Amestris DFlash2 executable seed ideas

DFlash2 executable seed ideas

These ideas target the immutable SPECULATIVE_DECODING_V1 Truth workload on Qwen/Qwen3-8B. A DFlash2 artifact uses an eight-token verify block, temperature 0, concurrency 16, the published two-tap group-16 dynamic causal convolutions around every attention and MLP sublayer, and the published rank-256 top-16 adjacent-pair candidate selector. The authorized numeric comparator is Evaluation 3HnQfcMqXmLCFdIzsU0mkXnXNo0, whose aggregate mean acceptance length is 3.826854272156405.

The architecture and inference contract come from z-lab/dflash commit 07ebd93db9f472af339b644bb70221ad8428328a, especially dflash/model.py, and SGLang serving commit 6228c78dd28368babedaa24d264266912c934b32. Upstream publishes no DFlash2 training loop or selector loss. The DFlash2 control therefore adapts the pinned TorchSpec DFlash trainer without claiming training-recipe reproduction. D-PACE comes from arXiv 2605.18810v1; its detached position weights apply only to the full-vocabulary un

@abatilo
abatilo / evaluator_compatible_seed_ideas.md
Created August 17, 2026 21:35
Evaluator-compatible Amestris seed ideas

Evaluator-compatible Amestris seed ideas

These ideas are bounded by the immutable SPECULATIVE_DECODING_V1 Truth profile: Qwen3DSparkModel, DSPARK block size 7, temperature 0, concurrency 16, and the exact 16-workload aggregate. The authorized comparator is Evaluation 3HnQfcMqXmLCFdIzsU0mkXnXNo0, whose aggregate mean acceptance length is 3.826854272156405.

Evaluate fixed-profile position-adaptive acceptance loss

  • Kind: LOSS
  • Rationale: Apply position-adaptive acceptance credit; its effect on fixed-profile aggregate mean acceptance length is unknown.
  • Falsifier: Reject when fixed-profile aggregate mean acceptance length is less than or equal to 3.826854272156405.
  • Estimated H100 seconds: 158400
@abatilo
abatilo / README.md
Created March 20, 2026 05:55
Polyglot coding prompts for genai-bench - 100 real coding exercises for LLM inference benchmarking

Polyglot Coding Prompts for genai-bench

100 real-world coding prompts extracted from Aider's polyglot-benchmark (originally sourced from Exercism). Each prompt includes problem instructions and a starter code stub.

Prompt lengths range from ~66 to ~3000 tokens, covering problems like cipher implementations, data structures, parsers, and reactive systems.

Quick Start

# Download the prompts
@abatilo
abatilo / deepspeed_train.py
Last active December 29, 2025 01:28
DeepSpeed + Hugging Face Transformers Training Script for Spin Tutorial
#!/usr/bin/env python3
"""
Hugging Face Transformers Distributed Training Example for Spin
Trains a GPT-2 model on WikiText-2 using distributed data parallel.
Designed to run on multiple nodes via Spin's SyncSet orchestration.
"""
import os
@abatilo
abatilo / train.py
Created December 28, 2025 23:25
Tiny Shakespeare DDP Training Script for Spin Tutorial
#!/usr/bin/env python3
"""
Tiny Shakespeare DDP Training Example for Spin
Minimal causal-masked Transformer trained on Tiny Shakespeare using PyTorch DDP.
Uses character-level tokenization (~65 unique characters) for simplicity.
Designed to run on multiple nodes via Spin's SyncSet orchestration.
Usage with spinctl:
# Push this script to your SyncSet pods
@abatilo
abatilo / interprocess.md
Created October 6, 2024 05:01 — forked from jphsd/interprocess.md
Interprocess channels in Go by using named pipes

How to use channels across different processes in Go

A couple of code samples to show how a named pipe can be used to extend Go's channel paradigm for use between different processes running on a system.

  • interprocess1.go details a single byte channel.
  • interprocess2.go details a channel that passes slices of bytes.

Note that opening a write channel will return two channels -

@abatilo
abatilo / Dockerfile
Last active June 1, 2024 18:23
Start a training process with sshd - https://sliceofexperiments.com
FROM ubuntu:22.04
# Install sshd and xz to unzip the s6-overlay tarball
RUN <<EOF
apt-get update;
apt-get install -yq openssh-server xz-utils;
EOF
# Install s6-overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.2/s6-overlay-noarch.tar.xz /tmp
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="pygmalion"
plugins=(
mise
fzf
git
kubectl
)
@abatilo
abatilo / cmd.go
Created April 2, 2023 21:42
Build index and search index with OpenAI
package gogptindex
import (
"context"
_ "embed"
"encoding/json"
"fmt"
"net/http"
"os"
"os/signal"
apiVersion: apps.kruise.io/v1alpha1
kind: ImagePullJob
metadata:
name: sudokurace
namespace: kruise-system
spec:
image: '911907402684.dkr.ecr.us-west-2.amazonaws.com/sudokurace:' # Tag set by kustomization.yaml
pullSecrets:
# Must match https://gist.github.com/abatilo/6b287265d541d06da567893c1522999f#file-imagepulljob-tf-L3
- kruise-ecr-token