A controlled distributed Dense experiment
Reproduce the seeded 64 to 128 to 64 to 4 fixture with protected partitions, a fixed global batch and native sample weighted training.
Download .aner source// Controlled Dense fixture; synthetic quality is not real-world task accuracy.
// This source is an exploration program. The measured CLI protocol records its
// own frozen source/build manifest, warm-up boundaries and three trial repeats.
import aner.dataset
import aner.nn
import aner.ml
import aner.parallel
import aner.dev
let source = dataset.synthetic(rows: 65536, inputs: 64, classes: 4, seed: 42)
let parts = source.partition(validation: 0.15, test: 0.15, seed: 42)
print(source.sha256())
print(parts.audit())
let network = nn.mlp(inputs: 64, hidden: List(128, 64), outputs: 4, seed: 42)
let model = ml.classifier(network, standardize: true,
loss: "cross_entropy", optimizer: "sgd")
let config = ml.training(epochs: 10, batch: 1536, rate: 0.05, seed: 42)
.validation(parts.validation())
// CPU/CUDA can request Float64. MPS must explicitly request Float32.
let execution = parallel.device(device: "cpu", dtype: "Float64")
// For an explicitly enrolled group, replace the preceding context with:
// let execution = parallel.cluster(config: "private.neural.cluster")
let fitted = parallel.fit(model: model, data: parts.train(),
config: config, execution: execution, progress: true)
dev.capture("Canonical fitted model and replica history", fitted)
print(fitted.summary())
print(fitted.evaluate(parts.test()).summary())
Make it your experiment.
With Aner installed, save this program as examples/parallel/neural_benchmark.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.
aner check examples/parallel/neural_benchmark.aner
aner run examples/parallel/neural_benchmark.anerThe aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.
Use the compatible native Aner development engine and VS Code extension 0.1.33. The local programs require no remote configuration. Strict CPU/CUDA supports Float64 and Float32; Metal/MPS requires Float32. Configured groups require private enrollment accessible only to its owner and installed workers with compatible source. See Distributed neural training for placement, protected roles, weighted gradients and Dev observation limits.
Iris and Wine are teaching datasets with their own attribution. Example outcomes are not comparative benchmarks or evidence of clinical validity.
Dataset sources & attribution