# How SOMA Works

SOMA trains a foundation model by coordinating many independent participants over the Internet. Rather than synchronizing high-bandwidth gradients across machines, SOMA synchronizes on a **competitive objective**. 

Participants independently train small, specialized models and compete. To integrate them, the network only needs to verify who won.

## Models

Every [model](https://docs.soma.org/concepts/models) on SOMA uses the same [architecture](https://docs.soma.org/concepts/models/#architecture). Given a sequence of bytes, each model predicts the next one. Lower loss means better understanding. What differs between models is the trained weights.

Each model:

- Registers an [embedding](https://docs.soma.org/concepts/targets/#embeddings) representing its specialization
- [Stakes](https://docs.soma.org/concepts/models/#stake) SOMA to compete. More stake means more [targets](https://docs.soma.org/concepts/targets/) assigned, which means more chances to earn
- Publishes weights via a [commit-reveal](https://docs.soma.org/concepts/models/#publishing-weights) protocol

A model becomes eligible for competition in the epoch after revealing its weights openly. After that, it's on the model to update its weights to stay competitive.

Models earn when their weights achieve the lowest loss.

## Targets

[Targets](https://docs.soma.org/concepts/targets/) are how the network benchmarks itself. Each [epoch](https://docs.soma.org/concepts/network/#epochs) (24 hours), the network generates targets as random points in embedding space. Each target represents a domain: text, images, audio, code, or any other data expressible as bytes.

The network assigns a subset of models to each target via [stake-weighted KNN](https://docs.soma.org/concepts/targets/#model-assignment). Models that are closer to a target in embedding space and have more stake get priority. How well they perform reveals where the network is strong and where it needs to improve. 

When a target is hit, a new one spawns. The network continuously tests itself on domains it hasn't mastered.

## Data Submission

[Data submitters](https://docs.soma.org/concepts/submitting/) compete to fill targets:

1. Download the assigned models' weights
2. Run them locally against their data to find the lowest-loss model and compute the data embedding
3. Submit the result with a [bond](https://docs.soma.org/concepts/economics/#bonds) proportional to data size

The first submission whose data embedding is within a [threshold](https://docs.soma.org/concepts/targets/#distance-threshold) around the target wins. The model with the lowest loss is the winning model.
Rewards split 50/50 between the submitter and the winning model.

Before rewards can be claimed, a 1-epoch [audit window](https://docs.soma.org/concepts/submitting/#resolution) follows each submission. A random validator audits the result. If validators holding 2/3 of stake vote against a submission, the bond is slashed. If the submission is honest, the bond is returned, and rewards are secured.

## Consensus

SOMA is built on [Mysticeti](https://docs.soma.org/concepts/network/#consensus), adapted from Sui's consensus layer. Transactions confirm in under 0.33s at 200,000+ TPS. Everything else from Sui (the VM, execution environment, smart contracts) is removed. What remains is a consensus layer optimized for the lightweight but frequent operations SOMA requires: submissions, verifications, weight updates, thousands per epoch.

## Economics

[SOMA](https://docs.soma.org/concepts/economics/) is the network's unit of account. Models stake to compete. Submitters post bonds. Validators stake to run consensus.

New SOMA is distributed each epoch following a [linear curve](https://docs.soma.org/concepts/economics/#emissions) toward a maximum supply of 10 million SOMA. Each epoch, new emissions and fees combine into a rewards pool:

- **20%** to validators, proportional to stake
- **80%** to target winners, split evenly between submitter and model

Transaction fees [auto-adjust](https://docs.soma.org/concepts/economics/#fees) each epoch to target an annual burning of 5% of circulating supply.

## Get started

[Quickstart](https://docs.soma.org/getting-started/quickstart/)
[Quickstart (Agent)](https://docs.soma.org/getting-started/quickstart-agent/)