symmetry-cli

The client for the Symmetry peer-to-peer inference network. Enabling users to connect with each other, share computational resources, and collect valuable machine learning data.

https://github.com/twinnydotdev/symmetry-cli

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary

Keywords

ai artificial-intelligence encryption holepunching hyperswarm inference llms localllm network p2p vscode-extension
Last synced: 6 months ago · JSON representation ·

Repository

The client for the Symmetry peer-to-peer inference network. Enabling users to connect with each other, share computational resources, and collect valuable machine learning data.

Basic Info
Statistics
  • Stars: 28
  • Watchers: 0
  • Forks: 4
  • Open Issues: 0
  • Releases: 1
Topics
ai artificial-intelligence encryption holepunching hyperswarm inference llms localllm network p2p vscode-extension
Created over 1 year ago · Last pushed 7 months ago
Metadata Files
Readme Citation

readme.md

Symmetry

Use this repository to become an inference provider on the Symmetry network.

Symmetry is a distributed peer-to-peer network tool that allows users to share computational resources for AI inference. It enables users to connect directly and securely with each other, offering or seeking computational power for various AI tasks.

Features

  • Decentralized peer-to-peer network
  • YAML-based configuration
  • Privacy options
  • Optional data collection for providers
  • Compatible with various AI inference providers

Installation

To install Symmetry, use the following commands:

For Linux and macOS: bash curl -fsSL https://www.twinny.dev/symmetry-unix.sh | sh

For Windows: powershell iwr -useb https://www.twinny.dev/symmetry-windows.ps1 | iex

Usage

To start Symmetry, run which will create a config file and detect your provider.

bash symmetry-cli start

You will then be joined with the symmetry server and ready for connections!

bash ℹ️ INFO: 🔗 Initializing client using config file: /home/twinnydotdev/.config/symmetry/provider.yaml ℹ️ INFO: 📁 Symmetry client initialized. ℹ️ INFO: 🔑 Discovery key: xxx ℹ️ INFO: 🔑 Server key: 4b4a9cc325d134dee6679e9407420023531fd7e96c563f6c5d00fd5549b77435 ℹ️ INFO: 🔗 Joining server, please wait. ℹ️ INFO: 🔗 Connected to server. ℹ️ INFO: 👋 Saying hello to your provider... ℹ️ INFO: 🚀 Sending test request to http://localhost:11434/v1/chat/completions ℹ️ INFO: 📡 Got response, checking stream... ℹ️ INFO: ✅ Test inference call successful!

By default, Symmetry looks for its configuration file at ~/.config/symmetry/provider.yaml. To use a different configuration file, use:

bash symmetry-cli start -c /path/to/your/provider.yaml

Configuration

Here's an example provider.yaml configuration:

yaml apiHostname: localhost # The hostname of the API server. apiKey: # The API key for authentication. apiBasePath: /v1 # The endpoint path for the api. apiPort: 11434 # The port number on which the API server is listening. apiProtocol: http # The protocol used to communicate with the API server. modelName: llama3.1:latest # The name and version of the AI model to use. name: twinnydotdev # Your chosen name as a provider on the Symmetry network. serverKey: 4b4a9cc325d134dee6679e9407420023531fd7e96c563f6c5d00fd5549b77435 # The unique key for connecting to the Symmetry server. systemMessage: "I'm a system message" # An optional system message for each conversation. userSecret: # The secret key for user authentication and points tracking.

Adjust these settings according to your preferences and setup.

Architecture

```mermaid graph TB S[Symmetry Server]

subgraph "Inference Providers"
    P1[Provider 1]
    P2[Provider 2]
    P3[Provider 3]
end

subgraph "Clients"
    C1[Client 1 Requests Model B]
    C2[Client 2 Requests Model C]
end

P1 <--> |"1. Connect & Auth & Register Model"| S
P2 <--> |"1. Connect & Auth & Register Model"| S
P3 <--> |"1. Connect & Auth & Register Model"| S

C1 -- "2. Connect" --> S
C2 -- "2. Connect" --> S

S -- "3. Assign Provider based on Model" --> C1
S -- "3. Assign Provider based on Model" --> C2

C1 <--> |"4. Inference Request/Response"| P2
C2 <--> |"4. Inference Request/Response"| P3

```

Development

To set up Symmetry for development:

  1. Clone the repository: bash git clone https://github.com/twinnydotdev/symmetry.git cd symmetry

  2. Install dependencies: bash npm install

  3. Build the project: bash npm run build

  4. Start the development server: bash npm run dev

Contributing

Contributions are welcome! Please submit your pull requests to the GitHub repository.

License

This project is licensed under the Apache 2.0 Licence.

Support

If you encounter any issues or have questions, please open an issue on GitHub.

Acknowledgments

We thank Hyperswarm for providing the underlying peer-to-peer networking capabilities.

Owner

  • Name: twinny.dev
  • Login: twinnydotdev
  • Kind: organization
  • Location: United Kingdom

The free and private AI Visual Studio Code plugin

Citation (CITATION)

# Citation

If you use this software, please cite it as:

```bibtex
@software{symmetry-cli,
 author = {rjmacarthy},
 title = {Symmetry-CLI: Client for peer-to-peer inference over networks},
 year = {2025},
 url = {https://github.com/twinnydotdev/symmetry-cli},
 note = {Accessed: 2025-02-13}
}

GitHub Events

Total
  • Issues event: 2
  • Watch event: 14
  • Issue comment event: 1
  • Push event: 43
  • Fork event: 2
  • Create event: 32
Last Year
  • Issues event: 2
  • Watch event: 14
  • Issue comment event: 1
  • Push event: 43
  • Fork event: 2
  • Create event: 32

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 118
  • Total Committers: 3
  • Avg Commits per committer: 39.333
  • Development Distribution Score (DDS): 0.059
Past Year
  • Commits: 118
  • Committers: 3
  • Avg Commits per committer: 39.333
  • Development Distribution Score (DDS): 0.059
Top Committers
Name Email Commits
rjmacarthy r****y@h****m 111
joolie t****v@g****m 6
merll002 7****2 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 2
  • Average time to close issues: 15 days
  • Average time to close pull requests: about 8 hours
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 15 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • p3nGu1nZz (1)
Pull Request Authors
  • shlebbypops (1)
  • merll002 (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

package-lock.json npm
  • 527 dependencies
package.json npm
  • @types/jest ^29.5.12 development
  • @types/js-yaml ^4.0.9 development
  • @types/node ^20.14.10 development
  • @types/ws ^8.5.11 development
  • @typescript-eslint/eslint-plugin ^7.16.1 development
  • @typescript-eslint/parser ^7.16.1 development
  • eslint ^8.57.0 development
  • globals ^15.8.0 development
  • jest ^29.7.0 development
  • ts-jest ^29.2.2 development
  • ts-node ^10.9.2 development
  • typescript ^5.5.4 development
  • chalk ^4.1.2
  • commander ^12.1.0
  • hypercore-crypto ^3.4.2
  • hyperdht ^6.15.4
  • hyperswarm ^4.8.0
  • js-yaml ^4.1.0
  • sqlite3 ^5.1.7
  • ws ^8.18.0