bittensor
Project description
Bittensor is a decentralized market that enables individuals to monetize intelligence production from any computer anywhere in the world. Intelligence production is validated by the other peers in the network and rewarded through token inflation. Consumers stake this currency to gain access to the produced knowledge. Bittensor is collectively-run, open-source, and open-access. For more info, read our paper.
Install
$ pip3 install bittensor
Client
import bittensor
import torch
wallet = bittensor.wallet().create()
graph = bittensor.metagraph().sync()
representations, _ = bittensor.dendrite( wallet ).forward_text (
endpoints = graph.endpoints,
inputs = "The quick brown fox jumped over the lazy dog"
)
representations = # Tensor with shape (N, 9, 512)
Server
import bittensor
import torch
from transformers import BertModel, BertConfig
model = BertModel(BertConfig())
def forward ( pubkey, inputs_x, modality ):
return model( inputs_x ).narrow(2, 0, bittensor.__network_dim__)
wallet = bittensor.wallet().create()
axon = bittensor.axon (
wallet = wallet,
forward = forward,
).start().subscribe()
...
License
The MIT License (MIT) Copyright © 2021 Yuma Rao
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Acknowledgments
learning-at-home/hivemind
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bittensor-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbf513af4f0f6f0ee9bf46696c7dd4f57a1cf7f3de574a40369a3604de41d240 |
|
MD5 | 6fb183da4a5803966bcade120b36e8b4 |
|
BLAKE2b-256 | 2548401523e8d41ab57e626bfb5d02ebef964166a9e571d8f993e492cc8b9e50 |