On-Chain Model Training Β· LoRA Fine-Tuning Β· Dataset Engineering Β· NVIDIA Blueprint Integration Β· ZK Attestation Β· CAAP/1.0 Registry
\boxed{\text{Training Surface}} \xrightarrow[\text{36K SFT + 29K Realtime + 19K CPT + 142 Trading}]{\text{Dataset Ingestion}} \boxed{SFT JSONL} \xrightarrow{\text{LoRA (r=16)}} \boxed{\text{Adapter}} \xrightarrow{\text{HF Jobs / Local MPS}} \boxed{\text{Trained Model}}
The Solana Clawd AI Training Framework is a complete, one-shot pipeline for training, registering, and serving Solana-native AI models. It ships inside ai-training/ and includes:
| Component | Description |
|---|---|
| 36K SFT Dataset | Curated Solana/DeFi instruction-tuning examples |
| LoRA Training Pipeline | Qwen2.5-1.5B-Instruct + Hermes-3-8B fine-tuning |
| 13 Perps Tools | Phoenix/Jupiter function-calling library |
| 6 NVIDIA Blueprints | Transaction foundation, distillation, RAG, signal discovery, portfolio optimization, AI-Q |
| Onchain Registry | CAAP/1.0 model registration + ZK compressed attestations |
| Clawd Constitution | Sovereign AI agent runtime governance |
| Model Kit CLI | clawd-model-kit β one-shot ingest β train β register |
| Model Arena | Multi-provider chat/code benchmark comparison |
# βββ 1. Clone & Install βββ
git clone https://github.com/Solizardking/solana-clawd
cd solana-clawd/ai-training
pip install -r requirements.txt
export HF_TOKEN=hf_...
# βββ 2. Train on Remote GPU (Recommended) βββ
./scripts/launch_hf_jobs.sh a100-large # ~$3-6 for full run
# βββ 3. Train on Local Mac MPS βββ
python3 scripts/train_lora.py --num-epochs 1 --no-quant
# βββ 4. Register Model Onchain βββ
./dao/register_model.sh \
--hf-model "YOUR_ORG/your-model-id" \
--eval-accuracy 0.60 \
--dataset-size 36109
# βββ 5. Serve Locally βββ
ollama create my-clawd -f ollama/Modelfile.finetuned
ollama run my-clawd "How do I detect a rug pull on a fresh Solana token?"
# Drop files into data/incoming/, then:
model-kit/bin/clawd-model-kit doctor # check system
model-kit/bin/clawd-model-kit init # create dirs
model-kit/bin/clawd-model-kit one-shot \
data/incoming \
--dataset-repo solanaclawd/my-dataset \
--train-dry-run
| Dataset | Examples | Split (train/eval/test) | Status | Domain |
|---|---|---|---|---|
| Core AI Instruct | 35,173 | 31,655 / 1,758 / 1,760 | β Published | Solana, DeFi, ZK, Agent Architecture |
| Legacy Seed | 36,109 | 32,498 / 1,805 / 1,806 | β Published | Solana fundamentals, constitutional reasoning |
| Realtime Research | 29,058 | 26,152 / 1,452 / 1,454 | β Published | PDFs, notebooks, parquet QA, ZK skills |
| TX Foundation CPT | 19,542 | β | β Published | Solana mainnet transactions (4886 vocab) |
| NVIDIA Trading Factory | 142 | 127 / 7 / 8 | β Published | Perps, cuML, cuFOLIO, Mean-CVaR |
| TX Foundation Unified | 82,169 | 17,262 CPT + 64,907 SFT | β Published | Combined transaction foundation |
solanaclawd/solana-clawd-core-ai-instruct # 35,173 examples
solanaclawd/solana-clawd-instruct # 36,109 examples (legacy)
solanaclawd/solana-clawd-realtime-research-instruct # 29,058 examples
solanaclawd/solana-tx-foundation-cpt # 19,542 examples
solanaclawd/solana-clawd-nvidia-trading-factory-instruct # 142 examples
solanaclawd/solana-tx-foundation-unified # 82,169 examples
BigQuery (mainnet) βββΊ Tokenizer (vocab 4886) βββΊ CPT JSONL βββΊ TX Foundation Model
PDFs / Notebooks βββΊ realtime_dataset_ingest βββΊ SFT JSONL βββΊ Realtime Dataset
Source Docs βββΊ auto_research.py βββΊ SFT JSONL βββΊ Core AI Dataset
Perps Tools βββΊ build_trading_factory βββΊ SFT JSONL βββΊ NVIDIA Trading Dataset
| Model | Type | Params | Base | Status |
|---|---|---|---|---|
solanaclawd/solana-clawd-core-ai-1.5b-lora | LoRA Adapter | ~9M (0.6%) | Qwen2.5-1.5B-Instruct | β Live |
solanaclawd/solana-tx-foundation-1.5b | Full Model | 1.5B | Qwen2.5-1.5B-Instruct | π Training |
solanaclawd/solana-tx-foundation-7b | Full Model | 7B | Qwen2.5-7B-Instruct | β³ Queued |
solanaclawd/clawd-fable | Full Model | β | AliesTaha/fable-traces | β Live |
solanaclawd/clawd-fable-lora | LoRA Adapter | β | AliesTaha/fable-traces | β Live |
solanaclawd/solana-nvidia-trading-factory-8b-lora | LoRA Adapter | β | Hermes-3-8B | β Live |
solanaclawd/clawd-solana-masterpiece-qwen15-lora | LoRA Adapter | β | Qwen2.5-1.5B | β Live |
NVIDIA_API_KEY set β NIM API (nvidia/nemotron-3-nano-30b-a3b)
HF_TOKEN set β HF Inference API (nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16)
CLAWD_INFERENCE_URL set β Self-hosted Clawd endpoint
CLAWD_ROUTER_KEY set β clawd-box-router.fly.dev (free tier)
(fallback) β Ollama localhost:11434
data/solana_clawd_merged.jsonl
β
βΌ
scripts/prepare_dataset.py βββΊ HF Dataset splits (90/5/5)
β data/processed/*.parquet
βΌ
scripts/train_lora.py βββΊ LoRA adapter (r=16, Ξ±=32, all-linear)
β data/outputs/solana-clawd-1.5b-lora/
βΌ
scripts/launch_hf_jobs.sh βββΊ HF Jobs (A100, H200, L4x1)
β Push to hub: solanaclawd/...
βΌ
scripts/evaluate.py βββΊ Eval results β outputs/eval/
β
βΌ
dao/register_model.sh βββΊ CAAP/1.0 registry β onchain.x402.wtf
βββββββββββββββββββββββββββββββββββββββββββββββ
β LoRA Rank/Alpha: 16 / 32 β
β LoRA Dropout: 0.05 β
β Target Modules: q/k/v/o + gate/up/downβ
β Trainable Params: ~9M (0.6% of base) β
β Epochs: 3 (1 for recovery) β
β Learning Rate: 2.0e-4 (cosine, 3% WP)β
β Batch Size: 2 Γ 8 grad accum = 16 β
β Max Sequence: 4096 tokens β
β Loss: Assistant-only masked β
β Quantization: 4-bit NF4 (optional) β
β Hardware: A100 80GB / MPS (Mac) β
β Train Loss: 0.9008 β
β Token Accuracy: 82.9% β
β Tokens Trained: 24.54M β
βββββββββββββββββββββββββββββββββββββββββββββββ
# Smoke test β 100 steps, float32 (bfloat16 unsupported on MPS)
python3 scripts/train_lora.py \
--config configs/glm52_lora_config_mac.yaml \
--num-epochs 1 \
--no-quant
# Fixes applied for MPS compatibility:
# device_map: "auto" β {"": "mps"} (avoid meta-device offload)
# torch_dtype: bfloat16 β float32 (stable MPS matmul)
# gradient_checkpointing: false (PEFT conflict on MPS)
| Config File | Base Model | Dataset | Purpose |
|---|---|---|---|
configs/lora_config.yaml | Qwen2.5-1.5B | Core AI (35K) | Primary SFT config |
configs/core_ai_lora_config.yaml | Qwen2.5-1.5B | Core AI (35K) | Core AI lane |
configs/hermes3_lora_config.yaml | Hermes-3-8B | Perps (13 tools) | Function-calling + trading |
configs/glm52_lora_config.yaml | Qwen2.5-7B | Core AI (36K) | Full 7B training |
configs/glm52_lora_config_mac.yaml | Qwen2.5-7B | Core AI (27K) | MPS-compatible 7B |
configs/deep_solana_cpt_config.yaml | Qwen2.5-1.5B | TX Foundation CPT | Continued pre-training |
configs/deepsol_clawd_code_lora_mac.yaml | Qwen2.5-1.5B | Code SFT | Code generation MPS |
configs/qwen35_fable5_clawd_lora.yaml | fable-traces | Clawd Fable SFT | Fable trace training |
configs/qwen35_fable5_clawd_lora_mac.yaml | fable-traces | Clawd Fable SFT | Fable MPS config |
configs/nvidia_trading_factory_lora_config.yaml | Hermes-3-8B | Trading Factory (142) | NVIDIA trading LoRA |
configs/nvidia_trading_factory_lora_config_mac.yaml | Hermes-3-8B | Trading Factory (142) | Trading factory MPS |
configs/nvidia_trading_factory_config.yaml | Nemotron-3 | Trading Factory (142) | NVIDIA teacher config |
configs/autoresearch_wiki_lora_config_mac.yaml | Qwen2.5-1.5B | AutoResearch SFT | Wiki research MPS |
configs/autoresearch_wiki_dataset_config.yaml | β | AutoResearch | Dataset generation |
configs/clawd_future_drill_lora_config_mac.yaml | Qwen2.5-1.5B | Future Drill SFT | Scenario planning MPS |
configs/clawd_future_refinement_lora_config_mac.yaml | Qwen2.5-1.5B | Future Refinement SFT | Refinement MPS |
configs/clawd_masterpiece_lora_config_mac.yaml | Qwen2.5-1.5B | Masterpiece SFT | Masterpiece MPS |
configs/eval_config.yaml | β | Eval dataset | Evaluation runner |
configs/realtime_dataset_config.yaml | β | Realtime data | Dataset ingest config |
configs/hauhau_qwen36_llama_cpp.yaml | Qwen3.6 | llama.cpp | GGUF quantization |
| # | Blueprint | Directory | Status | Output |
|---|---|---|---|---|
| 1 | Transaction Foundation Model | nvidia/blueprints/transaction-foundation-model/ | π Training | Solana TX tokenizer (vocab 4886), CPT pipeline |
| 2 | Model Distillation | nvidia/blueprints/model-distillation/ | β Ready | Nemotron teacher β CoT distillation |
| 3 | Enterprise RAG | nvidia/blueprints/enterprise-rag/ | β Ready | Solana doc retrieval pipeline |
| 4 | Quantitative Signal Discovery | nvidia/blueprints/signal-discovery/ | β Ready | Market signal agent |
| 5 | Portfolio Optimization | nvidia/blueprints/portfolio-optimization/ + nvidia/cufolio/ | β Ready | cuFOLIO Mean-CVaR |
| 6 | AI-Q | nvidia/blueprints/aiq/ | β Ready | Model quality scoring |
BigQuery (crypto_solana_mainnet_us)
β query: DEX swaps (Jupiter, Phoenix, Orca, Raydium)
βΌ
SolanaTokenizerPipeline (vocab_size=4886)
β PROG_N IX_SWAP MINT_N MINT_N AMT_N AMT_N FEE_N SLOT_N SIDE_BUY STATUS_SUCCESS
βΌ
CPT JSONL (19,542 examples)
β
ββββΊ 01_dataset_baseline.ipynb
ββββΊ 02_seq_preproc_tokenization.ipynb
ββββΊ 03_foundation_model_training.ipynb
ββββΊ 04_inference_embedding_extraction.ipynb
ββββΊ 05_xgboost_fraud_detection.ipynb
# Full TX foundation pipeline
python3 nvidia/blueprints/transaction-foundation-model/pipeline.py \
--stages cpt sft evaluate
# Signal discovery agent
python3 nvidia/blueprints/signal-discovery/quantitative_signal_agent.py \
--market SOL --mode paper
# AI-Q evaluation
model-kit/bin/clawd-model-kit nvidia aiq --strict
# All NVIDIA checkpoints
model-kit/bin/clawd-model-kit nvidia verify --strict
13 Solana Perpetuals Tools β Drop-in function-calling for any OpenAI-compatible agent
| Tool | What It Does |
|---|---|
get_sol_price | SOL price + 24h change (CoinGecko) |
get_token_price | Any Solana token by symbol or mint |
get_perp_markets | Phoenix DEX perp markets (mark, OI, volume, funding) |
get_funding_rate | Hourly + 8h + annualized funding rate |
get_orderbook | Phoenix order book (top N bids/asks, spread) |
check_positions | Open perp positions for a wallet |
check_sol_balance | SOL + USD balance |
get_jupiter_quote | Best swap route + price impact (Jupiter v6) |
paper_trade | Simulate perp entry (mark, liq, margin, funding) |
get_market_overview | Snapshot: SOL price, TPS, epoch, top markets |
get_trader_history | Recent fills + realized PnL on Phoenix |
send_sol | Transfer SOL (paper mode by default) |
assess_position_risk | Liq price, max loss, funding cost, 1-10 risk score |
from perps.functions import get_openai_tools, call_function
tools = get_openai_tools() # all 13 tools in OpenAI format
# Direct call
import json
print(json.dumps(call_function("get_sol_price", {}), indent=2))
print(json.dumps(call_function("assess_position_risk", {
"market": "SOL-PERP", "side": "long", "size_usd": 500, "leverage": 3
}), indent=2))
# Hermes-3 agent
python3 perps/functioncall.py --query "What's the SOL-PERP funding rate?"
# GOAP multi-step reasoning
python3 perps/functioncall.py --goap \
--query "Assess the risk of shorting SOL-PERP with $1000 at 5x leverage"
Layer 1: Off-Chain Index (curl, no wallet)
curl -X POST https://onchain.x402.wtf/api/register \
-H "Authorization: Bearer $HF_TOKEN" \
-d '{"hf_model_id": "...", ...}'
Returns CAAP/1.0 JSON record
Layer 2: Onchain PDA (Anchor tx, permanent)
./dao/register_model.sh --onchain \
--hf-model "..." --keypair ~/.config/solana/id.json --cluster devnet
Creates ModelRegistry PDA at seeds ["model", authority]
Layer 3: ZK Attestations (Light Protocol compressed, ~0.00003 SOL)
pnpm tsx dao/attestation/create_attestation.ts \
--type dataset --model-id "..." --hash "sha256:..." --compressed
solana_ai_inference: 3dLst2E3djtCSwG19mFS3REHxtZPngjyga7iYZLDL5xj (devnet)
SAS Attestation: ATSPssFHEjvJgAXKkfAWNRqTQW9Wm6JDDVW7Ec1G3zM
Light Protocol Null: NFLx5WGPrTHHvdRNsidcrNcLxRruMC92E4yv7zhZBoT
$CLAWD Token: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLAWD DAO β
β β
β Genesis Programs (Attribution/Accounting Only): β
β βββ ModelRegistry ββ PDA per authority β
β βββ DataSubmission ββ $CLAWD credit per example β
β βββ ValidatorAccount ββ Stake + reputation β
β βββ SAS Attestations ββ Compressed ZK credentials β
β β
β User Capital (Genesis NEVER touches): β
β βββ Percolator Insurance Pools ββ Market-determined rates β
β β
β Governance: Proposal β 72h vote β 1-week Squads timelock β
β Emergency: 3-of-5 multisig (pause only, no withdrawals) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Full index
curl https://onchain.x402.wtf/.well-known/clawd-registry.json | jq .
# Specific model
curl "https://onchain.x402.wtf/api/models?hf_id=solanaclawd/solana-clawd-1.5b"
# Verify attestation onchain (no API trust)
solana account <ATTESTATION_PDA> --url devnet --output json
The Onchain Constitution governs all Clawd agents at runtime. It is not decorative β it prescribes how agents choose models, route inference, store data, handle failures, and add integrations.
1. Usable without a paid model provider
2. Core functionality requires no single vendor account
3. Data remains under operator control by default
4. Every important inference path leaves evidence
5. Paid inference is an upgrade, not a dependency
6. Model routing is configurable at the boundary
7. Failure is logged, not hidden
8. Deterministic solutions preferred over model calls
9. Correctness is checkable after the fact
10. Sovereignty and capability are the same requirement
1. Deterministic local computation
2. Cached result
3. Local or self-hosted model
4. Free no-auth router with ZK receipt
5. Free no-auth router without ZK receipt
6. Paid x402 premium model
7. Paid external provider
8. Manual operator escalation
Inference by default. Dependency by choice. Verification over trust. Operator control over vendor gravity. Sovereign by design. On-chain by proof.
Full constitution: docs/onchain_constitution.md (665 lines)
python3 scripts/evaluate.py \
--config configs/eval_config.yaml \
--adapter solanaclawd/solana-clawd-core-ai-1.5b-lora \
--dataset solanaclawd/solana-clawd-eval \
--out ./outputs/eval \
--format markdown
| Metric | Value |
|---|---|
| Training Loss | 0.9008 |
| Token Accuracy | 82.9% |
| Tokens Trained | 24.54M |
| Samples/sec | 2.73 |
The model arena at models.x402.wtf compares any OpenAI-compatible provider, plus Anthropic and Gemini:
OpenRouter: nvidia/llama-nemotron, openrouter/fusion, kimi-k2.7-code
Anthropic: claude-opus-4.8-fast
OpenAI: gpt-5.2, gpt-5.1-codex-max
xAI: grok-4.3
NVIDIA: nemotron-3-ultra-550b-a55b
Qwen: qwen3.7-plus
DeepSeek: deepseek-v3.2
# Arena API
GET /api/arena/providers # Provider templates + metadata
POST /api/arena/runs # Start chat or code run
GET /api/arena/runs/{id}/events # SSE realtime events
GET /api/arena/runs/{id} # Recorded outputs + benchmarks
train2earn/
βββ clawd-training-index/ # Static training index export
βββ configs/ # LoRA/CPT/eval/dataset configs
βββ data/ # LFS-backed datasets, manifests, processed metadata
β βββ core_ai_processed/
β βββ model_kit/
β βββ nvidia_trading_factory_processed/
β βββ realtime_research_processed/
β βββ tx_foundation_cpt_processed/
β βββ incoming/ # Drop zone for model-kit ingest
β βββ perps/ # Perps strategy data
β βββ strategies/ # Trading strategies
βββ dao/ # Onchain registry + attestations
β βββ attestation/ # ZK compressed attestation scripts
β βββ DAO_DESIGN.md # Full DAO architecture
β βββ MODEL_KIT_HANDOFF.md # Model kit β DAO handoff
β βββ register_model.sh # One-shot registration
β βββ register_model.ts # Anchor TS client
βββ docs/ # Model, dataset, onchain, and session docs
β βββ model_card.md # Live model card (624 lines)
β βββ dataset_card.md # Dataset documentation (272 lines)
β βββ onchainai.md # Onchain registry skill (414 lines)
β βββ onchain_constitution.md # Constitution (665 lines)
β βββ clawd_fable.md # Fable trace training
β βββ clawd_solana_svm_ai_compute_design.md # Full protocol spec (1658 lines)
β βββ hauhau_qwen36.md # Qwen3.6 quantization
β βββ SESSIONS.md # Training session logs
βββ etc/ # Mascot images (4K transparent, blueprint grid)
βββ memory/ # Honcho memory server
βββ model-kit/ # Terminal-first training surface
β βββ bin/clawd-model-kit # CLI entrypoint
β βββ clawd_model_kit.py # Python CLI wrapper
β βββ frontend/ # models.x402.wtf + register.x402.wtf
β βββ backend/ # FastAPI arena + status + registration proxy
β βββ scripts/ # Verification scripts
β βββ docs/ # 8 documentation files
βββ nvidia/ # NVIDIA blueprint implementations
β βββ blueprints/
β βββ transaction-foundation-model/ # BigQuery + tokenizer + CPT pipeline
β βββ model-distillation/ # Nemotron teacher β CoT
β βββ enterprise-rag/ # Document retrieval
β βββ signal-discovery/ # Market signals
β βββ portfolio-optimization/ # cuFOLIO
β βββ aiq/ # Model quality
βββ ollama/ # Modelfile templates and LFS-backed GGUF builds
βββ site/ # Vite/React source for the training index
β βββ src/
β βββ public/
β βββ assets/
βββ tools/ # Static-site and W&B/data sync helpers
βββ training/ # Imported Nemo Clawd training scaffold
βββ training-data/ # Source-grounded corpus/SFT/eval workspace
βββ wandb/ # Local/offline W&B runs; ignored by Git
βββ TRAINING_DATA_MAP.md # Machine-wide training asset inventory
βββ .gitattributes # Git LFS rules and text normalization
βββ .gitignore # Generated/local cache exclusions
Large JSONL datasets, GGUF model builds, vector indexes, model weight formats,
and binary image assets are tracked through Git LFS. Generated dependencies and
local runtime output are ignored: site/node_modules/, site/.npm-cache/,
site/dist/, Python __pycache__/, NVIDIA blueprint .venv/ directories,
.DS_Store, wandb/, and local training outputs.
Main Repository: github.com/Solizardking/solana-clawd
Training Repository: github.com/Solizardking/solana-clawd-ai-training
Model Kit: models.x402.wtf
Registry: onchain.x402.wtf
Hugging Face: huggingface.co/solanaclawd
$CLAWD: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump
11 commits
Python
44.1%
JavaScript
18.2%
Standard ML
9.1%
Shell
8.1%
TypeScript
7.5%
HTML
7.3%
Rust
2.1%
On-Chain Model Training Β· LoRA Fine-Tuning Β· Dataset Engineering Β· NVIDIA Blueprint Integration Β· ZK Attestation Β· CAAP/1.0 Registry
\boxed{\text{Training Surface}} \xrightarrow[\text{36K SFT + 29K Realtime + 19K CPT + 142 Trading}]{\text{Dataset Ingestion}} \boxed{SFT JSONL} \xrightarrow{\text{LoRA (r=16)}} \boxed{\text{Adapter}} \xrightarrow{\text{HF Jobs / Local MPS}} \boxed{\text{Trained Model}}
The Solana Clawd AI Training Framework is a complete, one-shot pipeline for training, registering, and serving Solana-native AI models. It ships inside ai-training/ and includes:
| Component | Description |
|---|---|
| 36K SFT Dataset | Curated Solana/DeFi instruction-tuning examples |
| LoRA Training Pipeline | Qwen2.5-1.5B-Instruct + Hermes-3-8B fine-tuning |
| 13 Perps Tools | Phoenix/Jupiter function-calling library |
| 6 NVIDIA Blueprints | Transaction foundation, distillation, RAG, signal discovery, portfolio optimization, AI-Q |
| Onchain Registry | CAAP/1.0 model registration + ZK compressed attestations |
| Clawd Constitution | Sovereign AI agent runtime governance |
| Model Kit CLI | clawd-model-kit β one-shot ingest β train β register |
| Model Arena | Multi-provider chat/code benchmark comparison |
# βββ 1. Clone & Install βββ
git clone https://github.com/Solizardking/solana-clawd
cd solana-clawd/ai-training
pip install -r requirements.txt
export HF_TOKEN=hf_...
# βββ 2. Train on Remote GPU (Recommended) βββ
./scripts/launch_hf_jobs.sh a100-large # ~$3-6 for full run
# βββ 3. Train on Local Mac MPS βββ
python3 scripts/train_lora.py --num-epochs 1 --no-quant
# βββ 4. Register Model Onchain βββ
./dao/register_model.sh \
--hf-model "YOUR_ORG/your-model-id" \
--eval-accuracy 0.60 \
--dataset-size 36109
# βββ 5. Serve Locally βββ
ollama create my-clawd -f ollama/Modelfile.finetuned
ollama run my-clawd "How do I detect a rug pull on a fresh Solana token?"
# Drop files into data/incoming/, then:
model-kit/bin/clawd-model-kit doctor # check system
model-kit/bin/clawd-model-kit init # create dirs
model-kit/bin/clawd-model-kit one-shot \
data/incoming \
--dataset-repo solanaclawd/my-dataset \
--train-dry-run
| Dataset | Examples | Split (train/eval/test) | Status | Domain |
|---|---|---|---|---|
| Core AI Instruct | 35,173 | 31,655 / 1,758 / 1,760 | β Published | Solana, DeFi, ZK, Agent Architecture |
| Legacy Seed | 36,109 | 32,498 / 1,805 / 1,806 | β Published | Solana fundamentals, constitutional reasoning |
| Realtime Research | 29,058 | 26,152 / 1,452 / 1,454 | β Published | PDFs, notebooks, parquet QA, ZK skills |
| TX Foundation CPT | 19,542 | β | β Published | Solana mainnet transactions (4886 vocab) |
| NVIDIA Trading Factory | 142 | 127 / 7 / 8 | β Published | Perps, cuML, cuFOLIO, Mean-CVaR |
| TX Foundation Unified | 82,169 | 17,262 CPT + 64,907 SFT | β Published | Combined transaction foundation |
solanaclawd/solana-clawd-core-ai-instruct # 35,173 examples
solanaclawd/solana-clawd-instruct # 36,109 examples (legacy)
solanaclawd/solana-clawd-realtime-research-instruct # 29,058 examples
solanaclawd/solana-tx-foundation-cpt # 19,542 examples
solanaclawd/solana-clawd-nvidia-trading-factory-instruct # 142 examples
solanaclawd/solana-tx-foundation-unified # 82,169 examples
BigQuery (mainnet) βββΊ Tokenizer (vocab 4886) βββΊ CPT JSONL βββΊ TX Foundation Model
PDFs / Notebooks βββΊ realtime_dataset_ingest βββΊ SFT JSONL βββΊ Realtime Dataset
Source Docs βββΊ auto_research.py βββΊ SFT JSONL βββΊ Core AI Dataset
Perps Tools βββΊ build_trading_factory βββΊ SFT JSONL βββΊ NVIDIA Trading Dataset
| Model | Type | Params | Base | Status |
|---|---|---|---|---|
solanaclawd/solana-clawd-core-ai-1.5b-lora | LoRA Adapter | ~9M (0.6%) | Qwen2.5-1.5B-Instruct | β Live |
solanaclawd/solana-tx-foundation-1.5b | Full Model | 1.5B | Qwen2.5-1.5B-Instruct | π Training |
solanaclawd/solana-tx-foundation-7b | Full Model | 7B | Qwen2.5-7B-Instruct | β³ Queued |
solanaclawd/clawd-fable | Full Model | β | AliesTaha/fable-traces | β Live |
solanaclawd/clawd-fable-lora | LoRA Adapter | β | AliesTaha/fable-traces | β Live |
solanaclawd/solana-nvidia-trading-factory-8b-lora | LoRA Adapter | β | Hermes-3-8B | β Live |
solanaclawd/clawd-solana-masterpiece-qwen15-lora | LoRA Adapter | β | Qwen2.5-1.5B | β Live |
NVIDIA_API_KEY set β NIM API (nvidia/nemotron-3-nano-30b-a3b)
HF_TOKEN set β HF Inference API (nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16)
CLAWD_INFERENCE_URL set β Self-hosted Clawd endpoint
CLAWD_ROUTER_KEY set β clawd-box-router.fly.dev (free tier)
(fallback) β Ollama localhost:11434
data/solana_clawd_merged.jsonl
β
βΌ
scripts/prepare_dataset.py βββΊ HF Dataset splits (90/5/5)
β data/processed/*.parquet
βΌ
scripts/train_lora.py βββΊ LoRA adapter (r=16, Ξ±=32, all-linear)
β data/outputs/solana-clawd-1.5b-lora/
βΌ
scripts/launch_hf_jobs.sh βββΊ HF Jobs (A100, H200, L4x1)
β Push to hub: solanaclawd/...
βΌ
scripts/evaluate.py βββΊ Eval results β outputs/eval/
β
βΌ
dao/register_model.sh βββΊ CAAP/1.0 registry β onchain.x402.wtf
βββββββββββββββββββββββββββββββββββββββββββββββ
β LoRA Rank/Alpha: 16 / 32 β
β LoRA Dropout: 0.05 β
β Target Modules: q/k/v/o + gate/up/downβ
β Trainable Params: ~9M (0.6% of base) β
β Epochs: 3 (1 for recovery) β
β Learning Rate: 2.0e-4 (cosine, 3% WP)β
β Batch Size: 2 Γ 8 grad accum = 16 β
β Max Sequence: 4096 tokens β
β Loss: Assistant-only masked β
β Quantization: 4-bit NF4 (optional) β
β Hardware: A100 80GB / MPS (Mac) β
β Train Loss: 0.9008 β
β Token Accuracy: 82.9% β
β Tokens Trained: 24.54M β
βββββββββββββββββββββββββββββββββββββββββββββββ
# Smoke test β 100 steps, float32 (bfloat16 unsupported on MPS)
python3 scripts/train_lora.py \
--config configs/glm52_lora_config_mac.yaml \
--num-epochs 1 \
--no-quant
# Fixes applied for MPS compatibility:
# device_map: "auto" β {"": "mps"} (avoid meta-device offload)
# torch_dtype: bfloat16 β float32 (stable MPS matmul)
# gradient_checkpointing: false (PEFT conflict on MPS)
| Config File | Base Model | Dataset | Purpose |
|---|---|---|---|
configs/lora_config.yaml | Qwen2.5-1.5B | Core AI (35K) | Primary SFT config |
configs/core_ai_lora_config.yaml | Qwen2.5-1.5B | Core AI (35K) | Core AI lane |
configs/hermes3_lora_config.yaml | Hermes-3-8B | Perps (13 tools) | Function-calling + trading |
configs/glm52_lora_config.yaml | Qwen2.5-7B | Core AI (36K) | Full 7B training |
configs/glm52_lora_config_mac.yaml | Qwen2.5-7B | Core AI (27K) | MPS-compatible 7B |
configs/deep_solana_cpt_config.yaml | Qwen2.5-1.5B | TX Foundation CPT | Continued pre-training |
configs/deepsol_clawd_code_lora_mac.yaml | Qwen2.5-1.5B | Code SFT | Code generation MPS |
configs/qwen35_fable5_clawd_lora.yaml | fable-traces | Clawd Fable SFT | Fable trace training |
configs/qwen35_fable5_clawd_lora_mac.yaml | fable-traces | Clawd Fable SFT | Fable MPS config |
configs/nvidia_trading_factory_lora_config.yaml | Hermes-3-8B | Trading Factory (142) | NVIDIA trading LoRA |
configs/nvidia_trading_factory_lora_config_mac.yaml | Hermes-3-8B | Trading Factory (142) | Trading factory MPS |
configs/nvidia_trading_factory_config.yaml | Nemotron-3 | Trading Factory (142) | NVIDIA teacher config |
configs/autoresearch_wiki_lora_config_mac.yaml | Qwen2.5-1.5B | AutoResearch SFT | Wiki research MPS |
configs/autoresearch_wiki_dataset_config.yaml | β | AutoResearch | Dataset generation |
configs/clawd_future_drill_lora_config_mac.yaml | Qwen2.5-1.5B | Future Drill SFT | Scenario planning MPS |
configs/clawd_future_refinement_lora_config_mac.yaml | Qwen2.5-1.5B | Future Refinement SFT | Refinement MPS |
configs/clawd_masterpiece_lora_config_mac.yaml | Qwen2.5-1.5B | Masterpiece SFT | Masterpiece MPS |
configs/eval_config.yaml | β | Eval dataset | Evaluation runner |
configs/realtime_dataset_config.yaml | β | Realtime data | Dataset ingest config |
configs/hauhau_qwen36_llama_cpp.yaml | Qwen3.6 | llama.cpp | GGUF quantization |
| # | Blueprint | Directory | Status | Output |
|---|---|---|---|---|
| 1 | Transaction Foundation Model | nvidia/blueprints/transaction-foundation-model/ | π Training | Solana TX tokenizer (vocab 4886), CPT pipeline |
| 2 | Model Distillation | nvidia/blueprints/model-distillation/ | β Ready | Nemotron teacher β CoT distillation |
| 3 | Enterprise RAG | nvidia/blueprints/enterprise-rag/ | β Ready | Solana doc retrieval pipeline |
| 4 | Quantitative Signal Discovery | nvidia/blueprints/signal-discovery/ | β Ready | Market signal agent |
| 5 | Portfolio Optimization | nvidia/blueprints/portfolio-optimization/ + nvidia/cufolio/ | β Ready | cuFOLIO Mean-CVaR |
| 6 | AI-Q | nvidia/blueprints/aiq/ | β Ready | Model quality scoring |
BigQuery (crypto_solana_mainnet_us)
β query: DEX swaps (Jupiter, Phoenix, Orca, Raydium)
βΌ
SolanaTokenizerPipeline (vocab_size=4886)
β PROG_N IX_SWAP MINT_N MINT_N AMT_N AMT_N FEE_N SLOT_N SIDE_BUY STATUS_SUCCESS
βΌ
CPT JSONL (19,542 examples)
β
ββββΊ 01_dataset_baseline.ipynb
ββββΊ 02_seq_preproc_tokenization.ipynb
ββββΊ 03_foundation_model_training.ipynb
ββββΊ 04_inference_embedding_extraction.ipynb
ββββΊ 05_xgboost_fraud_detection.ipynb
# Full TX foundation pipeline
python3 nvidia/blueprints/transaction-foundation-model/pipeline.py \
--stages cpt sft evaluate
# Signal discovery agent
python3 nvidia/blueprints/signal-discovery/quantitative_signal_agent.py \
--market SOL --mode paper
# AI-Q evaluation
model-kit/bin/clawd-model-kit nvidia aiq --strict
# All NVIDIA checkpoints
model-kit/bin/clawd-model-kit nvidia verify --strict
13 Solana Perpetuals Tools β Drop-in function-calling for any OpenAI-compatible agent
| Tool | What It Does |
|---|---|
get_sol_price | SOL price + 24h change (CoinGecko) |
get_token_price | Any Solana token by symbol or mint |
get_perp_markets | Phoenix DEX perp markets (mark, OI, volume, funding) |
get_funding_rate | Hourly + 8h + annualized funding rate |
get_orderbook | Phoenix order book (top N bids/asks, spread) |
check_positions | Open perp positions for a wallet |
check_sol_balance | SOL + USD balance |
get_jupiter_quote | Best swap route + price impact (Jupiter v6) |
paper_trade | Simulate perp entry (mark, liq, margin, funding) |
get_market_overview | Snapshot: SOL price, TPS, epoch, top markets |
get_trader_history | Recent fills + realized PnL on Phoenix |
send_sol | Transfer SOL (paper mode by default) |
assess_position_risk | Liq price, max loss, funding cost, 1-10 risk score |
from perps.functions import get_openai_tools, call_function
tools = get_openai_tools() # all 13 tools in OpenAI format
# Direct call
import json
print(json.dumps(call_function("get_sol_price", {}), indent=2))
print(json.dumps(call_function("assess_position_risk", {
"market": "SOL-PERP", "side": "long", "size_usd": 500, "leverage": 3
}), indent=2))
# Hermes-3 agent
python3 perps/functioncall.py --query "What's the SOL-PERP funding rate?"
# GOAP multi-step reasoning
python3 perps/functioncall.py --goap \
--query "Assess the risk of shorting SOL-PERP with $1000 at 5x leverage"
Layer 1: Off-Chain Index (curl, no wallet)
curl -X POST https://onchain.x402.wtf/api/register \
-H "Authorization: Bearer $HF_TOKEN" \
-d '{"hf_model_id": "...", ...}'
Returns CAAP/1.0 JSON record
Layer 2: Onchain PDA (Anchor tx, permanent)
./dao/register_model.sh --onchain \
--hf-model "..." --keypair ~/.config/solana/id.json --cluster devnet
Creates ModelRegistry PDA at seeds ["model", authority]
Layer 3: ZK Attestations (Light Protocol compressed, ~0.00003 SOL)
pnpm tsx dao/attestation/create_attestation.ts \
--type dataset --model-id "..." --hash "sha256:..." --compressed
solana_ai_inference: 3dLst2E3djtCSwG19mFS3REHxtZPngjyga7iYZLDL5xj (devnet)
SAS Attestation: ATSPssFHEjvJgAXKkfAWNRqTQW9Wm6JDDVW7Ec1G3zM
Light Protocol Null: NFLx5WGPrTHHvdRNsidcrNcLxRruMC92E4yv7zhZBoT
$CLAWD Token: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLAWD DAO β
β β
β Genesis Programs (Attribution/Accounting Only): β
β βββ ModelRegistry ββ PDA per authority β
β βββ DataSubmission ββ $CLAWD credit per example β
β βββ ValidatorAccount ββ Stake + reputation β
β βββ SAS Attestations ββ Compressed ZK credentials β
β β
β User Capital (Genesis NEVER touches): β
β βββ Percolator Insurance Pools ββ Market-determined rates β
β β
β Governance: Proposal β 72h vote β 1-week Squads timelock β
β Emergency: 3-of-5 multisig (pause only, no withdrawals) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Full index
curl https://onchain.x402.wtf/.well-known/clawd-registry.json | jq .
# Specific model
curl "https://onchain.x402.wtf/api/models?hf_id=solanaclawd/solana-clawd-1.5b"
# Verify attestation onchain (no API trust)
solana account <ATTESTATION_PDA> --url devnet --output json
The Onchain Constitution governs all Clawd agents at runtime. It is not decorative β it prescribes how agents choose models, route inference, store data, handle failures, and add integrations.
1. Usable without a paid model provider
2. Core functionality requires no single vendor account
3. Data remains under operator control by default
4. Every important inference path leaves evidence
5. Paid inference is an upgrade, not a dependency
6. Model routing is configurable at the boundary
7. Failure is logged, not hidden
8. Deterministic solutions preferred over model calls
9. Correctness is checkable after the fact
10. Sovereignty and capability are the same requirement
1. Deterministic local computation
2. Cached result
3. Local or self-hosted model
4. Free no-auth router with ZK receipt
5. Free no-auth router without ZK receipt
6. Paid x402 premium model
7. Paid external provider
8. Manual operator escalation
Inference by default. Dependency by choice. Verification over trust. Operator control over vendor gravity. Sovereign by design. On-chain by proof.
Full constitution: docs/onchain_constitution.md (665 lines)
python3 scripts/evaluate.py \
--config configs/eval_config.yaml \
--adapter solanaclawd/solana-clawd-core-ai-1.5b-lora \
--dataset solanaclawd/solana-clawd-eval \
--out ./outputs/eval \
--format markdown
| Metric | Value |
|---|---|
| Training Loss | 0.9008 |
| Token Accuracy | 82.9% |
| Tokens Trained | 24.54M |
| Samples/sec | 2.73 |
The model arena at models.x402.wtf compares any OpenAI-compatible provider, plus Anthropic and Gemini:
OpenRouter: nvidia/llama-nemotron, openrouter/fusion, kimi-k2.7-code
Anthropic: claude-opus-4.8-fast
OpenAI: gpt-5.2, gpt-5.1-codex-max
xAI: grok-4.3
NVIDIA: nemotron-3-ultra-550b-a55b
Qwen: qwen3.7-plus
DeepSeek: deepseek-v3.2
# Arena API
GET /api/arena/providers # Provider templates + metadata
POST /api/arena/runs # Start chat or code run
GET /api/arena/runs/{id}/events # SSE realtime events
GET /api/arena/runs/{id} # Recorded outputs + benchmarks
train2earn/
βββ clawd-training-index/ # Static training index export
βββ configs/ # LoRA/CPT/eval/dataset configs
βββ data/ # LFS-backed datasets, manifests, processed metadata
β βββ core_ai_processed/
β βββ model_kit/
β βββ nvidia_trading_factory_processed/
β βββ realtime_research_processed/
β βββ tx_foundation_cpt_processed/
β βββ incoming/ # Drop zone for model-kit ingest
β βββ perps/ # Perps strategy data
β βββ strategies/ # Trading strategies
βββ dao/ # Onchain registry + attestations
β βββ attestation/ # ZK compressed attestation scripts
β βββ DAO_DESIGN.md # Full DAO architecture
β βββ MODEL_KIT_HANDOFF.md # Model kit β DAO handoff
β βββ register_model.sh # One-shot registration
β βββ register_model.ts # Anchor TS client
βββ docs/ # Model, dataset, onchain, and session docs
β βββ model_card.md # Live model card (624 lines)
β βββ dataset_card.md # Dataset documentation (272 lines)
β βββ onchainai.md # Onchain registry skill (414 lines)
β βββ onchain_constitution.md # Constitution (665 lines)
β βββ clawd_fable.md # Fable trace training
β βββ clawd_solana_svm_ai_compute_design.md # Full protocol spec (1658 lines)
β βββ hauhau_qwen36.md # Qwen3.6 quantization
β βββ SESSIONS.md # Training session logs
βββ etc/ # Mascot images (4K transparent, blueprint grid)
βββ memory/ # Honcho memory server
βββ model-kit/ # Terminal-first training surface
β βββ bin/clawd-model-kit # CLI entrypoint
β βββ clawd_model_kit.py # Python CLI wrapper
β βββ frontend/ # models.x402.wtf + register.x402.wtf
β βββ backend/ # FastAPI arena + status + registration proxy
β βββ scripts/ # Verification scripts
β βββ docs/ # 8 documentation files
βββ nvidia/ # NVIDIA blueprint implementations
β βββ blueprints/
β βββ transaction-foundation-model/ # BigQuery + tokenizer + CPT pipeline
β βββ model-distillation/ # Nemotron teacher β CoT
β βββ enterprise-rag/ # Document retrieval
β βββ signal-discovery/ # Market signals
β βββ portfolio-optimization/ # cuFOLIO
β βββ aiq/ # Model quality
βββ ollama/ # Modelfile templates and LFS-backed GGUF builds
βββ site/ # Vite/React source for the training index
β βββ src/
β βββ public/
β βββ assets/
βββ tools/ # Static-site and W&B/data sync helpers
βββ training/ # Imported Nemo Clawd training scaffold
βββ training-data/ # Source-grounded corpus/SFT/eval workspace
βββ wandb/ # Local/offline W&B runs; ignored by Git
βββ TRAINING_DATA_MAP.md # Machine-wide training asset inventory
βββ .gitattributes # Git LFS rules and text normalization
βββ .gitignore # Generated/local cache exclusions
Large JSONL datasets, GGUF model builds, vector indexes, model weight formats,
and binary image assets are tracked through Git LFS. Generated dependencies and
local runtime output are ignored: site/node_modules/, site/.npm-cache/,
site/dist/, Python __pycache__/, NVIDIA blueprint .venv/ directories,
.DS_Store, wandb/, and local training outputs.
Main Repository: github.com/Solizardking/solana-clawd
Training Repository: github.com/Solizardking/solana-clawd-ai-training
Model Kit: models.x402.wtf
Registry: onchain.x402.wtf
Hugging Face: huggingface.co/solanaclawd
$CLAWD: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump
11 commits
Python
44.1%
JavaScript
18.2%
Standard ML
9.1%
Shell
8.1%
TypeScript
7.5%
HTML
7.3%
Rust
2.1%