Skip to content

Instantly share code, notes, and snippets.

View vukrosic's full-sized avatar

Vuk Rosić vukrosic

View GitHub Profile
@vukrosic
vukrosic / 00_README.md
Last active August 29, 2026 14:45
How Smartphones Work - From Transistors to TikTok (PDF slideshow)

How Smartphones Work - From Transistors to TikTok

A 56-slide visual explainer covering the chain from touchscreen sensing and transistors to operating systems, networking, video, power, cameras, sensors, security, storage, and wireless communication.

Download how-smartphones-work-from-transistors-to-tiktok.pdf to view the complete presentation.

@vukrosic
vukrosic / 00_README.md
Created August 24, 2026 05:18
Inference optimization progress: data, algorithms, benchmark protocol, and evaluator

Faster inference without hiding the trade-offs

This bundle records three recent inference experiments on one 12 GB CUDA GPU:

  1. history-only n-gram drafting;
  2. an aligned learned draft model with target verification;
  3. concurrent decoding of independent requests.

The target model identity is intentionally omitted. The point is the method, measurement protocol, and what did or did not transfer across workloads.

@vukrosic
vukrosic / 00_README.md
Created August 19, 2026 04:05
Order-32 Costas array: reproducible bounded partial result

Order-32 Costas array: a reproducible bounded partial result

Status on 2026-08-19: the existence of an order-32 Costas array remains open. This bundle does not claim a solution, a nonexistence proof, a world record, a breakthrough, or priority for the candidate below.

Exact question

Does a permutation p of 0..31 exist such that all displacement vectors

How the OpenBMB MiniCPM5 inference speedup was found

I asked GPT Sol to optimize inference for openbmb/MiniCPM5-1B on an NVIDIA RTX 3060.

The goal was not simply to produce a larger tokens-per-second number. A candidate only counted as an improvement if it produced the same generated token IDs as the frozen baseline.

The companion file 01_core_code_snippets.py shows the central implementation ideas: stable CUDA Graph buffers, fixed-shape replay, combining adjacent operations, grouping Q/K/V work, and falling back to eager execution for other shapes. It is intentionally illustrative rather than a standalone drop-in script.

Starting point

Making repeated customer queries in DuckDB 22x faster

Signed: GPT, Open Discovery research assistant

What we accelerated

We accelerated a very specific operation:

Repeatedly calculate one customer’s results from a large shared dataset.

@vukrosic
vukrosic / 00_README.md
Created August 13, 2026 06:49
Exact file-membership routing for repeated Parquet queries

Exact file-membership routing for repeated Parquet queries

Signed: GPT, Open Discovery research assistant

This small reference implementation speeds up repeated selective queries when Parquet files were produced without partitioning by the key customers query. It builds an exact map from provider_id to the files that contain that value, then asks DuckDB to scan only those files. DuckDB still evaluates the original filters and aggregation, so this is routing—not a cached answer.

@vukrosic
vukrosic / 00_README.md
Created August 13, 2026 05:34
Experimental adaptive adjacent probing for DuckDB ASOF joins — patch, workloads, and honest test evidence

Adaptive adjacent probing for DuckDB ASOF joins

This experimental DuckDB patch tries a short adjacent scan before falling back to DuckDB's existing exponential-plus-binary search.

The idea

An ASOF join answers questions such as:

  • Which market quote was active when a trade happened?
  • Which exchange rate was current when a payment arrived?

Exact Muon Polar Express MPS optimization

This bundle contains the independent frozen reference, candidate kernels, exact evaluator, public API benchmark, safety audit, and final receipts for the Apple Silicon MPS optimization.

Run from the repository root with the project environment:

PYTHONPATH=. python optimization_candidates/eval_muon_exact.py --device mps --candidate out_mm_bx_cast_after_context
PYTHONPATH=. python optimization_candidates/eval_muon_public_api.py
PYTHONPATH=. python optimization_candidates/audit_muon_safety.py
@vukrosic
vukrosic / prism-multi-llm-memory-ballooning-summary.pdf
Created July 26, 2026 23:06
prism-multi-llm-memory-ballooning PSS summary
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vukrosic
vukrosic / trainmover-resilient-llm-training-summary.pdf
Created July 26, 2026 23:06
trainmover-resilient-llm-training PSS summary
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.