Less is More: Recursive Reasoning with Tiny Networks
Paper β’ 2510.04871 β’ Published β’ 517
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
typescript // Clawdbot Capabilities interface ClawdbotFeatures { // Solana Development codeAnalysis: "Smart contract review & optimization"; pdaGeneration: "Generate PDAs with derivation paths"; txBuilder: "Construct & simulate transactions"; // Autonomous Actions portfolioMonitor: "Track & alert on positions"; dexAggregation: "Find optimal swap routes"; yieldFarming: "Auto-compound strategies"; // Intelligence marketAnalysis: "Real-time sentiment & signals"; contractAudit: "Security vulnerability detection"; documentation: "Auto-generate project docs"; }
### Clawdbot Access Tiers
| Feature | Silver | Gold | Diamond |
|---------|--------|------|---------|
| Q&A Responses | β
| β
| β
|
| Code Analysis | β
| β
| β
|
| Transaction Building | β | β
| β
|
| Autonomous Monitoring | β | β | β
|
| Custom Agent Training | β | β | β
|
| API Access | β | β | β
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β TRM-SOLANA-CLAWD ARCHITECTURE β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β Input: "What is a PDA?" β β β β β βΌ β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β BYTE-LEVEL TOKENIZATION β β β β (UTF-8 β 258 vocab tokens) β β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β βΌ β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β RECURSIVE REASONING CORE β β β β βββββββββββββββββββββββββββββββββββββββββββ β β β β β H-Cycle 1 βββΆ H-Cycle 2 β β β β β β β β β β β β β β βΌ βΌ β β β β β β L-Cycle 1,2 L-Cycle 1,2 β β β β β βββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β βΌ β β Output: Refined Solana expertise β β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
### Specifications
| Component | Value |
|-----------|-------|
| Parameters | 3.5M (~1/1000th of GPT-3) |
| Layers (L) | 1 transformer layer |
| High-level cycles (H) | 2 reasoning iterations |
| Low-level cycles (L) | 2 refinement iterations |
| Vocabulary | 258 tokens (byte-level) |
| Max Sequence | 512 tokens |
| Inference | CPU/MPS/GPU compatible |
| Memory | <1GB during inference | bash # Clone the repository git clone https://github.com/8bitlabs/solana-clawd-model cd solana-clawd-model # Install dependencies pip install torch transformers huggingface_hub numpy # Download model python scripts/download_model.py --token YOUR_HF_TOKEN
### Local Inference
python import torch import numpy as np from huggingface_hub import hf_hub_download from models.trm import TinyRecursiveReasoningModel # Download checkpoint checkpoint_path = hf_hub_download( repo_id="ordlibrary/trm-solana-clawd-v1", filename="model.pt" ) # Load model checkpoint = torch.load(checkpoint_path, map_location='cpu') model = TinyRecursiveReasoningModel(**checkpoint['config']['arch']) model.load_state_dict(checkpoint['model_state_dict']) model.eval() # Byte-level encoding def encode(text: str, max_len: int = 512) -> torch.Tensor: bytes_arr = np.frombuffer(text.encode('utf-8'), dtype=np.uint8) tokens = (bytes_arr + 2).astype(np.uint8) seq = np.zeros(max_len, dtype=np.uint8) seq[:min(len(tokens), max_len-1)] = tokens[:max_len-1] seq[min(len(tokens), max_len-1)] = 1 # EOS return torch.tensor(seq).unsqueeze(0) def decode(tokens: torch.Tensor) -> str: tokens = tokens.squeeze().numpy() tokens = tokens[tokens > 1] - 2 # Remove PAD/EOS, unshift return bytes(tokens).decode('utf-8', errors='replace') # Inference question = "What is a Program Derived Address (PDA) in Solana?" input_tensor = encode(question) with torch.no_grad(): output = model(input_tensor) answer = decode(output.argmax(dim=-1)) print(answer) ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β EXAMPLE QUERIES β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β β "What is a Program Derived Address (PDA)?" β β β "How do Solana transactions differ from Ethereum?" β β β "Explain the Solana account model" β β β "What is rent exemption?" β β β "How do cross-program invocations (CPI) work?" β β β "What is the System Program?" β β β "How does Anchor simplify Solana development?" β β β "What are the security best practices for PDAs?" β β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ βββββββ ββββββββ
βββββββββββββββββ
βββ βββββββββββ
βββ βββββββββββ
βββββββββββββββββ
βββββββ ββββββββ
## π What is Solana $CLAWD?
**Solana $CLAWD** is a token-gated AI infrastructure layer combining a **3.5M parameter Tiny Recursive Model (TRM)** with blockchain-native utility. It powers intelligent Solana development assistance, autonomous agents, and on-chain AI inference.
The $CLAWD token unlocks access to the entire Solana $CLAWD ecosystem:
| Tier | $CLAWD Holdings | Benefits |
|---|---|---|
| π₯ Bronze | 10,000 $CLAWD | 100 inference calls/day |
| π₯ Silver | 100,000 $CLAWD | 1,000 inference calls/day + Clawdbot basic |
| π₯ Gold | 500,000 $CLAWD | 5,000 inference calls/day + Clawdbot pro |
| π Diamond | 1,000,000+ $CLAWD | Unlimited + Clawdbot autonomous + API keys |
1. Hold to Access (Recommended)
Simply hold $CLAWD tokens in your connected wallet to unlock tier benefits automatically.
2. Burn for Credits
Burn $CLAWD tokens to receive permanent inference credits:
typescript // Clawdbot Capabilities interface ClawdbotFeatures { // Solana Development codeAnalysis: "Smart contract review & optimization"; pdaGeneration: "Generate PDAs with derivation paths"; txBuilder: "Construct & simulate transactions"; // Autonomous Actions portfolioMonitor: "Track & alert on positions"; dexAggregation: "Find optimal swap routes"; yieldFarming: "Auto-compound strategies"; // Intelligence marketAnalysis: "Real-time sentiment & signals"; contractAudit: "Security vulnerability detection"; documentation: "Auto-generate project docs"; }
### Clawdbot Access Tiers
| Feature | Silver | Gold | Diamond |
|---------|--------|------|---------|
| Q&A Responses | β
| β
| β
|
| Code Analysis | β
| β
| β
|
| Transaction Building | β | β
| β
|
| Autonomous Monitoring | β | β | β
|
| Custom Agent Training | β | β | β
|
| API Access | β | β | β
|
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β TRM-SOLANA-CLAWD ARCHITECTURE β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β Input: "What is a PDA?" β β β β β βΌ β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β BYTE-LEVEL TOKENIZATION β β β β (UTF-8 β 258 vocab tokens) β β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β βΌ β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β RECURSIVE REASONING CORE β β β β βββββββββββββββββββββββββββββββββββββββββββ β β β β β H-Cycle 1 βββΆ H-Cycle 2 β β β β β β β β β β β β β β βΌ βΌ β β β β β β L-Cycle 1,2 L-Cycle 1,2 β β β β β βββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β βΌ β β Output: Refined Solana expertise β β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
### Specifications
| Component | Value |
|-----------|-------|
| Parameters | 3.5M (~1/1000th of GPT-3) |
| Layers (L) | 1 transformer layer |
| High-level cycles (H) | 2 reasoning iterations |
| Low-level cycles (L) | 2 refinement iterations |
| Vocabulary | 258 tokens (byte-level) |
| Max Sequence | 512 tokens |
| Inference | CPU/MPS/GPU compatible |
| Memory | <1GB during inference |
import { Connection, PublicKey } from '@solana/web3.js';
import { getAssociatedTokenAddress, getAccount } from '@solana/spl-token';
const CLAWD_TOKEN_MINT = new PublicKey('8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump');
async function checkCLAWDBalance(walletPubkey: PublicKey): Promise<number> {
const connection = new Connection('https://api.mainnet-beta.solana.com');
const ata = await getAssociatedTokenAddress(CLAWD_TOKEN_MINT, walletPubkey);
try {
const account = await getAccount(connection, ata);
return Number(account.amount) / 1e6; // Assuming 6 decimals
} catch {
return 0;
}
}
function getTier(balance: number): string {
if (balance >= 1_000_000) return 'diamond';
if (balance >= 500_000) return 'gold';
if (balance >= 100_000) return 'silver';
if (balance >= 10_000) return 'bronze';
return 'none';
}
// Token-gated inference endpoint
const response = await fetch('https://api.solana-clawd.ai/v1/inference', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Wallet-Address': walletAddress,
'X-Signature': signedMessage, // Prove wallet ownership
},
body: JSON.stringify({
question: 'How do I create a PDA in Anchor?',
model: 'trm-solana-clawd-v1',
max_tokens: 512,
}),
});
const { answer, tokens_used, remaining_calls } = await response.json();
# Discord Commands (Silver+ tier)
/clawdbot ask "What is rent exemption in Solana?"
/clawdbot analyze <contract_address>
/clawdbot build-tx transfer 1 SOL to <address>
# Telegram Commands
/ask What are CPIs?
/audit <program_id>
/monitor <token_address>
bash # Clone the repository git clone https://github.com/8bitlabs/solana-clawd-model cd solana-clawd-model # Install dependencies pip install torch transformers huggingface_hub numpy # Download model python scripts/download_model.py --token YOUR_HF_TOKEN
### Local Inference
python import torch import numpy as np from huggingface_hub import hf_hub_download from models.trm import TinyRecursiveReasoningModel # Download checkpoint checkpoint_path = hf_hub_download( repo_id="ordlibrary/trm-solana-clawd-v1", filename="model.pt" ) # Load model checkpoint = torch.load(checkpoint_path, map_location='cpu') model = TinyRecursiveReasoningModel(**checkpoint['config']['arch']) model.load_state_dict(checkpoint['model_state_dict']) model.eval() # Byte-level encoding def encode(text: str, max_len: int = 512) -> torch.Tensor: bytes_arr = np.frombuffer(text.encode('utf-8'), dtype=np.uint8) tokens = (bytes_arr + 2).astype(np.uint8) seq = np.zeros(max_len, dtype=np.uint8) seq[:min(len(tokens), max_len-1)] = tokens[:max_len-1] seq[min(len(tokens), max_len-1)] = 1 # EOS return torch.tensor(seq).unsqueeze(0) def decode(tokens: torch.Tensor) -> str: tokens = tokens.squeeze().numpy() tokens = tokens[tokens > 1] - 2 # Remove PAD/EOS, unshift return bytes(tokens).decode('utf-8', errors='replace') # Inference question = "What is a Program Derived Address (PDA) in Solana?" input_tensor = encode(question) with torch.no_grad(): output = model(input_tensor) answer = decode(output.argmax(dim=-1)) print(answer)
| Metric | Value |
|---|---|
| Total Pairs | 8,970 Q&A |
| Training Set | 8,073 (90%) |
| Test Set | 897 (10%) |
| Topics | Solana architecture, accounts, programs, transactions, security, DeFi |
| Encoding | Byte-level UTF-8 |
# config/training.yaml
architecture:
L_layers: 1
H_cycles: 2
L_cycles: 2
vocab_size: 258
max_seq_len: 512
training:
epochs: 5000
global_batch_size: 64
learning_rate: 1e-4
weight_decay: 0.5
ema_enabled: true
ema_rate: 0.999
hardware:
device: mps # Apple Silicon
training_time: "~4 hours"
| Metric | Value |
|---|---|
| Training Loss | ~2.3 |
| Test Loss | ~2.5 |
| Inference Speed | <100ms |
| Memory Usage | <1GB |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β EXAMPLE QUERIES β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β β "What is a Program Derived Address (PDA)?" β β β "How do Solana transactions differ from Ethereum?" β β β "Explain the Solana account model" β β β "What is rent exemption?" β β β "How do cross-program invocations (CPI) work?" β β β "What is the System Program?" β β β "How does Anchor simplify Solana development?" β β β "What are the security best practices for PDAs?" β β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β $CLAWD TOKENOMICS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Token: $CLAWD β
β Contract: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump β
β Chain: Solana β
β Standard: SPL Token β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β UTILITY FLYWHEEL β β
β β β β
β β ββββββββββββ β β
β β β HOLD ββββββββββββββββββββ β β
β β β $CLAWD β β β β
β β ββββββ¬ββββββ β β β
β β β β β β
β β βΌ β β β
β β ββββββββββββ βββββββ΄βββββ β β
β β β ACCESS β β VALUE β β β
β β β TIERS β β ACCRUAL β β β
β β ββββββ¬ββββββ ββββββββββββ β β
β β β β² β β
β β βΌ β β β
β β ββββββββββββ βββββββ΄βββββ β β
β β β USE βββββββββββββΆβ DEMAND β β β
β β β SERVICESβ β GROWS β β β
β β ββββββββββββ ββββββββββββ β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Revenue Streams: β
β β’ Inference API fees β 50% to stakers β
β β’ Clawdbot premium features β 30% buyback & burn β
β β’ Enterprise licensing β Treasury β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// app/api/inference/route.ts
import { NextRequest, NextResponse } from 'next/server';
import { verifyWalletSignature, checkTier } from '@/lib/auth';
export async function POST(req: NextRequest) {
const { question, walletAddress, signature } = await req.json();
// Verify wallet ownership
const isValid = await verifyWalletSignature(walletAddress, signature);
if (!isValid) {
return NextResponse.json({ error: 'Invalid signature' }, { status: 401 });
}
// Check $CLAWD holdings
const tier = await checkTier(walletAddress);
if (tier === 'none') {
return NextResponse.json({
error: 'Insufficient $CLAWD holdings',
required: 10000,
contract: '8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump'
}, { status: 403 });
}
// Process inference
const answer = await runInference(question);
return NextResponse.json({ answer, tier });
}
// hooks/useSolanaCLAWD.ts
import { useWallet } from '@solana/wallet-adapter-react';
import { useState } from 'react';
export function useSolanaCLAWD() {
const { publicKey, signMessage } = useWallet();
const [loading, setLoading] = useState(false);
const askQuestion = async (question: string) => {
if (!publicKey || !signMessage) {
throw new Error('Wallet not connected');
}
setLoading(true);
try {
// Sign message to prove ownership
const message = new TextEncoder().encode(`Solana CLAWD: ${Date.now()}`);
const signature = await signMessage(message);
const response = await fetch('/api/inference', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
question,
walletAddress: publicKey.toBase58(),
signature: Buffer.from(signature).toString('base64'),
}),
});
return await response.json();
} finally {
setLoading(false);
}
};
return { askQuestion, loading };
}
| Limitation | Description |
|---|---|
| Domain Specific | Trained only on Solana content |
| Knowledge Cutoff | Limited to training data timeframe |
| Not for Audits | Do not use for production security audits |
| English Only | Trained exclusively on English data |
| Q&A Format | Optimized for questions, not conversations |
| Resource | Link |
|---|---|
| π TRM Paper | arXiv:2510.04871 |
| π» TRM Code | GitHub |
| π€ Model | HuggingFace |
| π Solana Docs | docs.solana.com |
| π Buy $CLAWD | Pump.fun |