Skip to content

Instantly share code, notes, and snippets.

View bcdonadio's full-sized avatar
💼
Hard at work

Bernardo Donadio bcdonadio

💼
Hard at work
View GitHub Profile
@bcdonadio
bcdonadio / wacom-map.sh
Created June 18, 2025 05:17
Properly map a Wacom tablet to a given screen, even on Fedora 42.
#!/usr/bin/env bash
# ---------- USER TWEAKABLE CONSTANTS ----------
PATTERN="Wacom Intuos Pro L Pen" # substring to search for (case-insensitive)
MON="DP-4" # xrandr output to map to
ANCHOR="BOTTOM" # FULL|LEFT|RIGHT|TOP|BOTTOM
# ---------------------------------------------
set -euo pipefail
# Function to get monitor information
@bcdonadio
bcdonadio / sanding_paper_paste_comparison.md
Created June 18, 2025 10:41
Rough comparison between the median particulate size of sandpaper grits and diamond paste polishing compounds.

Abrasive Progression Ladder (Coarse → Fine)

Rank Abrasive Approx. Particle Size
1 P60 ≈ 269 µm
2 P80 ≈ 201 µm
3 P100 ≈ 162 µm
4 Diamond paste 75 µm 75 µm
5 P240 ≈ 58 µm
6 Diamond paste 45 µm 45 µm

LLM Symbol Dictionary

Use this dictionary whenever referring to LLM hyperparameters, shapes, and efficiency metrics across this project. It is a unified superset covering gpt‑oss, qwen3, qwen3‑moe, llama3, llama4, gemma3, and seed‑oss. When a feature is unused, assign the trivial setting (e.g., dense models: $E{=}e{=}1$, $N_{L,\text{moe}}{=}0$; MQA: $h_{kv}{=}1$; tied embeddings: $\mathbb{1}_{\text{tie}}{=}1$).

Unit key: “[-]” dimensionless; “[#]” count; “[features]” channel width; “[tokens]” token length; “[bytes]”, “[FLOP/s]”, “[bytes/s]”.

1) Core transformer topology

  • $N_L$ — [#] Transformer block (layer) count.
  • $d$ — [features] Model hidden size (residual width).
#!/usr/bin/env bash
set -euo pipefail
renice -n 19 $$ >/dev/null || true
export TMPDIR="${TMPDIR:-$(pwd)/tmp}"
mkdir -p "${TMPDIR}" || true
# ============================================================
# Native build of PyTorch + vLLM + FlashInfer + LMCache