Skip to content

Talario\Parameter

Requires a Talario build. Licensed builds are available through sales. There is no public download. Availability

__construct

new Parameter(Device $device, array $data, array $shape)

Allocate a parameter from host data and shape.

value

value(): array

Read back the parameter's current values.

grad

grad(): array

Read back the parameter's accumulated gradient.

setData

setData(array $data): void

Overwrite the parameter's values (host->device).

step

step(float $lr): void

In-place SGD update w -= lr * grad for this parameter.

adamStep

adamStep(float $lr, float $beta1, float $beta2, float $eps): void

In-place Adam update for this parameter.

stepAll

static
stepAll(array $params, float $lr): void

Batched in-place SGD update across many parameters in one submission.

adamStepAll

static
adamStepAll(array $params, float $lr, float $beta1, float $beta2, float $eps): void

Batched in-place Adam update across many parameters.

allReduceMean

static
allReduceMean(array $params): void

Average one logical parameter's gradient across replicas in place (data-parallel).

Using a coding agent?

Copy a prompt for Talario\Parameter, with 8 exact API signatures.