Skip to content

Getting Started

Raul Montoya Cardenas edited this page Jul 29, 2026 · 2 revisions

Getting Started

Wiki hero

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)

Install

using Pkg
Pkg.add(url="https://github.com/Limen-Neural/SynapticDistill.jl")

From a clone:

cd SynapticDistill.jl
julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.test()'

Compat: Julia ≥ 1.8 (Project.toml); CI runs Julia 1.12.

Dependencies

Package Role
LinearAlgebra, Statistics, Printf stdlib
MLUtils data utilities
Zygote AD through model step + loss

Minimal train step

using SynapticDistill, Statistics

mutable struct MySNN
    weights::Matrix{Float32}
end

model = MySNN(rand(Float32, 10, 10))
spikes = SpikeBatch(Float32.(rand(0:1, 10, 100)), nothing, nothing)

function model_step(model, batch::SpikeBatch)
    rates = vec(mean(batch.spikes; dims=2))
    return (logits = model.weights * rates,)
end

mse_loss(output) = sum(output.logits .^ 2)

model, state = train_step!(model, spikes, mse_loss; forward_fn=model_step, rule=:eprop)
@show state.loss

Positional model-step form:

train_step!(model, spikes, mse_loss, model_step; rule=:eprop)

Examples

julia --project=. examples/pure_snn_training.jl
julia --project=. examples/hybrid_moe_training.jl

Next


Last updated: July 29, 2026 Updated by: Grok Build: Grok 4.5 Package tip reference: e986a66 (main, v0.2.0) Devin DeepWiki: commit e986a66 · SynapticDistill.jl

Clone this wiki locally