Bittensor
Search…
πŸ“
The Architecture
Mechanized Neuron
The inspiration for Bittensor came from brain cells (neurons): neurons learn together by passing signals along synaptic channels. Neurotrophins, essentially food for neurons, pass retroactively "paying" neurons for being useful to their peers.
Bittensor works similarly: 'neurons' or 'miners', each running a unique machine learning model, learn together by passing signals (tensor encoded data) to each other. An incentive token, Tao, passes between them, literally paying those that are valuable to the collective.

Components

Both Bittensor miner-neurons and biological neurons contain the following logical parts
  • Dendrite: Responsible for sending information to other neurons.
  • Axon: Responsible for receiving information from other neurons.
  • Nucleus: The main machine learning model
  • Miner: The main bittensor node that responsible for running the other components
Biological neuron cell. Credit: David Baillot/ UC San Diego.

Dendrite (bittensor/dendrite)

Bittensor miners make queries to other nodes by giving them training data and receiving the hidden representations by other nodes in the network. This allows intelligence to be shared between nodes in the network and speeds up the training of new miners. All queries made by the miners are sent through the dendrite, an RPC-client with connections to multiple peers in the system.
1
dendrite = bittensor.dendrite( config )
2
dendrite.forward_text( endpoints, inputs )
Copied!

Axon (bittensor/axon)

The axon is your miner's own RPC server, where your node receives requests from other peers in the system and is your miner's subscription point to the blockchain. The Axon is connected to the miner which will call the nucleus' forward function when an appropriate response is received by the server.
1
axon = bittensor.axon( config, nucleus )
2
axon.start().subscribe()
Copied!

Metagraph (bittensor/metagraph)

The metagraph is your miner's access point to the information on the blockchain. It stores all of the information from the chain (Stake, Rank, Incentive, Endpoints, and much more). It periodically makes queries to the chain to update its information
1
metagraph = bittensor.metagraph( config )
2
metagraph.sync().save()
Copied!

Dataloader(bittensor/dataloader)

The dataloader pulls information from our IPFS cluster and prepares a training dataset for the miner. The dataloader class holds all of the training data pulled from the web and servers as the main access point to the IPFS cluster.
1
dataset = bittensor.dataloader( config )
2
dataset.dataloader()
Copied!
Miner (bittensor/miners)
Your miner is the highest level of abstraction in Bittensor. It holds all of the previous components as well as the main training loop and pytorch optimizer. The miner will act both as a server and a validator node within the network. Miners that perform better in the network and are ranked highly by their peers will have higher incentive and accumulate more stake over time. For full information on Bittensor's incentive mechanism, please refer to our whitepaper.
1
miner = Miner()
2
miner.run()
Copied!
Last modified 6d ago
Copy link
Contents
Components