Skip to content

Instantly share code, notes, and snippets.

View radiradev's full-sized avatar
🤠

Radi Radev radiradev

🤠
View GitHub Profile
@radiradev
radiradev / flowmatching.py
Created May 7, 2026 09:12
Flow matching self-contained torch example
"""
Conditional Flow Matching on the Two Moons dataset.
We train a small velocity-field network v_theta(x, t, c) to transport samples
from a standard Gaussian (t=0) to the two-moons distribution (t=1), conditioned
on the moon label c in {0, 1}.
Flow matching objective (linear / OT-style interpolant):
x_t = (1 - t) * x_0 + t * x_1, x_0 ~ N(0, I), x_1 ~ data
target velocity: u_t = x_1 - x_0
nodes:
data:
node_builder:
_target_: anemoi.graphs.nodes.ReducedGaussianGridNodes
grid: o48
attributes:
area_weight:
_target_: anemoi.graphs.nodes.attributes.SphericalAreaWeights
norm: unit-max
hidden:
@radiradev
radiradev / normcore-llm.md
Created August 31, 2023 12:54 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads
@radiradev
radiradev / Dockerfile.masked_autoencoder
Last active June 20, 2023 08:40
Dockerfile for nd2fd repositiory
FROM rradev/minkowski-engine:latest
RUN pip install timm tensorboardx einops pytorch-lightning
CMD ["bash"]
# the minkowski-engine:latest uses the dockerfile defined here https://gist.github.com/radiradev/7af53500133773948c813d3e133e62c8
FROM deeplearnphysics/larcv2:ub20.04-cuda11.6-pytorch1.13-larndsim
# Install ninja
RUN pip install ninja
ENV TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0"
# Install MinkowskiEngine with DepthwiseConvolution from GitHub
RUN pip install -U --target=/usr/local/lib/python3.8/dist-packages \