Overview:
The On-Chain Chess LLM project showcases the capability of running a fully functional Large Language Model (LLM) directly on the Internet Computer Protocol (ICP) canister system. This project aims to demonstrate the potential of blockchain-based AI by focusing on chess, where the LLM interprets chess positions and generates legal moves. The project is tailored for chess enthusiasts, developers interested in AI and blockchain integration, and anyone curious about the application of advanced AI models in decentralized environments.
Web3 vs. Web2:|
While there are numerous chess engines and AI models available on traditional platforms (Web2), this project stands out by being fully on-chain, which ensures:
• Transparency: All computations are visible and verifiable by any participant.
• Security: Running the LLM on-chain reduces the risk of tampering or unauthorized access.
• Decentralization: Unlike centralized systems, there’s no single point of failure, enhancing reliability and trustworthiness.
Technical Stack:
• Base Model: LLaMA2 (compressed variant)
• Training Data: Synthesized and cleaned chess data
• Environment Simulation: Custom-built chess environment for model training
• Backend Language: C++
• Deployment: ICP canister system
• Input Format: Forsyth–Edwards Notation (FEN) for chess positions
Architecture & Design Decisions:
• The LLM has been compressed to fit within the storage and computation limits of an ICP canister.
• A high-performance C++ backend was chosen for model execution to ensure that the LLM operates efficiently within the blockchain’s constraints.
•The design prioritizes minimal resource usage while maintaining accurate chess move generation.
Key ICP Features Utilized:
• Scalability: The ICP’s ability to handle multiple requests efficiently allows the LLM to process chess positions at scale.
• Security: The deterministic nature of the ICP ensures that AI inferences are consistent and tamperproof.
• Interoperability: The ICP allows seamless integration with other on-chain services, paving the way for potential expansions like on-chain chess tournaments.
Resources:
Frontend Canister
Backend Canister
Project Repository
ICP LLM Project
Discord
X
Telegram Channel
TMA
Check our additional show cases on Forum: