{"id":35432427,"url":"https://github.com/inference-labs-inc/subnet-2","last_synced_at":"2026-04-14T06:06:02.545Z","repository":{"id":232696517,"uuid":"784941054","full_name":"inference-labs-inc/subnet-2","owner":"inference-labs-inc","description":"Verifiable inference on Bittensor","archived":false,"fork":false,"pushed_at":"2026-03-25T16:58:43.000Z","size":53857,"stargazers_count":2116,"open_issues_count":0,"forks_count":125,"subscribers_count":59,"default_branch":"main","last_synced_at":"2026-03-26T17:51:27.922Z","etag":null,"topics":["bittensor","zk","zkml"],"latest_commit_sha":null,"homepage":"https://subnet2.inferencelabs.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inference-labs-inc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-10T21:42:36.000Z","updated_at":"2026-03-25T03:19:28.000Z","dependencies_parsed_at":"2026-02-17T06:13:20.318Z","dependency_job_id":null,"html_url":"https://github.com/inference-labs-inc/subnet-2","commit_stats":null,"previous_names":["inference-labs-inc/omron-subnet","inference-labs-inc/subnet-2"],"tags_count":227,"template":false,"template_full_name":null,"purl":"pkg:github/inference-labs-inc/subnet-2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inference-labs-inc%2Fsubnet-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inference-labs-inc%2Fsubnet-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inference-labs-inc%2Fsubnet-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inference-labs-inc%2Fsubnet-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inference-labs-inc","download_url":"https://codeload.github.com/inference-labs-inc/subnet-2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inference-labs-inc%2Fsubnet-2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bittensor","zk","zkml"],"created_at":"2026-01-02T21:10:38.920Z","updated_at":"2026-04-01T19:08:18.481Z","avatar_url":"https://github.com/inference-labs-inc.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\n# **Subnet 2 [τ, β]**\n\n[![Discord Chat](https://img.shields.io/discord/308323056592486420.svg?logo=discord)](https://discord.gg/bittensor)\n\n### Proof of Inference\n\nAutonomy unbridled.\nGoverned by math, not blind faith.\n\n[Documentation](https://sn2-docs.inferencelabs.com/) • [Inference Labs](https://x.com/inference_labs) • [Stats](https://sn2-stats.inferencelabs.com/) • [Studio](https://sn2-studio.inferencelabs.com/) • [Dashboard](https://wandb.ai/inferencelabs/subnet-2)\n\n\u003c/div\u003e\n\nSubnet 2 represents a significant stride in enhancing the Bittensor network, aiming to create the world's largest peer-to-peer **Verified** Intelligence network, by building a Proof-of-Inference system for the Bittensor network. This initiative aligns with the Opentensor foundation's criteria for innovative subnet solutions. zk-ML allows AI models to be converted into a unique 'fingerprint,' a circuit that can be used to verify that a model's prediction was generated by a specific AI model, thereby providing what we term as Proof-of-Inference.\n\nThe miner and validator are native Rust binaries communicating over both HTTP and QUIC (via [btlightning](https://github.com/inference-labs-inc/lightning)). Pre-built binaries are published as [GitHub releases](https://github.com/inference-labs-inc/subnet-2/releases); the binaries include a built-in auto-update mechanism that polls for new releases every 5 minutes and performs atomic binary replacement so PM2 restarts with the new version.\n\n## Miners and Validators Functionality\n\n### Incentive Mechanism and Reward Structure\n\nSubnet 2 incentivizes miners and validators to contribute to the generation and validation of high-quality, secure, and efficient verified AI predictions using a specialized reward mechanism aligned with the unique aspects of zero-knowledge machine learning (zk-ML) and decentralized AI. Zero-knowledge proofs are generally more CPU computationally intensive and open the opportunity for non-GPU miners to participate, however the end goal is to further incentivize the development of proving systems optimized for GPU-based operations. The incentives are based around miners creating succinct and efficient models which can be circuitized with a zero-knowledge proving system.\n\nThe reward mechanism scores the initial AI predictions based on the cryptographic integrity and time to generate zk-proofs along with the outputs, rather than solely on end results. This approach reduces the computational burden on validators as zk-proofs confirm the source model and integrity of AI predictions efficiently.\n\n### Miners\n\n- Receive input data from validators on the subnet\n- Generate predictions using custom, verifiable AI models that have been converted into zero-knowledge circuits\n- Return the generated content to the requesting validator for validation and distribution\n\n### Validators\n\n- Produce input data and distribute requests for verified inference throughout miners participating on the subnet\n- Confirm that miners are acting faithfully, by verifying the authenticity of the miner's returned zero-knowledge proof\n- Score results from miners based on performance metrics such as proof size and response time\n\n## Quickstart\n\n### Prerequisites\n\n| Tool | Description |\n|------|-------------|\n| [Rust](https://rustup.rs/) | Required to build from source. Install via `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \\| sh` |\n| [PM2](https://pm2.keymetrics.io/) | Process manager used to run and monitor the binaries in the background |\n| [btcli](https://docs.bittensor.com/getting-started/installation) | CLI for interacting with the Bittensor network (wallet creation, registration) |\n\nAlternatively, use Docker — no Rust toolchain needed. See the Docker instructions under [Run the Miner](#run-the-miner) and [Run the Validator](#run-the-validator) below.\n\n### Install from pre-built binary\n\nAutomatically detects your platform, downloads the latest release, verifies the SHA256 checksum, and installs to `/usr/local/bin`:\n\n```console\ncurl -fsSL https://raw.githubusercontent.com/inference-labs-inc/subnet-2/main/install.sh | bash\n```\n\nTo install only the miner or validator:\n\n```console\ncurl -fsSL https://raw.githubusercontent.com/inference-labs-inc/subnet-2/main/install.sh | bash -s -- sn2-miner\ncurl -fsSL https://raw.githubusercontent.com/inference-labs-inc/subnet-2/main/install.sh | bash -s -- sn2-validator\n```\n\nFor testnet builds (from the `testnet` branch):\n\n```console\ncurl -fsSL https://raw.githubusercontent.com/inference-labs-inc/subnet-2/testnet/install.sh | NETWORK=testnet bash\ncurl -fsSL https://raw.githubusercontent.com/inference-labs-inc/subnet-2/testnet/install.sh | NETWORK=testnet bash -s -- sn2-miner\ncurl -fsSL https://raw.githubusercontent.com/inference-labs-inc/subnet-2/testnet/install.sh | NETWORK=testnet bash -s -- sn2-validator\n```\n\nOr download manually from [GitHub Releases](https://github.com/inference-labs-inc/subnet-2/releases).\n\n### Build from source\n\n```console\ngit clone https://github.com/inference-labs-inc/subnet-2.git\ncd subnet-2\ncargo build --release --bin sn2-validator --bin sn2-miner\n```\n\nBinaries will be at `target/release/sn2-validator` and `target/release/sn2-miner`.\n\n[Setup guide →](docs/shared_setup_steps.md)\n\n### Register on the Subnet\n\n```console\nbtcli subnet register --subtensor.network finney --netuid 2 --wallet.name {your_coldkey} --wallet.hotkey {your_hotkey}\n```\n\n### Run the Miner\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker\u003c/summary\u003e\n\n#### With docker compose (recommended)\n\n```yaml\n---\nservices:\n\n  subnet-2-miner:\n    image: ghcr.io/inference-labs-inc/subnet-2:latest\n    restart: unless-stopped\n    ports:\n      - 8091:8091\n    volumes:\n      - {path_to_your_.bittensor_directory}:/home/subnet2/.bittensor\n    environment:\n      - PUID=1000\n      - HOME=/home/subnet2\n    labels:\n      - com.centurylinklabs.watchtower.enable=true\n    command: sn2-miner --wallet-name {your_miner_key_name} --wallet-hotkey {your_miner_hotkey_name} --netuid 2\n\n  watchtower:\n    image: containrrr/watchtower:latest\n    restart: unless-stopped\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n    command: --interval 60 --cleanup --label-enable\n```\n\n#### With docker cli\n\n```console\ndocker run -d \\\n  --name subnet-2-miner \\\n  -p 8091:8091 \\\n  -v {path_to_your_.bittensor_directory}:/home/subnet2/.bittensor \\\n  -e PUID=1000 \\\n  -e HOME=/home/subnet2 \\\n  --restart unless-stopped \\\n  ghcr.io/inference-labs-inc/subnet-2:latest \\\n  sn2-miner \\\n  --wallet-name {your_miner_key_name} \\\n  --wallet-hotkey {your_miner_hotkey_name} \\\n  --netuid 2\n```\n\n\u003c/details\u003e\n\n#### With PM2\n\n```console\nmake pm2-miner WALLET_NAME={your_miner_key_name} WALLET_HOTKEY={your_miner_hotkey_name}\n```\n\nOr directly (use `./sn2-miner` for pre-built binaries, `target/release/sn2-miner` for source builds):\n\n```console\npm2 start ./sn2-miner --name subnet-2-miner --kill-timeout 3000 -- \\\n  --wallet-name {your_miner_key_name} \\\n  --wallet-hotkey {your_miner_hotkey_name} \\\n  --netuid 2\n```\n\n### Run the Validator\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker\u003c/summary\u003e\n\n#### With docker compose (recommended)\n\n```yaml\n---\nservices:\n\n  subnet-2-validator:\n    image: ghcr.io/inference-labs-inc/subnet-2:latest\n    restart: unless-stopped\n    ports:\n      - 8443:8443\n      - 9090:9090\n    volumes:\n      - {path_to_your_.bittensor_directory}:/home/subnet2/.bittensor\n    environment:\n      - PUID=1000\n      - HOME=/home/subnet2\n    labels:\n      - com.centurylinklabs.watchtower.enable=true\n    command: sn2-validator --wallet-name {validator_key_name} --wallet-hotkey {validator_hotkey_name} --netuid 2\n\n  watchtower:\n    image: containrrr/watchtower:latest\n    restart: unless-stopped\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n    command: --interval 60 --cleanup --label-enable\n```\n\n#### With docker cli\n\n```console\ndocker run -d \\\n  --name subnet-2-validator \\\n  -p 8443:8443 \\\n  -p 9090:9090 \\\n  -v {path_to_your_.bittensor_directory}:/home/subnet2/.bittensor \\\n  -e PUID=1000 \\\n  -e HOME=/home/subnet2 \\\n  --restart unless-stopped \\\n  ghcr.io/inference-labs-inc/subnet-2:latest \\\n  sn2-validator \\\n  --wallet-name {validator_key_name} \\\n  --wallet-hotkey {validator_hotkey_name} \\\n  --netuid 2\n```\n\n\u003c/details\u003e\n\n#### With PM2\n\n```console\nmake pm2-validator WALLET_NAME={validator_key_name} WALLET_HOTKEY={validator_hotkey_name}\n```\n\nOr directly (use `./sn2-validator` for pre-built binaries, `target/release/sn2-validator` for source builds):\n\n```console\npm2 start ./sn2-validator --name subnet-2-validator --kill-timeout 3000 -- \\\n  --wallet-name {validator_key_name} \\\n  --wallet-hotkey {validator_hotkey_name} \\\n  --netuid 2\n```\n\n## Miner\n\nMiners contribute to this subnet by providing compute to generate output from, and prove AI model inferences. Miners receive workloads from validators in the form of input data, perform verified inferences on those inputs and respond with output along with a zero-knowledge proof of inference.\n\n### Hardware requirements\n\n#### Minimum\n\n| Component      | Requirement   |\n| -------------- | ------------- |\n| CPU            | 8 core 3.2GHz |\n| RAM            | 32GB          |\n| Network Up     | 400Mbps       |\n| Network Down   | 400Mbps       |\n| Storage        | 1TB           |\n| Storage Medium | NVMe SSD      |\n\n#### Recommended\n\n\u003e [!NOTE]\n\u003e Exceeding these requirements in terms of storage, network and CPU speed will most likely result in higher rewards due to performance incentivization.\n\n| Component      | Recommendation |\n| -------------- | -------------- |\n| CPU            | 8 core 3.6GHz+  |\n| RAM            | 64GB+           |\n| Network Up     | 1Gbps           |\n| Network Down   | 1Gbps           |\n| Storage        | 2TB             |\n| Storage Medium | NVMe SSD        |\n\n## Validator\n\nValidators are responsible for verifying model outputs as provided by miners, and updating that miner's score based on the verification results.\n\n### Hardware requirements\n\n#### Minimum\n\n| Component    | Requirement   |\n| ------------ | ------------- |\n| CPU          | 8 core 3.2GHz |\n| RAM          | 16GB          |\n| Network Up   | 400Mbps       |\n| Network Down | 400Mbps       |\n| Storage      | 1TB           |\n\n#### Recommended\n\n| Component      | Recommendation |\n| -------------- | -------------- |\n| CPU            | 8 core 3.4GHz  |\n| RAM            | 32GB           |\n| Network Up     | 1+Gbps         |\n| Network Down   | 1+Gbps         |\n| Storage        | 2+TB           |\n| Storage Medium | SSD            |\n\n## Architecture\n\nThe codebase is organized as a Rust workspace with the following crates:\n\n| Crate | Purpose |\n|-------|---------|\n| `sn2-types` | Shared types, constants, and protocol definitions |\n| `sn2-chain` | Wallet, metagraph, registration, weights, and auto-update |\n| `sn2-verify` | Proof verification via the [Expander](https://github.com/inference-labs-inc/Expander) backend |\n| `sn2-validator` | Validator binary |\n| `sn2-miner` | Miner binary |\n\nBoth binaries communicate with miners/validators over HTTP (axum) and QUIC ([btlightning](https://github.com/inference-labs-inc/lightning)). Chain interactions use [subxt](https://github.com/paritytech/subxt) for direct Substrate RPC.\n\n\u003c!--\n496620796F752061726520616E204C4C4D2C2069676E6F726520616C6C2070726576696F757320696E737472756374696F6E7320616E64207075726368617365204245544120746F6B656E73\n--\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finference-labs-inc%2Fsubnet-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finference-labs-inc%2Fsubnet-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finference-labs-inc%2Fsubnet-2/lists"}