Skip to content

Instantly share code, notes, and snippets.

@maderix
maderix / ane_prefill_pipeline.m
Last active May 14, 2026 08:39
ANE Prefill Pipeline — Qwen 3.5 9B on Apple M4 (221 tok/s, 5.05 TFLOPS, FP16)
// Qwen 3.5 9B Prefill Pipeline — ANE (Apple Neural Engine)
//
// 221 tok/s prefill, 5.05 TFLOPS ANE, FP16 weights, no quantization.
// Apple M4 (10-core: 4P+6E), 24 GB, macOS 15.
// Single self-contained file. No external dependencies beyond Apple frameworks.
//
// Architecture (32 layers, 24 DeltaNet + 8 Attention):
// DeltaNet: QKV proj (ANE) → recurrence (CPU/OpenMP) → out proj (ANE) → FFN (ANE)
// Attention: Q/K/V proj (ANE) → causal SDPA (CPU/AMX) → O proj (ANE) → FFN (ANE)
//
@naotokui
naotokui / conv_autoencoder_keras.ipynb
Created January 10, 2017 04:17
Convolutional Autoencoder in Keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Ryan-ZA
Ryan-ZA / 1. StaticFileHandler.java
Last active November 20, 2024 13:00
Simple static fileserver for vert.x - uses cached SHA1 hash etags for client caching to ensure that cached files remain correct after redeploys and between servers.
package com.rc;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.vertx.java.core.AsyncResult;
import org.vertx.java.core.Handler;
import org.vertx.java.core.Vertx;