Skip to main content

Gobal toolbox that allows you to connect, and verify your tools

Project description

Commune AI

Commune: Modular Consensus System

Commune AI provides a powerful framework for building distributed AI applications with modular consensus mechanisms. The system enables seamless integration of AI models, distributed computing, and blockchain technology.

Features

These components can be applied to:

  • 🔗 Networks - Create and manage distributed networks with custom consensus mechanisms
  • 🤖 AI Models - Deploy and serve AI models in a distributed environment
  • 💫 Modules - Build modular components that can be composed into larger systems
  • 🔑 Keys - Manage cryptographic keys and identities securely
  • 🖥️ Servers - Deploy and monitor distributed services
  • Validation - Implement custom validation rules and scoring mechanisms

Quick Tour

To immediately start using Commune, you can create and serve a module with just a few lines of code:

import commune as c

# Create a simple module
class MyModule(c.Module):
    def __init__(self, param1=1):
        self.set_config(locals())
        
    def forward(self, x):
        return x * self.param1

# Serve the module
module = c.serve('MyModule')

Basic CLI usage:

# Create a new module
>>>c new_module my_module

# Serve a module
>>>c serve my_module

# Call a module function
>>>c call my_module/forward 10

Installation

With pip

pip install commune

From source

git clone https://github.com/commune-ai/commune.git
cd commune
pip install -e .

From pypi

pip install commune

Development setup

chmod +x ./run/***
sudo ./run/install.sh  # Install development environment

Core Components

1. Module System

Modules are the building blocks of Commune applications:

import commune as c

class CustomModule(c.Module):
    def __init__(self, config=None):
        self.set_config(config)
    
    def process(self, data):
        return self.model(data)

2. Network Management

Create and manage distributed networks:

# Start a local network
c.serve('mymodule', network='local')

# Join a subnet
c.serve('mymodule', network='subspace', netuid=0)

3. Validation System

Implement custom validation rules:

class Validator(c.Module):
    def validate(self, module):
        score = self.evaluate_performance(module)
        return score

CLI Reference

Commune provides an intuitive CLI interface:

# Module operations
c new_module <name>        # Create new module
c serve <module>           # Serve module
c call <module>/<function> # Call module function
c modules                  # List modules

# Key management
c add_key <name>          # Generate new key
c keys                    # List keys
c sign <message>          # Sign message

# Server management
c servers                 # List servers
c connect <module>        # Connect to server
c logs <module>           # View logs

Why Commune?

  1. Modular Design:

    • Build complex systems from simple components
    • Easy-to-use module system
    • Flexible composition of services
  2. Distributed Computing:

    • Scale across multiple nodes
    • Built-in consensus mechanisms
    • Robust networking layer
  3. AI Integration:

    • Deploy AI models as services
    • Distributed training support
    • Model validation and scoring
  4. Security:

    • Built-in key management
    • Secure communication
    • Validation mechanisms

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commai-0.0.1.tar.gz (68.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commai-0.0.1-py3-none-any.whl (78.3 kB view details)

Uploaded Python 3

File details

Details for the file commai-0.0.1.tar.gz.

File metadata

  • Download URL: commai-0.0.1.tar.gz
  • Upload date:
  • Size: 68.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for commai-0.0.1.tar.gz
Algorithm Hash digest
SHA256 37c8a99ef7415722448a4fa220cfc6a87ec062f509eec5501aeabad6a8bb22a5
MD5 babdf07783ce02367f5441def3adda61
BLAKE2b-256 17b524ab98ac83279cde786e29f6cfcae00acae3956dd79102c929f5d0aecf3e

See more details on using hashes here.

File details

Details for the file commai-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: commai-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 78.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for commai-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43027a8e0e26991bed8bbadb4dae4035727e084f54c2aae20bfb932d3869a7af
MD5 26b30543150c763263748415a6fa3990
BLAKE2b-256 9e4751902b9fe48449c91222267fca7a20738501be8af17a671e5e19442fde3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page