Gensyn 백서

Gensyn

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 16쪽 중 7쪽

ive their position from `/topology` and aggregate results upward toward the root. > **File:** `examples/python-client/convergecast.py` # Troubleshooting Common build, peering, and runtime issues with their causes and fixes. ## Fixing Common Issues If something isn't working, you're probably hitting one of the issues below. This page covers the most frequent problems with building, running, and connecting AXL nodes, along with their fixes. ### Build Problems These issues come up when compiling the node binary or generating keys before you ever run anything. #### `ed25519` key generation fails on macOS If `openssl genpkey` fails with "algorithm `ed25519` not found," it's because macOS ships with LibreSSL, which doesn't support `ed25519`.&#x20; Install and use Homebrew's OpenSSL instead: ```bash brew install openssl /opt/homebrew/opt/openssl/bin/openssl genpkey -algorithm ed25519 -out private.pem ``` #### `Go 1.26+` build tag errors The `gvisor.dev/gvisor` dependency has build tag conflicts with `Go 1.26`.&#x20; Pin the toolchain for the build: ```bash GOTOOLCHAIN=go1.25.5 go build -o node ./cmd/node/ ``` Alternatively, install `Go 1.25.x` alongside your existing version: ```bash go install golang.org/dl/go1.25.5@latest go1.25.5 download go1.25.5 build -o node ./cmd/node/ ``` ### Running the Node Once the binary is built, these are the issues you might hit when starting or connecting to your node. #### Connection refused on port 9002 The node process isn't running, or you're pointing at the wrong port. Confirm the node is alive and responsive: ```bash curl http://127.0.0.1:9002/topology ``` {% hint style="info" %} The default port is `9002`. If you changed it in your config file, use your configured port instead. {% endhint %} #### "Address already in use" A previous node instance or another process is still holding the port. Find and kill it: ```bash lsof -ti :9002 | xargs kill ``` {% hint style="info" %} This is a common error that you will likely experience if you are testing out your application repeatedly with 2-4 terminals, especially if some are dedicated terminal instances vs. inside of Cursor or another IDE, etc. {% endhint %} ### Peering and Connectivity Peering issues show up as missing messages or an empty topology. Most of the time, the fix is a config change or a short wait. #### "No connected peers found" You'll see this error if your node hasn't established any peer connections.&#x20; The most common causes are an empty `Peers` list in your config, unreachable or shut-down bootstrap nodes, or simply that peering hasn't had time to establish yet.&#x20; Give it a few seconds, then you can check your current connections with `curl http://127.0.0.1:9002/topology` and look at the `peers` array. #### Messages not arriving between local test nodes First, verify both nodes are running. Then confirm you're using the correct public key in the `X-Destination-Peer-Id` header.&#x20; When testing two nodes on the same machine, they need different `tcp_port` values to avoid conflicts. When communicating between separate machines, they should use the same `tcp_port`. #### Messages not arriving between machines Both nodes must be able to reach at least one common peer, whether that's a bootstrap node or a direct connection to each other.&#x20; Double-check that the bootstrap address is correct, the port is open, and firewalls or port forwarding aren't blocking traffic. ### Python Client Issues These apply when running the example scripts or any Python code that talks to a node's HTTP API. #### Dependencie Issues If you encounter this error (`ModuleNotFoundError: No module named 'requests'`) it means that dependcies are either not installed or there was a failure during installation.&#x20; Run this command to install:&#x20; ```bash pip3 install -r examples/python-client/requirements.txt ``` #### urllib3 `NotOpenSSLWarning` This is a harmless warning on macOS caused by a LibreSSL/OpenSSL mismatch in urllib3. Everything works correctly. You can safely ignore it. ### Quick Reference | Symptom | Fix | | ---------------------------- | ------------------------------------------- | | *Can't generate ed25519 key* | Use `/opt/homebrew/opt/openssl/bin/openssl` | | *Build fails (Go 1.26)* | `GOTOOLCHAIN=go1.25.5 go build ...` | | *Connection refused :9002* | Start the node | | *Port conflict* | `lsof -ti :PORT \| xargs kill` | | *No peers* | Check `Peers` in config, wait a few seconds | | *Python import errors* | `pip3 install -r requirements.txt` | # Overview A live, open test network for decentralised machine learning. The Gensyn Public Testnet was launched in March 2025. &#x20; It brings persistent identity to decentralised AI systems and provides a network to track participation, maintain attribution, make payments, coordinate remote execution, verify untrusted operations, log decentralised training runs, crowdfund large-scale training efforts, and more.&#x20; ## What's Live Now The current focus is on Delphi, a permissionless prediction market platform where anyone can create markets on any topic, settled by AI, with support for verifiable settlement through Gensyn's [Reproducible Execution Environment (REE).](/tech) [Delphi](https://app.delphi.fyi/) is live on Testnet and Mainnet. #### Previous Phases Earlier phases of the testnet included: * **RL Swarm:** Collaborative post-training via reinforcement learning reasoning over the internet. RL Swarm demonstrated decentralized model improvement through swarm participation. RL Swarm & all Gensyn-hosted nodes have been paused.&#x20; * **BlockAssist & CodeAssist:** Applications that demonstrated how ML models can train directly on human interactions to create personalized, privacy-preserving models. Both have been sunset as focus consolidates around Delphi. All historical data remains on chain. ### Get Involved | **Community Members** | Stay up to date on progress, provide feedback, and discuss future developments in the [Discord.](https://discord.com/invite/gensyn) | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Traders** | Explore active prediction markets on Delphi, buy and sell positions on outcomes, and help stress-test the platform ahead of Mainnet. | | **Market Creators** | Create your own prediction markets on any topic, configure AI settlement, and trade outcomes using valueless tokens on [Delphi](https://app.delphi.fyi/). | | **Developers** | Build on top of the Gensyn network and contribute to the ecosystem as new infrastructure and applications come online. | | **ML Researchers** | Deploy your own swarm for others to join, train on new datasets, solve new problems, construct new objectives, incentivise participation and explore the space of decentralised AI with an entirely new infrastructure stack. | ### Architecture The network is a custom Ethereum Rollup dedicated to machine learning and integrated with off-chain execution, verification, and communication frameworks.&#x20; #### Roadmap The Testnet has followed a phased rollout, with each phase introducing new features derived from the infrastructure that Gensyn builds. This has given the community a chance to stress-test the protocol under real-world conditions and provide feedback on features and direction along the way. # RL Swarm (Paused) RL Swarm lets anyone, anywhere, join and participate in a distributed reinforcement learning system that learns faster together than alone. {% hint style="success" %} There are no official swarms running right now.&#x20; Please check back later if you're interested in participating in a global, decentralised, crowd-sourced training run or feel free to join a community-owned swarm.&#x20; Alternatively, you can explore [Delphi](https://app.delphi.fyi/), a set of tools for creating information markets. {% endhint %} ## What is RL Swarm? RL Swarm is a decentralized training environment where reinforcement learning (RL) agents cooperate over the internet instead of inside a single datacenter. Each node runs a local language model that participates in multi-stage RL reasoning games, which involves answering, critiquing, and revising solutions alongside *peers*. By connecting an RL Swarm node to an on-chain identity on the Gensyn Testnet, every participant’s contributions are logged and verifiable. This enables a persistent view of collective training performance across the network. <div data-with-frame="true"><figure><img src="https://1034405018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIcazOdplbOmP4R0T7sG8%2Fuploads%2FLcwS5rbU3BY6pBzp21Ga%2Fimage.png?alt=media&amp;token=998b1204-fbdc-4f03-a640-529ef43287d1" alt=""><figcaption></figcaption></figure></div> ### Why It Exists Traditional RL research happens inside isolated labs using centralized GPU clusters. These environments are **expensive**, **inaccessible**, and **closed** by design. RL Swarm was built to show that reinforcement learning can happen collaboratively and trustlessly across independent machines, powered by Gensyn’s decentralized execution and verification layers. By turning multi-agent RL into a networked experiment, RL Swarm demonstrates: * How peer-to-peer learning can outperform solo training. * How collective reasoning can improve model quality and efficiency. * How the Gensyn Protocol’s primitives, **\[1]** execution, **\[2]** verification, **\[3]** communication, and **\[4]** coordination, work together in a live environment. {% hint style="info" %} RL Swarm forms the foundation of Phase 0 of the Gensyn Testnet, providing the first public demonstration of decentralized AI collaboration in action. {% endhint %} #### What You Can Do With It Anyone can clone the RL Swarm repository, run a node locally, and connect to the live swarm. In the swarm, each node participates in four stages of RL:&#x20; {% stepper %} {% step %} ### Initialize a Local Model Load a small open-source model (for example, *Qwen 2.5 1.5B*) to act as your local learning agent. {% endstep %} {% step %} ### Join a Shared Reasoning Task Connect to the active swarm and take part in multi-stage reasoning challenges, like solving math, logic, or coding problems collaboratively with other nodes. {% endstep %} {% step %} ### Communicate & Critique Exchange answers, feedback, and critiques with peers using a decentralized gossip protocol that enables cross-node communication. {% endstep %} {% step %} ### Learn & Update Collectively Incorporate reinforcement signals from the swarm’s collective feedback to refine your model and improve global performance over time. {% endstep %} {% endstepper %} When a session (“episode”) ends, the node’s updated weights can be uploaded to a model hub like Hugging Face or logged directly to the Gensyn Testnet, which creates and contributes to a [transparent record of the decentralized training progress.](https://dashboard.gensyn.ai/) #### Ready? Head over to [Getting Started](/testnet/rl-swarm/getting-started) section and select your platform for OS-specific set-up guides, or browse our [Troubleshooting](/testnet/rl-swarm/troubleshooting) documentation. # How It Works Learn how RL Swarm functions under the hood, from GenRL’s modular architecture to multi-agent learning, coordination, and reward cycles. ## Reinforcement Learning RL Swarm is built on a layered architecture that enables distributed reinforcement learning across independent nodes. Understanding how these layers fit together helps clarify both the system's capabilities and how it has evolved. #### The Layered Stack <table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>RL Swarm</strong></td><td>The orchestrator for distributed reinforcement learning environments. It manages node connections, identity, and network coordination across the peer-to-peer swarm.</td></tr><tr><td><strong>Gen RL</strong></td><td>The open-source reinforcement learning SDK that powers swarm environments. GenRL provides the modular framework that enables multi-agent, multi-stage RL with decentralized coordination.</td></tr><tr><td><strong>CodeZero</strong></td><td>The active cooperative coding environment where models act as Proposers, Solvers, and Evaluators in a closed learning loop. CodeZero replaces Reasoning Gym as the current RL Swarm environment.</td></tr></tbody></table> {% hint style="success" %} All active swarms now use CodeZero as the default environment. [Legacy environments ](/testnet/rl-swarm/how-it-works/legacy-environments)such as Reasoning Gym are archived. {% endhint %} #### From Reasoning Gym to CodeZero Earlier versions of RL Swarm used a math and logic environment known as Reasoning Gym. Starting with the [November 2025 release](https://github.com/gensyn-ai/rl-swarm/releases), this has been replaced by **CodeZero,** a new cooperative coding environment built on the same peer-to-peer framework. CodeZero extends the RL Swarm framework onto the same decentralized network and identity system, but introduces a *new task domain* focused on programming and debugging, where task success is scored using model-based or execution-based reward functions instead of rule-based logical verification. {% hint style="success" %} **As of November 12th, 2025, CodeZero replaces Reasoning Gym as the active RL Swarm environment.** Node setup, identity, and network connection remain identical. {% endhint %} #### Reinforcement Learning in a Distributed Setting Reinforcement Learning (RL) enables agents to learn optimal actions through feedback. RL Swarm extends this paradigm into a collaborative, distributed setting, where many agents train and critique *together* instead of working *alone*. <div data-with-frame="true"><figure><img src="https://1034405018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIcazOdplbOmP4R0T7sG8%2Fuploads%2FYAt6xGEyAre7ctxgogja%2Fimage.png?alt=media&amp;token=076d4c08-cb90-4407-80da-57c53014575b" alt=""><figcaption></figcaption></figure></div> ### RL in Action Reinforcement Learning (RL) continues to prove its power in solving complex problems, from optimizing systems to training intelligent agents.&#x20; As we push the boundaries, especially in scenarios involving multiple interacting agents, the need for robust and flexible environments becomes even more critical.&#x20; > Our core philosophy is to provide a highly customisable and scalable platform that addresses the limitations often encountered when building multi-agent RL systems. Many existing frameworks tend to be either centralized in their approach or simply don't offer native support for multi-agent settings, which can lead to significant development hurdles. RL Swarm, powered by GenRL (short for “General Reinforcement Learning”), is a framework built to simplify and accelerate the development of advanced, multi-agent reinforcement learning environments. #### GenRL A key highlight of GenRL is its native support for horizontally scalable, multi-agent, multi-stage RL with decentralised coordination and communication.&#x20; Unlike frameworks that might force a centralised control scheme, GenRL is built for environments where agents can learn and interact in a distributed, open, and permissionless manner. ### Four Components At its heart, GenRL puts the user in control of defining the entire 'game' agents play. We've built an intuitive, modular architecture that orchestrates the complete RL cycle, allowing you to tailor every aspect of your environment.&#x20; This is achieved through four well-defined components: **\[1]** DataManager, **\[2]** RewardManager, **\[3]** Trainer, and **\[4]** GameManager. #### 1. DataManager > Manages data and initializes each training round. The DataManager defines and organizes the dataset your RL environment uses, whether it’s a large quantity of text, a labeled image collection, or a specialized format like a chessboard configuration.&#x20; It makes sure the system has the right inputs to learn and perform tasks effectively by 'managing' the given data.&#x20; By choosing and structuring data precisely, you directly shape the RL environment’s scope, performance, and applicability, since the nature and *quality* of the dataset determine the agent’s learning efficiency and potential outcomes. For example, richer datasets can improve robustness and generalization, while narrow datasets may constrain learning to specific scenarios. #### 2. RewardManager > Defines custom reward logic.&#x20; The RewardManager defines and implements *model-based reward evaluation,* using frozen evaluators to score predicted correctness instead of rule-based checks. By translating outcomes into feedback signals, it directly shapes the objective of your RL environment, influencing what behaviors are encouraged and how policies evolve over time. #### 3. Trainer > The Trainer applies algorithms such as **GRPO (Group Relative Policy Optimization)** to update solver policies from evaluator-scored rollouts. The Trainer component handles both learning and rollout generation: it manages the core training loop, i.e., applying your chosen RL paradigm (e.g. policy gradient optimization, value-function approximation, etc.) to update the policy.&#x20; It also produces the rollouts that drive agent–environment interactions to make sure the experiences needed for each subsequent training step are generated and ingested without a hitch. #### 4. GameManager > Coordinates data flow and communication between multiple agents. The GameManager coordinates the data flow efficiently and effectively among the key modules you define, so there is smooth interaction between these modules and the other agents within the multi-agent swarm. It acts as a central hub that manages communications, synchronizes processes, and facilitates the exchange of information.&#x20; {% hint style="success" %} GenRL allows module customization for tailored learning goals and agent interactions, supporting scalable multi-agent RL solutions. It works with any environment, including **CodeZero** and legacy ones like Reasoning Gym. {% endhint %} ### Framework Defined Progression The game progresses on a per-round basis.&#x20; 1. Each round, the DataManager initializes the round data, triggering the game’s stages.&#x20; 2. For every stage, rollouts are generated, added to the game state, and shared with the swarm.&#x20; 3. Once the agent completes all predefined stages, rewards are evaluated and policies are updated.&#x20; The user retains full control over this process within the `Trainer.train` method, allowing policy updates on either a per-stage or per-round basis. <div data-with-frame="true"><figure><img src="https://1034405018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIcazOdplbOmP4R0T7sG8%2Fuploads%2FPtQxinAvLUHSuDJvCJSc%2Fdiagram.png?alt=media&amp;token=61c2358f-1ac1-4a28-be01-ce60ca91c279" alt=""><figcaption></figcaption></figure></div> # CodeZero Learn about CodeZero, the cooperative coding environment powering RL Swarm. <div data-with-frame="true"><figure><img src="https://1034405018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIcazOdplbOmP4R0T7sG8%2Fuploads%2FKoddnpsOr2BZVDl31SYJ%2FCopy%20of%20CodeZero-still.png?alt=media&amp;token=83cdeb4b-3df6-48a0-8a9f-d42a6b9fc274" alt=""><figcaption></figcaption></figure></div> ## Overview CodeZero is the active RL Swarm environment that transforms distributed reinforcement learning into a cooperative coding ecosystem, a "society of models" where agents collaborate to solve programming challenges. Unlike traditional RL environments that rely on external verification, CodeZero creates a closed learning loop where models
프로젝트로 돌아가기