DOCUMENTATION
Training requirements
Dataset and experience models are supported. Choose the model’s work source to see what you need before starting.
Dataset models
The model learns from files you provide. Participants train on dataset chunks; the coordinator combines their weight updates after each round.
Supported techniques
Use this path for learning from prepared examples, such as supervised or self-supervised tasks, when implemented by your model. The WASM defines the architecture, input format, loss and local optimizer. Weei distributes the work; it does not convert Python, PyTorch or ONNX models into compatible modules.
Files to prepare
| File | Requirement |
|---|---|
| Model .wasm | A trusted module implementing Weei WASM ABI 1, including model metadata, initial weights and training operations. |
| Manifest .json | A dataset chunk array, or the model package’s manifest.json. Each chunk must declare id, fileName, bytes, sha256, format and exampleCount. |
| Dataset chunks | Every named file, readable independently by the model. Names, byte sizes and SHA-256 hashes must match the manifest. Respect the model’s supported formats and chunk/example limits. |
| Validation file — optional | Separate held-out data. The model must support evaluation. For a package, match its validation file name, size and SHA-256; for a plain chunk list, stay within maxChunkBytes. The file remains on the coordinator. |
| WGSL archive — optional | The matching model package’s shader archive for supported GPU training. WASM is still required. Without the archive, training uses CPU. |
Dataset manifest example
[{
"id": "chunk-001",
"fileName": "training-001.bin",
"bytes": 4096,
"sha256": "REPLACE_WITH_ACTUAL_SHA256",
"format": "MODEL_DEFINED_FORMAT",
"exampleCount": 128
}]Replace the example values with actual file metadata. The model determines what one example means and how its data is encoded.
Learning rate
Set Learning rate only when the model declares it in trainingParameters. The value must be greater than the model’s exclusiveMinimum and at most its maximum, within Weei’s global range of greater than 0 and at most 1. Leave it empty to use the model’s own default; Weei does not fill in that default.
Start dataset training
- In Workspace → Setup, select the WASM, manifest and all chunks. Add GPU shaders and validation data if required.
- Set Dataset passes, Local epochs, Batch size and an optional Learning rate. One dataset pass covers all chunks; a round covers at most one chunk per active participant.
- Choose aggregation and whether the coordinator also trains. If validation is available, schedule it every N rounds or dataset passes.
- Create the job, connect participants, invite them and wait for acceptance. Then start training.
- Compare training and held-out validation metrics by checkpoint round. Download important checkpoints.
Experience models
The model generates training experience and updates its policy locally. Participants send back weights, metrics and counts; episodes, rewards and trajectories remain on their devices.
Supported techniques
Classic reinforcement learning runs an environment inside the WASM model. Models can also use input records, such as prompts, and frozen reference, reward or opponent weights. Methods such as REINFORCE, GRPO, RLHF or self-play require a model that implements them; selecting an experience job does not add an algorithm to the model.
Files and model declarations
| Item | Requirement |
|---|---|
| Model .wasm + manifest.json | An experience model and its weei-model-package manifest. A plain dataset array, including [], is not accepted. Package sizes, hashes, model identity and weight size must match. |
| workSource | kind: experience; declared inputs, work-unit id/label, and unitsPerAssignment default/minimum/maximum. The package and model metadata must agree. |
| inputs: none | No dataset chunks or validation file. The package’s dataset manifest is empty. The model generates its own experience. |
| inputs: dataset | All declared input chunks. The model must declare workPartitioning so records are not split between participants. |
| Auxiliary weights | Select every file-based slot with Training files; sizes and SHA-256 hashes must match. Initial/checkpoint source slots need no local file: Weei supplies the declared snapshot. These weights stay frozen. |
| WGSL archive — optional | For inputs: none only, a declared GPU backend and matching shader archive enable hybrid execution: WASM plays episodes and GPU updates the policy. Experience training over dataset inputs currently has no GPU support. |
| Generated evaluation | Requires capabilities.evaluation and positive workSource.evaluationUnits. Evaluation uses fixed episodes for comparison between rounds. |
Learning rate
Experience models follow the same trainingParameters contract: only a declared learningRate can be supplied. Leave the field empty for the model’s default. A supplied value must meet the model’s bounds and be greater than 0 and at most 1.
Start experience training
- Select the WASM and package manifest. The form changes to Training rounds and the model’s work units, such as episodes.
- Select input chunks only for inputs: dataset, plus any required auxiliary weight files. Add the matching WGSL archive if supported.
- Choose units per assignment within the model’s bounds. Batch size, learning rate and local epochs have model-defined meanings.
- If generated evaluation is supported, enable Schedule validation with a round interval.
- Create the job, connect and invite participants, then start. Compare the model’s declared reward/return metrics and generated evaluation by round.
Continue from a checkpoint
Training rounds is the final round number, including the saved rounds: continuing round 397 to 500 runs 103 more rounds. Resume restores the saved experience sequence; New starts a new sequence while keeping the weights. File-based auxiliary weights must match those recorded in the checkpoint.