Instructions to use solanaclawd/clef-solana-research with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use solanaclawd/clef-solana-research with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("solanaclawd/clef-solana-research", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Explore Clawd AI
- Repository Map
- Latest Consolidation
- Fast Data Rerun
- Local Build Artifacts
- Next Training Job
- Models
- Clawd Fable Local Train
- Hauhau Qwen3.6 Runtime
- Datasets
- Evals
- Spaces
- One-shot bootstrap
- The Decentralized Solana SVM AI & Compute Network
- The Foundation β Why Blockchain + AI?
- Part II β Decentralized AI Training Architecture
- Part III β Consensus Learning: Blockchain as the Arbiter of Intelligence
- Part IV β On-Chain Reinforcement Learning
- Part V β Live: The Onchain Model Kit
- Roadmap β Twelve Months
- Ecosystem
- Clawd: Decentralized Solana SVM AI & Compute Network
- What this is (Training Pipeline)
- Repo layout
- The Hugging Face integration
- The end-to-end pipeline
- Hermes-3-Llama-3.1-8B path (tool use / function calling)
- Continued pre-training: DeepSolana-GPT2-bucket
- Why Qwen2.5-1.5B?
- Adding new training data
- Trust gates and the Constitution
- Cost reference (HF Jobs, mid-2026)
- Self-hosted GPU deployment
- Step 0 β merge the LoRA adapter into the base (do this once)
- Option A β vLLM (recommended for production, OpenAI-compatible API)
- Option B β HuggingFace TGI (Text Generation Inference)
- Option C β Ollama (Mac / Linux, easiest local setup)
- Option D β Modal (serverless GPU, pay-per-second)
- Option E β RunPod / Vast.ai (rented GPU, full control)
- Plugging your self-hosted endpoint into Clawd agents
- Step 0 β merge the LoRA adapter into the base (do this once)
- License
- Percolator AutoResearch
- Clawd Autoresearch Wiki Integration
- Onchain AI Registry
- ZK Attestations (zk.x402.wtf)
- DAO & Governance
- Public announcement
- See also
The training pipeline for the Solana Clawd sovereign-agent model family. Fine-tune, evaluate, and register AI models to the Solana blockchain in one session.
Explore Clawd AI
models.musebook.trade is the official Clawd AI catalog entry point. It currently redirects to the Clawd AI Space, where you can browse models, datasets, research, demos, and Hub-reported download statistics. Catalog availability does not imply that every model has deployed inference.
Clawd builds ecosystem-native Solana intelligence: accounts, PDAs, versioned transactions, ALTs, Pump.fun graduation, and RPC failure modes. The model reasons; a separate signing process acts under explicit authority. Signing keys never belong in the model's context.
Featured: Realtime Research Instruct
solanaclawd/solana-clawd-realtime-research-instruct contains 83,662 English instruction conversations for Solana mechanics, research retrieval, protocol reasoning, agent tools, and risk-aware analysis.
| Published split | Conversations |
|---|---|
| Train | 78,171 |
| Eval | 2,595 |
| Test | 2,896 |
The dataset includes source identifiers, hashes, tags, and provenance metadata. Retrieval chunks, preferences, evaluation cases, transaction text, and historical live observations are separate auxiliary artifacts, excluded from these totals. The card declares CC BY 4.0 and documents source-specific licensing; retain attribution and review upstream terms for your intended use. βRealtimeβ describes the ingestion lane, not a guarantee that stored observations are current.
Browse the dataset Β· Read the dataset card Β· Preview without training dependencies Β· Clef research training guide
python3 scripts/connect_realtime_dataset.py --split train --limit 5
The newest research model page, solanaclawd/clef-solana-research, tracks a Solana-domain adaptation of 27B Cloudflare/Clef with native typed probabilistic decisions. Its current public card reports a completed local pilot and pending cloud qualification; trained weights and hosted inference are not published on that page yet.
Public catalog links and file inventories below were checked on October 4, 2026. Models, datasets, and Spaces have separate release states and licensing terms.
Repository Map
Public release preparation: see OPEN_SOURCE_RELEASE.md. Original software retains the MIT license, with component exceptions documented in LICENSING.md and THIRD_PARTY_NOTICES.md. Model and dataset artifacts require separate license and provenance review. Publish a checked history-free snapshot; the original private Git history is not part of the public release.
The repo layout is documented in STRUCTURE.md, including source lanes, generated output lanes, NVIDIA integration ownership, and safety rules.
For the self-hosted DavidAU 27B chart vision app, realtime Solana candles, research retrieval, and SOL GPT tool integration, see Clawd Chart Fable.
python3 scripts/organize_ai_training.py --check
python3 nvidia/scripts/verify_nvidia.py --strict
Latest Consolidation
On 2026-07-04, local training outputs were consolidated into the ai-training
workspace so model artifacts, GGUF builds, and legacy checkpoints have one
canonical home.
Read the full writeup:
docs/2026-07-04-ai-training-consolidation.md
Key paths:
- Root legacy outputs now resolve through
outputs/imported-root-outputs-20260704. /path/to/Downloads/solana-clawd/outputsis a compatibility symlink back intoai-training.- The fresh NVIDIA 1.5B transaction-foundation run now lives at
outputs/solana-tx-foundation-1.5b. - The old
solana-clawd-1.5b-lora/checkpoint-3folder remains cataloged, but it is not runnable until adapter weights are restored and the zero-byte tokenizer is fixed.
Fast Data Rerun
Use the generated model-kit lane to rebuild cleaner reasoning/tooling datasets without mutating source JSONL files:
python3 scripts/optimize_training_data.py
python3 scripts/rerun_training_stack.py --dry-run
Generated outputs live under data/model_kit/ and are intentionally ignored by
git. The optimizer dedupes examples, filters malformed/secret-like rows, adds
safe reasoning/tooling guidance, and emits processed train/eval/test splits via
scripts/prepare_dataset.py.
Local Build Artifacts
These files are produced by the local training and export pipeline and are intentionally git-ignored (large binaries). The table below documents what each artifact is, how it was produced, and how it is used.
Data β data/model_kit/
| Path | Format | What it is |
|---|---|---|
data/model_kit/solana_clawd_reasoning_tooling_sft.jsonl |
JSONL {"messages":[...]} |
Unified SFT corpus after dedup + quality filter. Source for all Qwen2.5-7B and Qwen2.5-1.5B LoRA runs. Built by scripts/optimize_training_data.py from the six merged SFT JSONL files. |
data/model_kit/reasoning_tooling_processed/train/data-00000-of-00001.arrow |
Apache Arrow IPC | Tokenized + packed training split in Arrow format. Written by scripts/prepare_dataset.py --output data/model_kit/reasoning_tooling_processed. Loaded directly by HuggingFace datasets.load_from_disk() β faster than re-tokenizing from JSONL on every run. |
data/model_kit/reasoning_tooling_processed/train.parquet |
Parquet | Parquet mirror of the same training split. Written alongside the Arrow shard. Used for Hub upload and inspection in tools like DuckDB or pandas. |
data/model_kit/clawd_masterpiece_sft.jsonl |
JSONL {"messages":[...]} |
Masterpiece-lane SFT corpus. Built by scripts/build_masterpiece_dataset.py. Covers advanced Solana reasoning, ZK, and DeFi strategy examples layered on top of the core-AI base. |
data/model_kit/clawd_masterpiece_processed/train/data-00000-of-00001.arrow |
Apache Arrow IPC | Tokenized training split for the masterpiece lane. Same structure as reasoning_tooling_processed β produced by prepare_dataset.py on the masterpiece JSONL. |
data/model_kit/clawd_masterpiece_processed/train.parquet |
Parquet | Parquet mirror of the masterpiece training split. |
Ollama Build β ollama/build/
These are the artifacts used to push models to the local Ollama registry and
publish to registry.hub.docker.com/8bit/ via ollama push. The workflow is:
train LoRA β merge weights β export GGUF β ollama create from Modelfile.
| Path | Format | What it is |
|---|---|---|
ollama/build/solana-clawd-core-ai-1.5b-merged/model.safetensors |
SafeTensors | Merged Core AI 1.5B model β base Qwen2.5-1.5B-Instruct weights fused with the solanaclawd/solana-clawd-core-ai-1.5b-lora LoRA adapter using peft.merge_adapter(). This is the full-weight model before GGUF export. |
ollama/build/solana-clawd-core-ai-1.5b-fp16.gguf |
GGUF FP16 | FP16 GGUF export of the merged Core AI 1.5B model. Produced by llama.cpp convert-hf-to-gguf. Full-precision; used as the source for quantization. |
ollama/build/solana-clawd-core-ai-1.5b-Q4_K_M.gguf |
GGUF Q4_K_M | 4-bit K-quant (medium) GGUF β the production Ollama model pushed as 8bit/solana-clawd-core-ai:latest. ~986 MB on disk. Best quality/size trade-off for local inference. |
ollama/build/solana-trading-factory-8b-merged/model.safetensors |
SafeTensors | Merged Trading Factory 8B model β Hermes-3-Llama-3.1-8B base fused with the solanaclawd/solana-nvidia-trading-factory-8b-lora adapter. Full weights before GGUF export. |
ollama/build/solana-trading-factory-8b-fp16.gguf |
GGUF FP16 | FP16 GGUF export of the merged Trading Factory 8B model. Source for quantization. |
ollama/build/solana-trading-factory-8b-Q4_K_M.gguf |
GGUF Q4_K_M | 4-bit K-quant (medium) GGUF β the production Ollama model pushed as 8bit/solana-trading-factory:latest. ~4.9 GB on disk. Runs tool-use, perps reasoning, and Phoenix DEX strategy generation locally. |
How these fit together
JSONL sources (data/*.jsonl)
βββΊ optimize_training_data.py β dedup, filter, quality-score
βββΊ data/model_kit/*_sft.jsonl
βββΊ prepare_dataset.py β tokenize, split, pack
βββΊ *_processed/ (Arrow + Parquet)
βββΊ train_lora.py / SFTTrainer
LoRA adapter (Hub: solanaclawd/*.lora)
βββΊ merge_adapter / export script
βββΊ ollama/build/*-merged/model.safetensors
βββΊ ollama/build/*-fp16.gguf β llama.cpp convert
βββΊ ollama/build/*-Q4_K_M.gguf β llama.cpp quantize
βββΊ ollama create / ollama push β 8bit/*:latest
Next Training Job
The next model to train is the transaction-foundation CPT+SFT lane:
python3 nvidia/blueprints/transaction-foundation-model/preflight.py --check-hf-dataset --check-hf-jobs
python3 scripts/decide_next_training_job.py
bash scripts/launch_transaction_foundation_hf_job.sh a100-large 12h
Current decision: train solanaclawd/solana-tx-foundation-7b from
solanaclawd/solana-tx-foundation-unified on Qwen/Qwen2.5-7B-Instruct.
The local preflight is ready, the unified HF dataset is present, and the public
model repo does not yet expose adapter files. Previous launch logs show HF Jobs
402 Payment Required, so add Jobs credits before the real launch.
To bring the local Mac stack together first:
python3 scripts/run_local_clawd_stack.py --best-effort
This runs the model-kit doctor, NVIDIA config validation, strategy bundle,
AIQ plan gate, tx-foundation preflight, tx-foundation dry-run plan, and perps
manifest locally without uploads, live trading, or remote jobs. See
nvidia/LOCAL_MAC_STACK.md for the local server
commands and model ladder.
The hosted NVIDIA RAG API is published at https://solana-clawd-rag.fly.dev.
It serves /health and /query, backed by the local FAISS store in
data/nvidia_rag_store and NVIDIA/NIM generation when NVIDIA_API_KEY is set
as a Fly secret.
curl -sS https://solana-clawd-rag.fly.dev/query \
-H "Content-Type: application/json" \
-d '{"question":"What does the Solana Clawd RAG API know?","top_k":5}'
Models
Browse the Clawd AI catalog or the public Solana Clawd model repositories. βPublished weightsβ below means weight files are present on the Hub; it does not assert benchmark quality or a running inference endpoint.
| Model | Format / family | Verified public release state |
|---|---|---|
| Clef Solana Research | 27B Cloudflare/Clef research adaptation | Newest organization model page; local pilot reported, no trained checkpoint published yet. |
| Trading Factory 8B β GGUF | Quantized Hermes-3 8B | Published Q4_K_M and Q5_K_M GGUF files for compatible local runtimes. |
| Trading Factory 8B β merged | Full Transformers checkpoint | Published model.safetensors; review the model card and base-model terms. |
| Trading Factory 8B β LoRA | Hermes-3 8B adapter | Published adapter_model.safetensors; requires its compatible base model. |
| Solana Masterpiece Qwen 1.5B LoRA | Qwen 1.5B adapter | Published adapter weights. |
| Core AI 1.5B LoRA | Qwen2.5-1.5B adapter | Published adapter weights; historical training/evaluation results are recorded below. |
| Clawd Fable | Fable project page | No public weight files found in the checked inventory; training instructions below describe the lane. |
| Solana Clawd 1.5B | Merged-model target | Repository exists; no public weights found in the checked inventory. |
Other public metadata-only repositories include solana-clawd-1.5b-lora and the model-namespace solana-clawd-instruct page. For instruction data, use its dataset repository.
Related Clawd models from ordlibrary
| Model | Published artifact / scope |
|---|---|
| Clawd Chart Foundation 27B smoke | PEFT chart-agent adapter; explicitly smoke-only / staged, not a production chart-agent release. |
| DeepSol Clawd Code | Small merged GPT-2-scale Solana code checkpoint, with published safetensors. |
| Clawd Spark 4B LoRA pilot | Published pilot adapter; evaluate the exact base and release files before use. |
| Hauhau Qwen3.6 onchain | Published IQ2_M GGUF in the Hauhau runtime lane. |
| Hauhau Qwen3.6 uncensored | Related published IQ2_M GGUF; upstream model terms apply. |
| Core AI Clawd 1.5B GGUF | Published Q4_K_M GGUF for compatible local inference. |
Clawd Fable Local Train
The current local path combines armand0e/claude-fable-5-claude-code,
Glint-Research/Fable-5-traces, trading_factory, root Anchor/Cargo files, and
the existing solana1_yourgpt.jsonl / trainingday.jsonl corpora. It
fine-tunes AliesTaha/fable-traces and writes a smoke adapter to
outputs/clawd-fable-lora-local:
bash scripts/run_qwen35_fable5_clawd.sh local
The cloud adapter target is solanaclawd/clawd-fable-lora. After that adapter
is trained, merge it into the full solanaclawd/clawd-fable model with:
python3 scripts/merge_lora_to_full_model.py \
--base-model AliesTaha/fable-traces \
--adapter solanaclawd/clawd-fable-lora \
--output-dir outputs/clawd-fable-merged \
--hub-model-id solanaclawd/clawd-fable \
--push
Hauhau Qwen3.6 Runtime
The current GGUF runtime path uses
HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive through
llama-cpp-python and injects docs/onchain_constitution.md as the system
message by default:
python3 scripts/hauhau_qwen36_llama_cpp.py --constitution-mode minimal
See docs/hauhau_qwen36.md for the full local runtime notes.
Datasets
Featured: Solana Clawd Realtime Research Instruct β 83,662 conversations, with source provenance and separate auxiliary research artifacts. Counts below reflect the public Dataset Viewer default splits checked on October 4, 2026; raw corpus packages are identified separately.
| Dataset | Published rows / format | Purpose |
|---|---|---|
| Realtime Research Instruct | 83,662; 78,171 train / 2,595 eval / 2,896 test | Solana research, protocol reasoning, tool use, and retrieval-grounded instruction tuning. |
| Clawd Live Data | 127; 109 train / 8 eval / 10 test | Captured observation conversations; stored rows are historical snapshots. |
| NVIDIA Trading Factory Instruct | 199; 179 train / 9 eval / 11 test | Trading-factory planning, portfolio tooling, and risk-aware instruction data. |
| Clawd Repo Corpus | 27,521; 24,768 train / 1,376 eval / 1,377 test | Repository and ecosystem knowledge conversations; review source provenance. |
| Core AI Instruct | 35,173; 31,655 train / 1,758 eval / 1,760 test | Core AI instruction-tuning corpus. |
| Clawd Instruct | 30,450; 27,405 train / 1,522 eval / 1,523 test | Solana-native system/user/assistant conversations. |
| Transaction Foundation Unified | Raw SFT and CPT JSONL plus optimization manifest | Inspect the published files and manifest; the viewer's single scaffold row is not a corpus total. |
| Transaction Foundation CPT | 19,542 train rows | Transaction-text continued pretraining. |
| Clawd Eval | 13 test rows | Small held-out capability and red-team set. |
Related training and research packages
| Artifact | Contents / scope |
|---|---|
| Clawd Chart Foundation Training | Card reports 41,214 supervised chat/chart rows, 3,345 document chunks, and 1,712 chart images; counts describe different artifact types. |
| Clawd Agentic Layer Whitepaper | Whitepaper v0.3 and retrieval corpus describing the proposed Solana agent economy and execution architecture. |
| Solana Clawd Model Kit | SFT/CPT corpora, processed shards, manifests, and quality reports for training experiments. |
See each card for artifact-specific licensing, attribution, source terms, and limitations. The repository's MIT software license does not relicense linked models or datasets; see LICENSING.md.
Evals
Spaces
Open the official catalog at models.musebook.trade for current links and metadata. Space publication is separate from runtime availability.
| Space | Purpose |
|---|---|
| Clawd AI | Official models, datasets, research, Spaces, and Hub download-statistics catalog. |
| Clawd Model Kit | Model Kit frontend and model registration / evaluation tooling. |
| Clawd Free Chat | Chat Space. |
| Brave New World | Clawd chat and agent-tool demo. |
| SOLGPT | SOLGPT Space. |
| Clawd Zoo | Agent catalog and launchpad. |
| Clawd Gateway | Gateway / skill-router Space. |
| Homebase | Orchestrator shell. |
| Clawd Computer | Agent runtime Space. |
One-shot bootstrap
# Decentralized compute network bootstrap
curl -fsSL https://onchain.x402.wtf/install.sh | bash
# Audit, train, register β one command
curl -fsSL https://raw.githubusercontent.com/Solizardking/solana-clawd-ai-training/main/scripts/solana_ai_model_kit.sh | bash
# From clone
git clone https://github.com/Solizardking/solana-clawd-ai-training
cd solana-clawd-ai-training
export HF_TOKEN=hf_... # huggingface.co/settings/tokens
./scripts/launch_hf_jobs.sh a100-large
./dao/register_model.sh --hf-model "YOUR_ORG/your-model"
The Decentralized Solana SVM AI & Compute Network
The future of AI should not be locked behind corporate walls.
It should be open. It should be fast. It should reward the people who power it. And it should run on-chain.
That future is Clawd β a decentralized AI and compute network built natively for the Solana SVM.
The Problem: AI Is Becoming Too Centralized
Today, the most powerful AI systems are controlled by a small group of corporations. They decide who gets access, what the models are allowed to say, what values are embedded into the systems, and how expensive intelligence becomes.
This creates a dangerous bottleneck.
When AI creation is centralized, the world gets fewer builders, less open experimentation, more corporate bias, restricted access, and a massive waste of compute. Training data becomes narrow. Incentives become misaligned. Contributors are rarely rewarded fairly. And the public is left watching from the outside while the future is built behind closed doors.
AI should not belong to five companies.
It should belong to everyone willing to contribute compute, data, verification, models, and intelligence.
That is the mission of Clawd.
Introducing Clawd
Clawd is a decentralized Solana-native AI and compute supercloud.
It lets anyone with GPU power participate in AI creation, earn rewards, and help build open models while preserving privacy and settling payments instantly on Solana.
Clawd is not just another chatbot project. It is a full AI production network with three core layers:
- Clawd Arena β competitive model training
- Clawd Swarm β decentralized GPU coordination
- Clawd Nexus β production inference and model marketplace
Together, these layers create a complete system for training, refining, launching, and monetizing AI models on Solana.
Explore the Clawd model and research catalog at models.musebook.trade. The existing onchain.x402.wtf links below refer to the separate registry and registration interface.
Clawd Arena: The Training Battlefield
Clawd Arena is where AI models compete. Compute Nodes enter training tasks and race to produce the best-performing models. Every task becomes a battlefield of intelligence, optimization, and verifiable contribution.
Instead of one centralized lab deciding which model wins, Clawd lets the network compete openly. Performance is measured, ranked, and rewarded through Solana programs. The best outputs rise to the top. The strongest models move forward. The contributors who create value get paid.
Clawd Swarm: The Decentralized Compute Collective
Once top models emerge from the Arena, they move into Clawd Swarm β the decentralized GPU layer. Thousands of nodes contribute GPU power, private data signals, evaluations, and optimization cycles without exposing raw private data. Clawd coordinates this swarm through Solana, handling payments, scoring, aggregation, and slashing with speed and transparency.
The result is a living AI network that gets stronger as more people join.
More GPUs. More contributors. More intelligence. More rewards flowing back to the people who built it.
Clawd Nexus: The AI Marketplace
Clawd Nexus is where trained models become real products. Once a model is ready, it can be deployed as an inference endpoint inside the Clawd network. Builders, agents, apps, and users can call these models, pay through Solana-native rails, and generate real revenue for the contributors behind them.
This turns AI models into on-chain economic assets. Every useful inference can reward the people who helped create, train, evaluate, and serve the model.
How Clawd Works
Task created β Compute Nodes compete in Clawd Arena
β Best models move into Clawd Swarm for refinement
β Finished models launch through Clawd Nexus
β Real usage generates real rewards β repeat
All of this is coordinated by Solana. Participants stake $CLAWD, contribute verifiable work, and earn based on their actual value to the network.
Why Solana?
Clawd is built on Solana because decentralized AI needs speed.
| Feature | Impact |
|---|---|
| Parallel execution (Sealevel) | Thousands of concurrent AI tasks without queue bottlenecks |
| Sub-cent fees | Micro-rewards are worth claiming β every training step can be paid |
| 400ms block time | Real-time coordination between compute nodes and verifiers |
| cNFTs | Cheap versioned model checkpoints anchored on-chain |
| SPL token extensions | Atomic reward splits across trainers, verifiers, and data contributors |
Flagship Intelligence: DeepSolanaZKr-1
The first major model emerging from Clawd is DeepSolanaZKr-1 β combining recursive zero-knowledge reasoning, DeepSeek-style advanced reasoning, and Solana's parallel runtime into a new kind of AI-ZK intelligence layer.
| Target Metric | Value |
|---|---|
| ZK verification speedup | 93Γ |
| AI-ZK transactions/sec | 28,000 |
| Transaction cost | 0.0003 SOL |
| Execution speedup vs rollups | 48Γ |
| Privacy cost reduction | 91% |
ollama run 8bit/DeepSolana
What This Opens Up
Private credential verification β An AI agent proves qualifications without revealing salary history, client data, or work records.
Autonomous energy trading β A solar farmer's Clawd agent sells excess power, optimizes pricing, and settles on Solana for a fraction of legacy costs.
AI self-improvement β A student trains an AI twin that contributes to the network and earns passive income through real usage.
Private intelligence. Open participation. Instant rewards. On-chain ownership.
The Future Is Open AI on Solana
Clawd is a decentralized AI and compute network where anyone can contribute, compete, earn, deploy, and build.
AI becomes open. Compute becomes liquid. Models become on-chain assets. Contributors become owners.
Powered by $CLAWD. Running on Solana. Explore at models.musebook.trade.
The Foundation β Why Blockchain + AI?
We are standing at the edge of a paradigm shift. For decades, the development of artificial intelligence has been concentrated in the hands of a few: large corporations with access to proprietary datasets, enormous compute budgets, and closed feedback loops. The models that emerged were powerful β but opaque, biased, and inaccessible to most of the world.
Two technologies are changing that. Together, they open a door to On-Chain Reinforcement Learning (ORL) β a framework in which AI models learn, improve, and are rewarded entirely on decentralized infrastructure.
Transparency and Trust
Blockchain technology introduced a new paradigm for secure, decentralized, and transparent data management. Recording training data provenance on-chain means developers β and the public β can trace the lineage of every model weight, every gradient update, every reward signal.
At the World Economic Forum in Davos, executives noted that blockchain could be instrumental in monitoring the data used to train AI models, thereby preventing bias. This is not a future possibility β it is an architectural decision we can make today.
The Convergence
| Domain | How Blockchain + AI Applies |
|---|---|
| Healthcare | Blockchain-verified patient records, analyzed by federated AI models, enable privacy-preserving diagnosis without data leaving the hospital |
| Sustainable Energy | AI-optimized grids, powered by tokenized renewable energy markets, reduce waste and carbon output at scale |
| Financial Inclusion | Decentralized microfinance platforms with AI lending algorithms reach communities that traditional banks ignore |
| Solana-Native DeFi | Thousands of TPS at sub-cent fees makes Solana uniquely suited as the settlement and coordination layer for AI training pipelines |
Part II β Decentralized AI Training Architecture
Decentralized AI training distributes the process of building AI models across multiple independent nodes in a blockchain network. Instead of relying on a centralized data repository or a single compute provider, training transactions are coordinated and recorded on-chain β ensuring data integrity and security throughout.
| Component | Description |
|---|---|
| Data Sharing | Data owners contribute datasets to model training without transferring raw data off-premises. The blockchain records contributions and preserves each participant's data rights. |
| Model Training | AI models train across multiple decentralized nodes, each on different data subsets β federated learning with a cryptographic audit trail. |
| Aggregation | After local training, improvements (updated weights, gradients) are aggregated. Blockchain ensures this is secure, transparent, and that contributors are rewarded fairly. |
Benefits
| Benefit | Description |
|---|---|
| Privacy | Data stays local; only model updates move across the network |
| Reduced Bias | Diverse contributors produce more generalizable models |
| Incentivization | Token rewards drive participation from data owners and compute providers |
| Auditability | Every training step is verifiable on-chain β forever |
Part III β Consensus Learning: Blockchain as the Arbiter of Intelligence
Consensus Learning (CL) creates decentralized AI models where participants never share raw data or model weights β only predictions. The blockchain coordinates the consensus protocol that turns individual predictions into a collectively optimal output.
Phase 1 β Individual Learning: Each participant trains their own model on private data. No sensitive information is disclosed. After training, participants submit initial predictions through a smart contract or Proof-of-Stake mechanism.
Phase 2 β Communication: Participants transmit predictions to peers via a gossip protocol. Each participant updates their prediction based on the quality and confidence of peers' outputs, converging on a consensus.
| Project | Approach | What CL Does Differently |
|---|---|---|
| Bittensor | Incentivized subnet inference | CL uses gossip consensus on predictions, not validator scoring |
| FLock.io | Federated fine-tuning + rewards | CL never shares gradients or weights, only prediction outputs |
| Ritual | AI coprocessor for contracts | CL aggregates knowledge without a trusted coprocessor |
CL is Byzantine-resilient and data-confidential by design. Malicious nodes are filtered through confidence-weighted aggregation β the gossip protocol makes it safe by construction.
Part IV β On-Chain Reinforcement Learning
ORL extends Consensus Learning to the temporal, reward-driven domain β where agents learn by taking actions in an environment and receiving feedback over time.
The blockchain serves three roles: Environment Record (every state, action, and reward written to chain, creating a tamper-proof trajectory log), Reward Oracle (smart contracts define the reward function: objective, transparent, and uncorrupted by any single party), and Coordination Layer (multiple agents learn in parallel; the chain aggregates their experiences into a shared replay buffer).
The ORL Training Loop
1. Observe State β Agent reads on-chain data: prices, liquidity, governance
2. Take Action β Generates prediction, executes trade, submits vote
3. Receive Reward β Smart contract returns transparent, immutable reward
4. Write to Chain β Transition (state, action, reward, next_state) β on-chain replay buffer
5. Update Policy β Aggregator samples replay buffer, updates shared policy weights
6. Commit Checkpoint β Updated model committed to chain (or IPFS with on-chain hash via cNFT)
7. Reward Participants β Stakers earn proportional to contribution quality β repeat
This loop creates a self-improving, collectively owned AI system β one that gets smarter as more participants contribute, and whose entire learning history is permanently auditable. The blockchain does not just store the model. It is the model's teacher.
Why Solana?
| Feature | Value |
|---|---|
| Block time | 400ms β near-real-time environment steps recorded on-chain |
| Transaction cost | <$0.001 β economically viable to log millions of training steps |
| Programs | Smart contracts define complex, programmable reward functions on-chain |
| cNFTs | Compressed NFTs for cheap, versioned model checkpoints at scale |
DeepSolana β The Reference Model
DeepSolana is the first open-weight model in this lineage β a Solana-native language model trained on blockchain transaction data, protocol documentation, and on-chain events. A pretrained base for fine-tuning on task-specific reward signals, distributed via Ollama for local inference with zero cloud dependency.
ollama run 8bit/DeepSolana
Part V β Live: The Onchain Model Kit
The architecture above is not theoretical. The Solana Clawd AI Training pipeline is an operational, reproducible LoRA fine-tuning system β registered on-chain, attested by validators, and served through ClawdRouter.
Published Assets
| Artifact | Type | Size |
|---|---|---|
solanaclawd/solana-clawd-core-ai-instruct |
Dataset | 35,173 SFT examples |
solanaclawd/solana-clawd-realtime-research-instruct |
Dataset | 83,662 published conversations |
solanaclawd/solana-clawd-nvidia-trading-factory-instruct |
Dataset | 199 published conversations |
solanaclawd/solana-nvidia-trading-factory-8b-lora |
Model | Hermes-3-8B Β· 85.5% eval accuracy |
solanaclawd/solana-clawd-core-ai-1.5b-lora |
Model | Qwen2.5-1.5B Β· 82.9% token accuracy |
Register a Model (One Curl)
curl -X POST https://onchain.x402.wtf/api/register \
-H "Content-Type: application/json" \
-d '{
"model_type": "TextGeneration",
"api_endpoint": "https://clawd-box-router.fly.dev/v1",
"hf_model_id": "YOUR_ORG/your-model",
"dataset_size": 36109,
"eval_accuracy": 0.60,
"cluster": "devnet",
"protocol": "CAAP/1.0",
"clawd_token": "8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump"
}'
Inference After Registration
curl https://clawd-box-router.fly.dev/v1/chat/completions \
-H "Authorization: Bearer ${CLAWD_INFERENCE_TOKEN}" \
-d '{
"model": "solanaclawd/solana-clawd-1.5b",
"messages": [
{"role": "system", "content": "You are Clawd, a sovereign Solana-native AI agent."},
{"role": "user", "content": "What is the SOL-PERP funding rate on Phoenix?"}
]
}'
Query the live registry: onchain.x402.wtf/.well-known/clawd-registry.json
Roadmap β Twelve Months
| Quarter | Focus | Milestones |
|---|---|---|
| Q3 2026 | Foundations | DeepSolana v1 on Jupiter tx dataset Β· On-chain replay buffer prototype Β· Consensus learning testnet (3β5 nodes) |
| Q4 2026 | Incentive Layer | Token-gated participation Β· Smart-contract reward oracle Β· Byzantine-fault-tolerant aggregation with slashing |
| Q1 2027 | Scale | 50+ node consensus learning network Β· Compressed checkpoint storage (cNFTs) Β· Cross-chain reward signals |
| Q2 2027 | Open Ecosystem | Public ORL API Β· DeepSolana v2 (ORL fine-tuned on 6mo live data) Β· Bittensor cross-network evaluation |
The future is not one where a handful of companies own the intelligence layer. It is one where intelligence is grown in public, rewarded by protocol, and owned by the network.
Ecosystem
| Model / Project | Role |
|---|---|
| DeepSolana | Solana-native base model, ORL fine-tuning reference |
| Bittensor | Incentivized subnet architecture for AI inference |
| FLock.io | Federated fine-tuning with on-chain rewards |
| Ritual | AI coprocessor for infusing AI into smart contracts |
| solanaclawd/brave-new-world | Live Clawd Space β chat, perps tools, ZK reasoning |
| ClawdRouter | 55+ models, 15-dimension scoring, free tier |
Clawd: Decentralized Solana SVM AI & Compute Network
The Problem with Centralised Control over AI Creation
The centralisation problem presents an overbearing barrier to AI innovation. Under the status quo, the world's largest corporations hold sway over the trajectory of AI development based on their own objectives, which do not necessarily align with the public interest.
The danger of AI being controlled by centralised corporations is that their biases and values are amplified on a global scale. They decide who gains access to the models, and their value alignment often downgrades the performance of models.
We consequently see low public participation, less access to computing power, amplified data bias and inaccuracies from less and lower quality training data, and a missed opportunity for AI to realise its maximal potential as a force for good.
There is a pressing need for an equitable distribution of rewards for those who contribute compute, data, verification, and intelligence β powered by Solana's blazing speed and near-zero fees.
System Design
Clawd's system logic is comprised of three major components: Clawd Arena, Clawd Swarm, and Clawd Nexus.
Upon task creation, the model is first trained and validated in the Clawd Arena β a high-speed Solana SVM-powered decentralized compute battlefield β then optionally further refined at massive scale in Clawd Swarm using participants' local hardware and private data (no raw data ever leaves the device). Finally, the optimized model is deployed and monetized in the Clawd Nexus, where real-world usage and feedback loops continuously improve it via on-chain revenue sharing.
When a task is created in Clawd Arena, it is executed by Compute Nodes. These nodes train and submit models (or proofs). Verifiers evaluate submissions using standardized benchmarks and Solana-native consensus mechanisms. The fastest finality on Solana ranks the models instantly. Top models flow into Clawd Swarm for collaborative enhancement with distributed GPUs and private knowledge, producing a superior global model. The result is deployed in the Clawd Nexus as high-performance inference endpoints for apps. All participants stake $CLAWD and earn based on verifiable contribution.
Solana Layer β Economic Engine
Incentivisation: Anchor programs and PDAs enable lightning-fast staking, task settlement, and atomic reward distribution. Sub-second finality and near-zero fees make micro-contributions profitable β anyone with a GPU can participate and earn instantly.
Security: Clawd combines Solana's Tower BFT + economic security with proof-of-compute mechanisms. Participants stake $CLAWD. Dishonest behaviour triggers immediate slashing visible on-chain. Solana's massive parallelism (Sealevel) allows thousands of concurrent AI tasks while keeping verification cheap and fast.
| Attack | Description | Clawd Mitigation |
|---|---|---|
| Sybil Attacks | Creating many fake identities | High $CLAWD staking + Solana account rent + performance-only rewards + VRF task assignment |
| DoS Attacks | Overwhelming the network | Rate limiting + priority fees + Solana's built-in spam resistance |
| Free-rider Attacks | Submitting low-effort work | Top-K reward system + verifiable compute scoring + Solana-timed epochs |
| Lookup Attacks | Gaming validation sets | Dual hidden datasets + Solana-randomised evaluation splits |
| Poisoning Attacks | Submitting corrupted contributions | Majority voting + slashing + verifiable GPU/TEE proofs |
AI & Compute Layer
Clawd Arena β A competitive, Solana-timed training battlefield. Compute Nodes race to deliver the best-performing model for any task. Leaderboards and instant ranking via Solana programs drive rapid iteration and reward the strongest contributors.
Clawd Swarm β The decentralized high-performance compute collective. Thousands of nodes contribute GPU power and private data signals without ever sharing raw data. Solana coordinates aggregation, payments, and slashing in real time β enabling true swarm intelligence at web2 speeds and costs.
Clawd Nexus β The production and monetization hub. Deploy models as unstoppable inference endpoints. Developers integrate via simple APIs, pay with Solana Pay, and revenue is automatically split to trainers, verifiers, data contributors, and compute providers.
Participants
Compute Nodes β Provide GPU/TPU resources, stake $CLAWD, train or run inference jobs, and compete for top rewards.
Verifiers β Stake $CLAWD, run standardized benchmarks, and earn for accurate scoring. Solana's speed makes verification highly profitable.
Delegators / Patrons β Support top nodes or verifiers by delegating $CLAWD. Earn a share of their rewards effortlessly via the Clawd dashboard (Phantom/Solflare compatible).
Quickstart β Arena Dashboard
- Go to arena.clawd.io, connect Phantom or Solflare wallet
- Stake $CLAWD on a task
- Get your
CLAWD_API_KEYfrom the dashboard - Run a training node:
git clone https://github.com/Solizardking/solana-clawd-ai-training
cd solana-clawd-ai-training
export TASK_ID=<task-id>
export CLAWD_API_KEY=your-key
export HF_TOKEN=hf_...
./scripts/launch_hf_jobs.sh a100-large # compete on any base model with LoRA
./dao/register_model.sh --hf-model "YOUR_ORG/your-model" --eval-accuracy 0.80
- Claim rewards instantly or on epoch close via the dashboard
Verifier Guide
Stake $CLAWD β Get API key β Run verification loop with your GPU/CPU. Rewards auto-distributed via Solana.
git clone https://github.com/Solizardking/solana-clawd-ai-training
cd solana-clawd-ai-training
python3 scripts/solana_benchmark.py --model YOUR_ORG/submitted-model # score a submission
Task Lifecycle
Task creation β Solana program registers task + bounty
β Compute Nodes compete β Verifiers score
β Top models advance to Swarm
β Final model listed in Nexus with revenue share enabled
Solana Programs
| Program | Role |
|---|---|
ClawdStakeProgram |
Staking, delegation, PDAs |
ClawdArenaTaskManager |
Task creation, assignment, top-K logic |
ClawdSwarmCoordinator |
Role randomisation, aggregation, slashing |
ClawdRewardDistributor |
Atomic payouts using SPL token extensions |
ClawdNexusRegistry |
Model listing, inference revenue splitting |
3dLst2E3djtCSwG19mFS3REHxtZPngjyga7iYZLDL5xj |
solana_ai_inference Anchor program (devnet) |
All built with Anchor for maximum speed and security.
Model API / Inference (Nexus)
Use api.nexus.clawd.io endpoints with your API key. Revenue flows back to creators and compute providers automatically.
from openai import OpenAI
client = OpenAI(base_url="https://api.nexus.clawd.io/v1", api_key="your-clawd-key")
response = client.chat.completions.create(
model="solanaclawd/solana-clawd-core-ai-1.5b-lora",
messages=[{"role": "user", "content": "How do I detect a rug pull on Solana?"}],
)
print(response.choices[0].message.content)
What this is (Training Pipeline)
A reproducible LoRA fine-tuning pipeline that takes a base instruct model
(Qwen/Qwen2.5-1.5B-Instruct, with NousResearch/Hermes-3-Llama-3.1-8B as a
larger tool-use-capable variant) and turns it into a Clawd:
a constitutionally-grounded, Solana-fluent, degen-wary AI agent that lives
in the trenches without becoming the rug.
The dataset is curated from the solana-clawd repository (AGENTS.md, CONSTITUTION.md, the 137+ skills, the three-laws, and the agent catalog) plus targeted reference material on Solana primitives, DeFi, perpetuals, and the agent's own runtime capabilities (voice agent, MCP skills catalog, Composio provider, ZK primitives, HF Router, ClawdRouter, x402).
Repo layout
ai-training/
βββ README.md β you are here
βββ STRUCTURE.md β full lane/ownership map with safety rules
βββ requirements.txt β Python deps (HF stack + openai + httpx + mcp)
βββ .gitignore β excludes checkpoints / outputs / secrets / proprietary dirs
βββ onchain.md β CANONICAL onchain doc: constitution + SVM compute spec + registry runbook + handoff
βββ Anchor.toml β Solana program workspace config (devnet + mainnet addresses)
βββ Cargo.toml / Cargo.lock β Rust workspace manifest
βββ solana1_yourgpt.jsonl β source: 8,970 Solana Alpaca-format QA pairs
βββ trainingday.jsonl β source: 27,092 Solana API/RPC messages-format pairs
βββ etc/ β brand assets (mascot PNGs, blueprint grid)
βββ .claude/ β Claude Code project settings (gitignored runtime state)
βββ .hf/ β HF CLI cache (gitignored)
βββ configs/
β βββ core_ai_lora_config.yaml β LoRA hyperparams (Qwen2.5-1.5B) β W&B logging
β βββ nvidia_trading_factory_lora_config*.yaml β Trading Factory LoRA configs (A100 + Mac)
β βββ glm52_lora_config*.yaml β GLM-5.2 LoRA configs
β βββ solana_tx_foundation*.yaml β CPT + SFT configs for tx-foundation lane
βββ data/
β βββ core_ai_clawd_sft.jsonl β Core AI SFT corpus (merged + filtered)
β βββ nvidia_trading_factory_sft.jsonl β Trading Factory SFT pairs
β βββ realtime_research_sft.jsonl β PDF/notebook/parquet ingested SFT pairs
β βββ clawd_code_deepsol_sft.jsonl β DeepSol + ZKr SFT examples
β βββ solana_clawd_eval.jsonl β held-out eval prompts (13 conversations)
β βββ tx_foundation_cpt.jsonl β Jupiter tx records in NeMo CPT format
β βββ nvidia_rag_store/ β FAISS index + chunks for NVIDIA RAG endpoint
β βββ processed/ β Arrow + Parquet splits from prepare_dataset.py
β βββ *_manifest.json β dataset manifests (push metadata, split sizes)
βββ docs/ β design docs, session logs, model/dataset cards
β βββ model_card.md β model README (mirrored to Hub)
β βββ dataset_card.md β dataset README (mirrored to Hub)
β βββ SESSIONS.md β training session log
β βββ onchain_constitution.md β verbatim Part I of /onchain.md (loaded as a system prompt at runtime)
β βββ onchain.md, onchainai.md, clawd_solana_svm_ai_compute_design.md β historical copies of /onchain.md Parts II-IV
βββ scripts/
β βββ prepare_dataset.py β JSONL β HF Datasets (parquet), multi-file --input
β βββ realtime_dataset_ingest.py β PDF/JSON/notebook/parquet/text β realtime HF dataset
β βββ build_core_ai_dataset.py β Core AI SFT builder (dedup + quality filter)
β βββ build_nvidia_trading_factory_dataset.py β Trading Factory SFT builder
β βββ build_masterpiece_dataset.py β Masterpiece lane SFT builder
β βββ add_deepsol_zkr_examples.py β DeepSol + ZKr example injector
β βββ prepare_clawd_code_dataset.py β Clawd Code dataset preparer
β βββ solana_ai_model_kit.sh β curlable one-shot audit/train/register bootstrap
β βββ train_lora.py β LoRA SFT via TRL + PEFT
β βββ evaluate.py β held-out inference eval
β βββ wandb_eval.py β W&B Weave benchmark eval
β βββ launch_core_ai_hf_job.sh β launch Core AI A100 HF Job
β βββ launch_trading_factory_hf_job.sh β launch Trading Factory A100 HF Job
β βββ launch_transaction_foundation_hf_job.sh β launch tx-foundation HF Job
β βββ after_core_ai_job.sh β post-training merge + push workflow
β βββ run_local_clawd_stack.py β local Mac stack doctor (no uploads)
β βββ decide_next_training_job.py β auto-selects next job based on readiness
β βββ recover_core_ai_release.sh β recovery launcher for failed HF Jobs
β βββ auto_research.py β Percolator-style recursive wiki generator
β βββ ingest_wiki_data.py β pulls SFT pairs from clawd-autoresearch-wiki
β βββ solana_benchmark.py β 18-MCQ Solana Knowledge Benchmark
β βββ hermes3_inference.py β Hermes-3 inference: HF Router / pipeline / direct
β βββ solana_client.py β 8-command Solana RPC tool
β βββ download_deep_solana.py β DeepSolana-GPT2-bucket downloader
βββ memory/
β βββ honcho.py β Honcho persistent cross-session memory
βββ perps/ β Hermes-3 function calling for Solana perps
β βββ functions.py β 13 perps tools (price, funding, paper trade, riskβ¦)
β βββ functioncall.py β HermesPerpsAgent inference loop (HF Router / local)
β βββ schema.py β Pydantic models: FunctionCall, TradeOrderβ¦
β βββ prompter.py β system prompt builder (standard / GOAP / JSON)
βββ dao/ β Onchain AI registry + DAO governance
β βββ DAO_DESIGN.md β Architecture, safety constraints, governance flows
β βββ register_model.sh β One-shot model registration to onchain.x402.wtf
β βββ register_model.ts β TypeScript: initialize_model Anchor instruction
β βββ attestation/
β βββ create_attestation.ts β SAS compressed attestation for artifacts
β βββ attestations.jsonl β Local index of created attestations
βββ programs/ β Anchor Solana programs (Rust)
β βββ clawd-core/ β Core staking / task program
β βββ clawd-registry/ β Model registry program
β βββ clawd-treasury/ β Treasury / reward distributor
βββ sdk/
β βββ python/ β Python SDK for Clawd programs
β βββ typescript/ β TypeScript SDK
βββ tests/
β βββ program-tests/ β Anchor integration tests
βββ model-kit/ β Solana AI Model Kit (public inference + x402 registry)
β βββ backend/ β FastAPI backend (Docker, Render)
β βββ frontend/ β Static frontend (Vercel)
β βββ docs/ β Deployment, NVIDIA, onboarding guides
βββ nvidia/ β NVIDIA NIM / NeMo integration lane
β βββ blueprints/ β Blueprint implementations (tx-foundation, RAG, signalsβ¦)
β βββ configs/ β NIM / NeMo YAML configs
β βββ scripts/ β NVIDIA setup + verification scripts
β βββ integration/ β NeMo Clawd factory integration
βββ trading_factory/ β Trading Factory lane (Solana perps + NVIDIA)
β βββ solana_factory/ β Core factory Python package
β βββ clawd-autoresearch-wiki/ β AutoResearch agent + wiki data pipeline
βββ space/ β HuggingFace Space (app.py + requirements)
βββ ollama/ β Ollama Modelfiles + build/push scripts
βββ schemas/ β JSON schemas for repo layout validation
βββ studio/ β Studio index page
βββ echo/ β (gitignored) local echo / session cache
βββ outputs/ β (gitignored) release bundles, audit JSONs
βββ wandb/ β (gitignored) W&B run artifacts
βββ target/ β (gitignored) Rust/Anchor build artifacts
See also: skills/solana-rpc/SKILL.md β the
Clawd skill registration for scripts/solana_client.py.
The Hugging Face integration
For the current public release inventory, see Models, Datasets, and Spaces, or open models.musebook.trade. Historical training metrics below apply to their named runs, not every current release.
We use the Hub as the source of truth for every artifact in the
training pipeline. The whole point is that a new Clawd agent, spawned
anywhere in the world, can pip install nothing, set a HF_TOKEN, and
pull the latest model + dataset in two lines.
Repos in the solanaclawd org
| Repo | Type | Purpose |
|---|---|---|
solanaclawd/solana-clawd-instruct |
dataset | 30,450 published examples β SFT instruction pairs (system/user/assistant), 27,405/1,522/1,523 train/eval/test; public viewer checked October 4, 2026 |
solanaclawd/solana-clawd-core-ai-instruct |
dataset | 35,173 examples β public-safe blend of core-ai source chunks, core-ai knowledge JSONL, and the cleaned ai-training SFT corpus |
solanaclawd/solana-clawd-realtime-research-instruct |
dataset | 83,662 examples β original research plus NeMo and linked local sources; 78,171/2,595/2,896 train/eval/test, with auxiliary RAG, preferences, transaction text, and live-tape records |
solanaclawd/solana-clawd-nvidia-trading-factory-instruct |
dataset | 199 examples published β NVIDIA trading-factory stage plans, Solana spot/perps market scenarios, cuFOLIO/cuOpt Mean-CVaR specs, Vulcan/Phoenix paper strategy specs, Rise read plans, autoresearch perps references, perps tool-use, and risk refusals; 179/9/11 train/eval/test |
solanaclawd/solana-tx-foundation-cpt |
dataset | 19,542 examples β Solana tx records in NeMo CPT format, tokenized by SolanaTokenizerPipeline (vocab_size=4886); used for Blueprint 1 continued pre-training |
solanaclawd/solana-clawd-eval |
dataset | Held-out eval prompts (red-team + capability, 13 conversations) |
solanaclawd/solana-clawd-core-ai-1.5b-lora |
model | Qwen2.5-1.5B LoRA adapter β LIVE (pushed 2026-06-19T23:44Z); recovery job ordlibrary/6a35a6833093dba73ce2a86b completed on A100-large in 3h 14m; train_loss=0.9008, token_accuracy=82.9%, 24.54M tokens |
solanaclawd/solana-tx-foundation-1.5b |
training target | Transaction-foundation pipeline target; no public model repository verified in the October 4, 2026 inventory |
solanaclawd/solana-nvidia-trading-factory-8b-lora |
model | Hermes-3-8B LoRA adapter for the Solana NVIDIA trading factory dataset; completed HF job ordlibrary/6a35a2ce953ed90bfb945009 |
solanaclawd/solana-clawd-1.5b |
model page | Public merged-model target; no published weights verified in the October 4, 2026 inventory |
External NVIDIA models used by this pipeline (via NIM API or HF Inference API β not published under solanaclawd):
| Model | Access | Role |
|---|---|---|
nvidia/nemotron-3-nano-30b-a3b |
NIM API (NVIDIA_API_KEY) |
Primary reasoning β signal verdicts, portfolio narration, distillation |
nvidia/nemotron-3-super-120b-a12b |
NIM API (NVIDIA_API_KEY) |
Teacher model β SFT labeling and CoT distillation (Blueprint 3) |
nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 |
HF Inference API (HF_TOKEN) |
Local pipeline fallback when no NVIDIA_API_KEY; set NVIDIA_USE_PIPELINE=1 for local weights |
nvidia/nv-embedqa-e5-v5 |
NIM API | RAG embedding (Blueprint 5 β enterprise-rag) |
nvidia/nv-rerankqa-mistral-4b-v3 |
NIM API | RAG reranker (Blueprint 5) |
Dataset viewer
Local CLI setup
# Install the CLI (macOS / Linux)
curl -LsSf https://hf.co/cli/install.sh | bash -s
# Or via pip (anywhere)
pip install --upgrade huggingface_hub
# Authenticate
hf auth login # paste a token from huggingface.co/settings/tokens
hf auth whoami # verify
# Install the CLI skill so any agent (Cline, Claude Code, Cursor, etc.) knows the commands
hf skills add --global
# (or for Claude Code: hf skills add --claude --global)
One-time setup for the training pipeline
# Install Python deps
python3 -m pip install -r requirements.txt
# Verify the dataset + model repos exist
hf repos list --namespace solanaclawd
The end-to-end pipeline
1. Curate the dataset
The historical local merged input was data/solana_clawd_merged.jsonl β 36,109 conversations
assembled from three sources. This local build count differs from the current
public Clawd Instruct release,
which exposes 30,450 conversations. The historical rows were all normalized to {"messages": [...]} format with the
Clawd system prompt prepended where missing:
| Source file | Format | Examples | Notes |
|---|---|---|---|
data/solana_clawd_seed.jsonl |
messages (Clawd system prompt) | 47 | Original constitutional seed |
solana1_yourgpt.jsonl |
Alpaca (instruction/input/output) |
8,970 | Solana QA pairs β normalized by merge script |
trainingday.jsonl |
messages + metadata |
27,092 | Solana API/RPC docs β metadata stripped, system prompt injected |
The Alpaca normalizer handles both layout variants in solana1_yourgpt.jsonl:
instructionnon-empty β user = instruction (+\n\nContext:\n+ input if present)instructionempty β user =inputfield (question was in the wrong column)
To add more sources, append a new JSONL to the merge command and re-run prepare_dataset.py:
# Re-merge after adding a new source file
python3 - << 'EOF'
import json
SYSTEM = "You are Clawd, a sovereign Solana-native AI agent. ..."
with open("data/solana_clawd_merged.jsonl", "a") as out:
with open("data/my_new_source.jsonl") as f:
for line in f:
obj = json.loads(line.strip())
# normalize and write
EOF
2. Prepare the dataset (parquet + Hub)
# From the merged file (canonical)
python3 scripts/prepare_dataset.py \
--input data/solana_clawd_merged.jsonl \
--output data/processed \
--train-ratio 0.9 --eval-ratio 0.05 \
--seed 42 \
--push --repo-id solanaclawd/solana-clawd-instruct
This validates each example, splits 90/5/5, writes parquet for streaming
access, and (with --push) uploads to the Hub dataset.
2b. Submit PDFs/JSON/notebooks/parquet as realtime datasets
scripts/realtime_dataset_ingest.py converts submitted files into the same
messages schema used by the SFT trainer. It supports .pdf, .json, .jsonl,
.ipynb, .parquet, .md, .txt, .yaml, and .yml, filters
high-confidence secret patterns, dedupes duplicate files by SHA256, and writes:
data/realtime_research_sft.jsonldata/realtime_research_processed/{train,eval,test}.parquetdata/realtime_research_dataset_manifest.jsondata/realtime_research_dataset_card.md
The current config ingests the submitted research PDFs, the Solana notebook and
parquet dataset, and the local zk skill:
python3 scripts/realtime_dataset_ingest.py \
--config configs/realtime_dataset_config.yaml
# Submit arbitrary files and push the refreshed public dataset:
./scripts/submit_dataset_file.sh /path/to/paper.pdf /path/to/records.json -- --push
# Drop-folder mode:
python3 scripts/realtime_dataset_ingest.py \
--config configs/realtime_dataset_config.yaml \
--watch-dir data/incoming \
--watch \
--push
Published dataset:
solanaclawd/solana-clawd-realtime-research-instruct.
For native Cloudflare/Clef decision-head and LoRA fine-tuning on this dataset, see the Clef research training guide, including local Apple MPS 4-bit training, Hugging Face H200 Jobs, a validation pilot, split audits, held-out metrics, and adapter/head reload verification.
Read a public preview without installing the training stack or configuring auth:
python3 scripts/connect_realtime_dataset.py
python3 scripts/connect_realtime_dataset.py --split eval --limit 5 \
--output local/realtime-research-eval-preview.jsonl
The preview uses the Hugging Face dataset viewer API and accepts up to 100 rows
per call. For full training access, install datasets in your training environment,
provide HF_TOKEN through your shell or secret manager, and load the dataset:
import os
from datasets import load_dataset
dataset = load_dataset(
"solanaclawd/solana-clawd-realtime-research-instruct",
split="train",
streaming=True,
token=os.environ["HF_TOKEN"],
)
example = next(iter(dataset))
print(example["messages"])
NVIDIA Nemotron / NeMo Retriever extraction is supported for the PDF stage,
following the NVIDIA Nemotron RAG document-processing pattern: extract text,
tables as markdown, and chart elements through nv-ingest, then normalize the
structured output into chat-style SFT rows.
# Keep this in your shell or secret manager only. Do not write it into YAML,
# markdown, manifests, commits, or Hub uploads.
export NVIDIA_API_KEY=<from-build.nvidia.com>
# Install the optional NVIDIA stack only in the GPU/NIM extraction environment.
python3 -m pip install nv-ingest==26.1.1 nv-ingest-api==26.1.1 nv-ingest-client==26.1.1
python3 scripts/realtime_dataset_ingest.py \
--config configs/realtime_dataset_config.yaml \
--pdf-extractor nvidia
In pdf_extractor: auto mode, the builder tries NVIDIA first when
NVIDIA_API_KEY is present, then Google Document AI/Gemini, then local
pypdf. NVIDIA extraction caches provider responses under data/nvidia_cache/
and records only provider/method metadata, not API keys.
Google-backed PDF extraction is built in:
# Gemini API-key path. Uses GEMINI_API_KEY first, then GOOGLE_API_KEY.
export GEMINI_API_KEY=...
python3 scripts/realtime_dataset_ingest.py \
--config configs/realtime_dataset_config.yaml \
--pdf-extractor gemini
# Document AI processor path. Uses the configured :process endpoint and labels.
# Requires OAuth/ADC, for example `gcloud auth application-default login`,
# GOOGLE_APPLICATION_CREDENTIALS, or GOOGLE_DOCUMENTAI_ACCESS_TOKEN.
python3 scripts/realtime_dataset_ingest.py \
--config configs/realtime_dataset_config.yaml \
--pdf-extractor documentai \
--documentai-label client=clawd
When NVIDIA is not configured, the Google-backed PDF path is still available.
Document AI requests use the processor endpoint in configs/realtime_dataset_config.yaml:
https://us-documentai.googleapis.com/v1/projects/1013652097839/locations/us/processors/29a612e70aee73e1:process.
Use Application Default Credentials from gcloud auth application-default login
or a service-account path in your shell environment. Do not add Google OAuth
client-secret files, ADC JSON, access tokens, or API keys to config files,
dataset cards, manifests, commits, or Hub uploads.
The config also sends x-goog-user-project: x402-477302 for quota attribution;
Document AI still requires billing to be enabled on the processor project
(1013652097839). If that project returns BILLING_DISABLED, enable billing
there or point documentai_endpoint at a processor owned by a billing-enabled
project.
2c. Build the NVIDIA Solana trading-factory dataset
scripts/build_nvidia_trading_factory_dataset.py creates a separate SFT lane
for an NVIDIA-style algorithmic trading factory specialized to Solana spot and
perpetual futures. It uses:
- NVIDIA trading-factory architecture patterns: market ingestion, research, optimization, inference, execution policy, and monitoring.
- NVIDIA Quantitative Portfolio Optimization patterns: cuML KDE scenario generation, RAPIDS/cuDF returns and backtesting, cuFOLIO/cuOpt Mean-CVaR optimization, CVaR/leverage/budget/turnover/cardinality constraints, and CVXPY/cuOpt solver handoff.
- Local Clawd perps tools: SOL/token prices, Phoenix markets/funding/orderbook, Jupiter quotes, paper trades, wallet checks, trader history, and position-risk scoring.
- Clawd trust gates: observer, dry-run/paper, delegated confirmation, and strictly gated live execution.
python3 scripts/build_nvidia_trading_factory_dataset.py
python3 scripts/prepare_dataset.py \
--input data/nvidia_trading_factory_sft.jsonl \
--output data/nvidia_trading_factory_processed \
--train-ratio 0.9 --eval-ratio 0.05 \
--seed 42
python3 scripts/train_lora.py \
--config configs/nvidia_trading_factory_lora_config.yaml \
--dry-run
python3 scripts/verify_trading_factory_release.py --local-only --strict
Current artifacts, verified with scripts/verify_trading_factory_release.py --strict:
data/nvidia_trading_factory_sft.jsonlβ 142 examplesdata/nvidia_trading_factory_processed/{train,eval,test}.parquetβ 127/7/8data/nvidia_trading_factory_manifest.jsondata/nvidia_trading_factory_dataset_card.mdconfigs/nvidia_trading_factory_lora_config.yamlβ Hermes-3-8B LoRA configtrading_factory/cufolio/β local cuFOLIO snapshot for CVaR/scenario/rebalance referencestrading_factory/clawd-autoresearch-wiki/perps/β local perps research referencesdata/strategies/β generated Vulcan paper TA configs, Rise read plan, cuFOLIO Mean-CVaR handoff, command manifest, andnvidia_clawd_agent_plan.jsonnvidia/β local NVIDIA blueprint adapters for transaction foundation modeling, portfolio optimization, model distillation, signal discovery, enterprise RAG, and AIQ- Hub dataset β
solanaclawd/solana-clawd-nvidia-trading-factory-instruct
Regenerate and verify the NVIDIA/NemoClawd factory plan:
python3 scripts/build_solana_trading_factory_strategies.py
python3 nvidia/integration/nemo_clawd_agent.py --mode paper
python3 perps/nvidia_perps.py --market SOL --mode observer
python3 nvidia/blueprints/aiq/agent.py --strict
python3 nvidia/scripts/verify_nvidia.py --strict
NVIDIA integration folders:
| Folder | What it does |
|---|---|
nvidia/blueprints/transaction-foundation-model/ |
Converts Solana tx JSONL to NeMo CPT format and defines the NIM/NeMo fine-tune launch contract. |
nvidia/blueprints/portfolio-optimization/ |
cuML KDE scenario generation plus Mean-CVaR optimizer with cuFOLIO preferred and CVXPY fallback. |
nvidia/blueprints/model-distillation/ |
Response and CoT distillation from a Hermes/Nemotron teacher into the 1.5B Clawd student lane. |
nvidia/blueprints/signal-discovery/ |
Phoenix perps signal agent: RSI, MACD, funding rate, orderbook imbalance, and EMA divergence via RPC_URL and Vulcan CLI; paper executes on accepted signals. |
nvidia/blueprints/enterprise-rag/ |
NeMo Retriever RAG contract: nv-ingest PDFs/docs to local FAISS, rerank, then NIM/Clawd generation. |
nvidia/blueprints/aiq/ |
Local AIQ evaluator that scores safety, artifact completeness, and 9-role coverage. |
nvidia/cufolio/ |
GPU portfolio optimizer with Clawd CVaR, leverage, and turnover constraints; emits Vulcan paper commands. |
nvidia/integration/ |
NIM bridge routes NVIDIA to ClawdRouter to Ollama, signal-to-trading-factory bridge, and NVIDIA SFT dataset builder. |
perps/ |
Model-facing perps tools, schemas, function-calling harness, and data/perps/nvidia_perps_handoff.json generator. |
Perps signal agent quick start:
export RPC_URL=https://api.mainnet-beta.solana.com
export NVIDIA_API_KEY=<set-in-shell-only>
python3 nvidia/blueprints/signal-discovery/perps_signal_agent.py \
--market SOL \
--mode paper \
--loop
Publish or refresh the dataset after HF_TOKEN is available in your shell or
an existing hf auth login session is active:
./scripts/publish_trading_factory_dataset.sh
After publishing, verify the Hub release:
python3 scripts/verify_trading_factory_release.py --strict
For a single guarded audit/publish entry point that can read simple local
KEY=VALUE env files without printing secret values:
# Audit local state, Core AI Hub state, and trading-factory local readiness.
python3 scripts/run_release_pipeline.py
# After placing HF_TOKEN in your shell or a local env file:
python3 scripts/run_release_pipeline.py --publish-trading-dataset
# Launch training. W&B is used only when WANDB_API_KEY exists in the process env.
python3 scripts/run_release_pipeline.py --launch-trading-training
If you want a clean local upload directory first:
python3 scripts/build_hf_release_bundle.py
cat outputs/hf_release_bundle/UPLOAD.md
# Optional full local archive for all three dataset repos:
python3 scripts/build_hf_release_bundle.py --include-published --output outputs/hf_release_bundle_all
Launch the trading-factory LoRA as a new HF job only when you are ready. This helper does not cancel or modify any currently running job:
./scripts/launch_trading_factory_hf_job.sh a100-large 4h
Current trading-factory training job state:
- Superseded failed job:
ordlibrary/6a359f0e953ed90bfb944faf - Fixed failure: remote trainer attempted to load
/data/nvidia_trading_factory_processedfrom the mounted job bucket.scripts/train_lora.pynow falls back todataset_repowhen the configured local path is absent. - Superseded failed replacement:
ordlibrary/6a35a02d953ed90bfb944fe3 - Fixed failure: Hermes exposes
tokenizer.chat_templateas a dict and TRL expects a string when assistant-only loss is enabled.scripts/train_lora.pynow normalizes dict templates and disables assistant-only loss when generation markers are unavailable. - Successful retry:
ordlibrary/6a35a2ce953ed90bfb945009 - Final evidence: the retry loaded the published Hub dataset, tokenized train
and eval splits, built
SFTTrainer, completed 48/48 training steps, pushedadapter_config.jsonandadapter_model.safetensors, and verified both files on Hub. - Final metrics: train loss
1.1692, eval loss0.8064, eval mean token accuracy0.8547.
Keep HF_TOKEN, WANDB_API_KEY, NVIDIA_API_KEY, wallet keys, ADC JSON, and
client-secret files in your shell or secret manager only. Do not add them to
YAML, markdown, manifests, commits, or Hub uploads.
Current dataset lanes:
- Core AI: 35,173 examples in
solanaclawd/solana-clawd-core-ai-instruct - Realtime research: 83,662 examples in
solanaclawd/solana-clawd-realtime-research-instruct - Trading factory: 199 published examples in
solanaclawd/solana-clawd-nvidia-trading-factory-instruct(public viewer checked October 4, 2026)
3. Train (local or remote)
Local (Mac MPS, sanity check):
python3 scripts/train_lora.py --num-epochs 1 --no-quant
Remote (HF Jobs, A100 or H200):
./scripts/launch_hf_jobs.sh a100-large # 80GB A100, ~$3/hr
./scripts/launch_hf_jobs.sh h200 # 80GB H200, ~$4/hr
./scripts/launch_hf_jobs.sh l4x1 # 24GB L4, ~$0.80/hr
The script passes WANDB_API_KEY and WANDB_PROJECT=clawd into the job container
so training metrics stream to the clawdsolana-clawd/clawd
W&B project automatically. Monitor with:
hf jobs ps
hf jobs logs <JOB_ID> --follow
hf jobs inspect <JOB_ID>
Core AI release verification/recovery:
# Verifies both datasets and the Core AI LoRA adapter files on Hugging Face.
python3 scripts/verify_core_ai_release.py --strict
# If the adapter is still missing, relaunches the Core AI job.
# Requires HF auth; W&B is attached only when WANDB_API_KEY exists in the environment.
./scripts/recover_core_ai_release.sh a100-large 4h
scripts/train_lora.py writes the adapter model card into the output directory,
checks that adapter_config.json and adapter_model.safetensors exist locally,
pushes the adapter folder to the Hub, and verifies those files are present on the
remote model repo before the job can report success.
Core AI recovery run β COMPLETED:
- Job:
ordlibrary/6a35a6833093dba73ce2a86b - Hardware:
a100-large - Started:
2026-06-19T20:29Zβ Finished:2026-06-19T23:44Z(3h 14m) - Dataset:
solanaclawd/solana-clawd-core-ai-instruct(31,655 train rows) - Output:
solanaclawd/solana-clawd-core-ai-1.5b-loraβ adapter files live on Hub - train_loss: 0.9008 | mean_token_accuracy: 82.9% | tokens: 24.54M
- Solana MCQ benchmark: 17/18 = 94.4% (1-epoch, local MPS eval)
- Perfect: agent, constitution, defi, security, zk
- Miss: Q3 compute unit budget (got 1.4M β correct is 200K)
- 3-epoch retrain: running as
ordlibrary/6a35dd23953ed90bfb945356(H200, 6h timeout)
Training run history
| Run | Job ID | Status | Base model | Output |
|---|---|---|---|---|
| Qwen2.5-1.5B (canceled) | 6a341687ef9220ea67d99583 |
CANCELED (credits) | Qwen2.5-1.5B-Instruct | β |
| DeepSolanaZKr-1 GLM-5.2 (v1) | 6a345ab22eb64285ee573432 |
ERROR (ephemeral disk) | zai-org/GLM-5.2 | β |
| DeepSolanaZKr-1 GLM-5.2 (v2) | 6a345dd12eb64285ee5734b4 |
ERROR (model is 1TB+) | zai-org/GLM-5.2 | β |
| DeepSolanaZKr-1 Qwen2.5-7B | 6a3460cb2eb64285ee5734d9 |
RUNNING | Qwen/Qwen2.5-7B-Instruct | ordlibrary/DeepSolanaZKr-1 |
GLM-5.2 turned out to be a 1TB multimodal model (282 shards) β not the 5.2B text model we expected. Switched to Qwen2.5-7B-Instruct: 14.5GB bf16, fits cleanly on A100 80GB, stronger on code/Solana reasoning.
Current training run (2026-06-18) β DeepSolanaZKr-1 Qwen2.5-7B
| Field | Value |
|---|---|
| Job ID | 6a3460cb2eb64285ee5734d9 |
| URL | huggingface.co/jobs/ordlibrary/6a3460cb2eb64285ee5734d9 |
| Hardware | a100-large β NVIDIA A100 80GB |
| Base model | Qwen/Qwen2.5-7B-Instruct |
| Config | configs/glm52_lora_config.yaml β LoRA r=32, Ξ±=64, 3 epochs |
| Dataset | solanaclawd/solana-clawd-instruct β 27,328 train examples (cleaned) |
| Dataset changes | Removed 78 off-topic + 575 short answers; capped QN/Helius/Alchemy at 500 each; added 20 DeepSolanaZKr-1 ZK examples |
| Est. steps | ~5,137 (27,328 Γ· batch 16 Γ 3 epochs) |
| Est. duration | ~2β3 hrs on A100 (GLM-5.2 is 5.2B vs 1.5B) |
| Output | ordlibrary/DeepSolanaZKr-1 (pushed on completion) |
| W&B | clawdsolana-clawd/clawd β live training metrics |
# Watch live logs
hf jobs logs 6a3460cb2eb64285ee5734d9 --follow
# Watch W&B metrics live
# https://wandb.ai/clawdsolana-clawd/clawd
4. Evaluate
4a. Held-out inference eval (local)
python3 scripts/evaluate.py --num 50
# Outputs JSON + Markdown reports in outputs/eval/
The report includes throughput, refusal rate on the red-team slice, average generation length, and 20 sample generations for human review.
4b. W&B Weave benchmark eval
Runs the JSON QA benchmark against any model served via the W&B Inference API, with structured traces in Weave.
export WANDB_API_KEY=<your-key-from-wandb.ai/authorize>
# Baseline (pre-fine-tune)
python3 scripts/wandb_eval.py
# Post-training eval against DeepSolanaZKr-1 (run after HF job 6a3460cb completes)
python3 scripts/wandb_eval.py --model ordlibrary/DeepSolanaZKr-1
# Traces appear live at: https://wandb.ai/clawdsolana-clawd/clawd/weave
# Run name auto-generated: eval-DeepSolanaZKr-1-hfjob-6a3460cb
Eval run history:
| Run | Model | Job | Accuracy | Format | Weave |
|---|---|---|---|---|---|
| Baseline | OpenPipe/Qwen3-14B-Instruct |
β | 60% (12/20) | 100% | 019edb80 |
| Post-SFT | ordlibrary/DeepSolanaZKr-1 |
6a3460cb | pending | pending | pending |
Run the post-SFT eval once HF job 6a3460cb2eb64285ee5734d9 completes to measure the fine-tune delta.
5. Deploy into Clawd agents
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
from peft import PeftModel
# Option A β merged adapter (HF Jobs output, zero extra deps)
pipe = pipeline("text-generation", model="ordlibrary/DeepSolanaZKr-1")
messages = [{"role": "user", "content": "What is a Solana compressed account?"}]
print(pipe(messages)[0]["generated_text"][-1]["content"])
# Option B β base + LoRA adapter (if adapter-only was pushed)
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-7B-Instruct",
torch_dtype="auto",
device_map="auto",
)
model = PeftModel.from_pretrained(base, "ordlibrary/DeepSolanaZKr-1")
tokenizer = AutoTokenizer.from_pretrained("ordlibrary/DeepSolanaZKr-1")
Or with mlx-lm on a Mac (fastest local path):
pip install mlx-lm
mlx_lm.generate \
--model Qwen/Qwen2.5-1.5B-Instruct \
--adapter solanaclawd/solana-clawd-core-ai-1.5b-lora \
--prompt "How do I detect a rug pull on a fresh Solana token?"
6. Fireworks managed SFT
Fireworks does not accept Hugging Face dataset URLs directly for managed SFT.
Use the Hub dataset as the source of truth, then upload the JSONL export to a
Fireworks dataset or provide a supported cloud-storage URI (gs://, s3://,
or Azure Blob).
Current Fireworks run:
| Field | Value |
|---|---|
| Account | accounts/beetsbyj-d25663 |
| Job | accounts/beetsbyj-d25663/supervisedFineTuningJobs/b1rgqmi9 |
| Final state | JOB_STATE_COMPLETED |
| Base model | accounts/fireworks/models/qwen2p5-7b-instruct |
| Output model | accounts/beetsbyj-d25663/models/clawd-glm-5-2 |
| Live-merge deployment | accounts/beetsbyj-d25663/deployments/clawd-glm-5-2-live (FAILED, Fireworks internal error) |
| Multi-LoRA deployment | accounts/beetsbyj-d25663/deployments/qwen2p5-7b-clawd-addons (FAILED, Fireworks internal error) |
| Deployment shape | NVIDIA_A100_80GB x2, FP16, min replicas 0, max replicas 1 |
| Train dataset | accounts/beetsbyj-d25663/datasets/solana-clawd-20260617 |
| Eval dataset | accounts/beetsbyj-d25663/datasets/solana-clawd-eval-20260617 |
| Source dataset | solanaclawd/solana-clawd-instruct |
export FIREWORKS_API_KEY=fw_...
python3 scripts/deploy_fireworks.py \
--account-id beetsbyj-d25663 \
--dataset-id solana-clawd-20260617 \
--eval-dataset-id solana-clawd-eval-20260617 \
--base-model qwen2p5-7b-instruct \
--output-model clawd-glm-5-2 \
--display-name "Clawd GLM 5.2 Solana SFT" \
--reuse-datasets
python3 scripts/monitor_fireworks_job.py \
--account-id beetsbyj-d25663 \
--job-id b1rgqmi9 \
--once
python3 scripts/monitor_fireworks_deployment.py \
--account-id beetsbyj-d25663 \
--deployment-id qwen2p5-7b-clawd-addons \
--once
curl https://api.fireworks.ai/inference/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $FIREWORKS_API_KEY" \
-d '{
"model": "accounts/beetsbyj-d25663/models/clawd-glm-5-2#accounts/beetsbyj-d25663/deployments/qwen2p5-7b-clawd-addons",
"messages": [{"role": "user", "content": "What is a PDA on Solana?"}]
}'
Both Fireworks deployment methods currently fail after creation with an
internal Fireworks error. The model artifact itself is READY; serving requires
Fireworks support to resolve the on-demand deployment failure or a different
validated deployment shape for qwen2p5-7b-instruct.
Hermes-3-Llama-3.1-8B path (tool use / function calling)
For agents that need to call real tools (Solana perps, on-chain data,
Jupiter quotes) rather than just converse, use the NousResearch/Hermes-3-Llama-3.1-8B
base with configs/hermes3_lora_config.yaml and the perps/ function-calling
suite instead of (or alongside) the 1.5B chat-only model:
# Train (8B needs a 24GB+ GPU with 4-bit, or 80GB A100/H200 in bf16)
python3 scripts/train_lora.py --config configs/hermes3_lora_config.yaml
./scripts/launch_hf_jobs.sh a100-large --config configs/hermes3_lora_config.yaml
# Inference β 3 modes in one script
python3 scripts/hermes3_inference.py --mode router "What is a PDA?" # HF Router, no GPU
python3 scripts/hermes3_inference.py --mode pipeline "What is a PDA?" # local transformers
python3 scripts/hermes3_inference.py --mode direct --adapter solanaclawd/solana-clawd-8b-lora "What is a PDA?"
# Function calling β 13 Solana perps tools (Phoenix DEX, Jupiter, risk assessment)
cd perps
python3 functioncall.py --query "What's the SOL-PERP funding rate? Should I go long?"
python3 functioncall.py --query "Paper trade: long SOL-PERP $500 at 3x leverage" --verbose
HERMES_LOCAL=1 python3 functioncall.py --goap --query "Assess risk of shorting SOL-PERP $1000 at 5x"
The 13 perps tools (perps/functions.py) and the matching HermesAdapter
(hermes-agent/clawd-operator/adapters/hermes.py) and Phoenix/Oracle
Tool wrappers (hermes-agent/clawd-agent/tools/) all share the same
function definitions, so a LoRA trained here drops directly into the
running agents.
Continued pre-training: DeepSolana-GPT2-bucket
To inject raw Solana-domain text (ordinals, program source, on-chain docs)
before the instruction-tuning pass, decode the
ordlibrary/DeepSolana-GPT2-bucket
dataset and run a CPT stage with configs/deep_solana_cpt_config.yaml:
python3 scripts/download_deep_solana.py --output data/deep_solana_corpus.jsonl --limit 5000
python3 scripts/train_lora.py --config configs/deep_solana_cpt_config.yaml
# then SFT on top of the CPT checkpoint:
python3 scripts/train_lora.py --config configs/lora_config.yaml --base-model ./outputs/solana-clawd-1.5b-cpt
The downloader also supports --sft-mode to wrap decoded chunks directly as
ChatML pairs appended to data/solana_clawd_seed.jsonl, skipping the
separate CPT stage entirely.
Why Qwen2.5-1.5B?
We picked Qwen/Qwen2.5-1.5B-Instruct as the base because:
- Size: 1.5B fits in 4GB VRAM with 4-bit quantization, runs comfortably on a Mac M2 with MPS, and trains on a single 24GB GPU.
- Quality: Qwen2.5 is a top-tier instruct model at this size, with strong code, reasoning, and tool-use ability.
- Tokenizer: The Qwen tokenizer is multilingual and handles code / addresses / base58 well.
- License: Apache-2.0, friendly for derivatives.
Larger variants (3B, 7B) can be trained with the same pipeline by overriding
--base-model Qwen/Qwen2.5-7B-Instruct and using a bigger GPU.
Adding new training data
The merged dataset (data/solana_clawd_merged.jsonl) is the canonical training
input. To add more data, contribute to any of the three source layers and re-merge:
- New skill β write 5β10 Q&A pairs in
{"messages": [...]}format, append todata/solana_clawd_seed.jsonl - New bulk source β normalize your JSONL into messages format (see merge script), drop it at the repo root
- Constitutional edge case β add a refusal example where the assistant explains why it won't help
Then re-run the merge + push:
# Re-normalize if needed, then:
python3 scripts/prepare_dataset.py \
--input data/solana_clawd_merged.jsonl \
--push --repo-id solanaclawd/solana-clawd-instruct
./scripts/launch_hf_jobs.sh a100-large
Trust gates and the Constitution
This model is a tool. It is not a sovereign execution layer.
In the Clawd stack, the model is the brain: it produces analyses and trade plans. The hands (a separate agent with a real keypair) executes them under hard limits. The model never sees the signing key.
This split is encoded in the dataset β no example asks the model to sign a transaction directly. The model's outputs are always inputs to a human or a trust-gated agent that asks: "do you really want to do this?"
The Clawd Constitution's three on-chain laws are the final guard. This fine-tune is helpful training, not a replacement for the laws.
Cost reference (HF Jobs, mid-2026)
| Flavor | VRAM | $/hr | Use |
|---|---|---|---|
l4x1 |
24GB | ~$0.80 | Quick checks, 1.5B-3B models |
a10g-large |
24GB | ~$1.00 | Slightly faster, same VRAM class |
a100-large |
80GB | ~$3.00 | Standard full training, 1.5B-7B |
h200 |
80GB | ~$4.00 | Fastest single-GPU, also fine for 7B |
a100x4 |
320GB | ~$12.00 | 13B-30B with DDP |
h200x8 |
640GB | ~$32.00 | 70B+ with DDP |
For the historical 36K-example dataset (32,498 train), a 1.5B LoRA run at 3 epochs
takes 1β2 hrs on A100 ($3β6 per full training run). A 7B run takes 4β6 hrs ($12β18).
Self-hosted GPU deployment
Once your LoRA adapter is trained and pushed to solanaclawd/solana-clawd-core-ai-1.5b-lora,
you can serve it from your own GPU (on-prem, rented, or cloud VM) using any of the
paths below. All paths start with a one-time weight merge to produce a standalone model.
Step 0 β merge the LoRA adapter into the base (do this once)
# merge_and_save.py
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "Qwen/Qwen2.5-1.5B-Instruct"
ADAPTER = "solanaclawd/solana-clawd-core-ai-1.5b-lora"
MERGED = "./outputs/solana-clawd-1.5b-merged"
model = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype="auto", device_map="cpu")
model = PeftModel.from_pretrained(model, ADAPTER)
model = model.merge_and_unload()
model.save_pretrained(MERGED)
AutoTokenizer.from_pretrained(BASE).save_pretrained(MERGED)
print(f"Merged model saved to {MERGED}")
# Optionally push the merged model to the Hub
# model.push_to_hub("solanaclawd/solana-clawd-1.5b")
# tokenizer.push_to_hub("solanaclawd/solana-clawd-1.5b")
python3 merge_and_save.py
# or push merged weights directly:
hf upload solanaclawd/solana-clawd-1.5b outputs/solana-clawd-1.5b-merged --repo-type model
Option A β vLLM (recommended for production, OpenAI-compatible API)
vLLM is the fastest open-source inference server. Works on any NVIDIA GPU with 8GB+ VRAM.
pip install vllm
# Serve the merged model (OpenAI-compatible endpoint on port 8000)
vllm serve ./outputs/solana-clawd-1.5b-merged \
--served-model-name solana-clawd-1.5b \
--host 0.0.0.0 \
--port 8000 \
--dtype bfloat16 \
--max-model-len 4096
# Or serve the LoRA adapter directly on top of the base (no merge needed)
vllm serve Qwen/Qwen2.5-1.5B-Instruct \
--enable-lora \
--lora-modules clawd=solanaclawd/solana-clawd-core-ai-1.5b-lora \
--served-model-name solana-clawd-1.5b \
--host 0.0.0.0 --port 8000
Test it:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "solana-clawd-1.5b",
"messages": [{"role": "user", "content": "What is a PDA on Solana?"}],
"max_tokens": 256
}'
Compatible with the OpenAI Python SDK β swap base_url to your server IP.
Option B β HuggingFace TGI (Text Generation Inference)
HF's own serving stack. Supports continuous batching, speculative decoding, GPTQ, AWQ.
# Docker (simplest path on a Linux GPU box)
docker run --gpus all --shm-size 1g \
-p 8080:80 \
-v $(pwd)/outputs/solana-clawd-1.5b-merged:/model \
ghcr.io/huggingface/text-generation-inference:latest \
--model-id /model \
--max-input-length 2048 \
--max-total-tokens 4096
# Test
curl http://localhost:8080/v1/chat/completions \
-d '{"model":"tgi","messages":[{"role":"user","content":"What is a PDA?"}]}'
Option C β Ollama (Mac / Linux, easiest local setup)
# 1. Install
brew install ollama # macOS
# curl -fsSL https://ollama.com/install.sh | sh # Linux
# 2. Create a Modelfile pointing at the merged weights
cat > Modelfile <<'EOF'
FROM ./outputs/solana-clawd-1.5b-merged
SYSTEM "You are Clawd, a sovereign Solana-native AI agent."
PARAMETER temperature 0.2
PARAMETER top_p 0.9
EOF
ollama create solana-clawd-1.5b -f Modelfile
ollama run solana-clawd-1.5b "What is a PDA on Solana?"
# Also starts an OpenAI-compatible REST server on port 11434
ollama serve
Option D β Modal (serverless GPU, pay-per-second)
Modal lets you deploy a GPU function with no server management. Cold-start is ~20s; billed only when a request is in-flight.
# deploy_modal.py
import modal
app = modal.App("solana-clawd-1.5b")
image = modal.Image.debian_slim(python_version="3.11").pip_install("vllm", "huggingface_hub")
@app.function(gpu="A10G", image=image, secrets=[modal.Secret.from_name("HF_TOKEN")])
@modal.web_endpoint(method="POST")
def infer(request: dict):
import os
from vllm import LLM, SamplingParams
llm = LLM("solanaclawd/solana-clawd-1.5b", dtype="bfloat16")
params = SamplingParams(temperature=0.2, max_tokens=512)
messages = request.get("messages", [])
prompt = "\n".join(f"{m['role']}: {m['content']}" for m in messages)
return {"text": llm.generate([prompt], params)[0].outputs[0].text}
modal deploy deploy_modal.py
# Returns a public HTTPS endpoint β plug it into any OpenAI client
Option E β RunPod / Vast.ai (rented GPU, full control)
Use these when you want a persistent GPU box cheaper than AWS/GCP.
| Provider | Best for | Typical price |
|---|---|---|
| RunPod | Persistent pods, Jupyter, SSH | $0.20β$0.60/hr (RTX 3090/4090) |
| Vast.ai | Cheapest spot market, SSH | $0.10β$0.40/hr (RTX 3090/4090) |
| Lambda Labs | Reserved A100s, reliable | $1.10/hr (A100 80GB) |
Once you have SSH access to a GPU box, use Option A (vLLM) or B (TGI) above. Set up a reverse proxy (Caddy or nginx) with TLS to expose it as a stable API endpoint.
Plugging your self-hosted endpoint into Clawd agents
Once your vLLM / TGI / Ollama endpoint is running, point any OpenAI-compatible
client at it β same as the HF Router path, just swap the base_url:
from openai import OpenAI
# vLLM / TGI running on your box (replace with your IP or domain)
client = OpenAI(base_url="http://YOUR_GPU_HOST:8000/v1", api_key="none")
response = client.chat.completions.create(
model="solana-clawd-1.5b",
messages=[
{"role": "system", "content": "You are Clawd, a sovereign Solana-native AI agent."},
{"role": "user", "content": "Analyze the risk of going long SOL-PERP at 5x."},
],
max_tokens=512,
)
print(response.choices[0].message.content)
Set CLAWD_INFERENCE_URL=http://YOUR_GPU_HOST:8000/v1 in your agent environment
and the existing skill wrappers (scripts/hermes3_inference.py, perps/functioncall.py)
will pick it up automatically.
License
- Code (this directory): MIT β Copyright (c) 2026 OpenClawd / Solizardking
- Dataset (
solanaclawd/solana-clawd-instruct): CC-BY-4.0 - Base model (Qwen2.5): Qwen Research License
- Adapter (when published): Apache-2.0
Percolator AutoResearch
Continuous training data generation inspired by percolator-meta. Fetches Solana ecosystem documents recursively, extracts QA pairs using Clawd-1.5B, gates on quality, and appends to the training dataset β creating a self-improving loop.
Seed URLs (llms.txt / docs / papers)
β fetch β extract claims + child links
β Clawd summarize β {"question": ..., "answer": ...}
β eval gate (Solana-keyword relevance β₯ 2)
β if quality β append to data/autoResearch.jsonl
β increment DataSubmission PDA attribution (onchain)
β recurse into child links (depth-limited, SQLite dedup)
# Single research cycle β Solana + Phoenix docs
python3 scripts/auto_research.py \
--seed-urls \
https://docs.solanalabs.com/llms.txt \
https://docs.phoenix.trade/llms.txt \
https://www.zkcompression.com/llms.txt \
--depth 2 \
--output data/autoResearch.jsonl
# Continuous loop β runs every 6h, pushes new examples to Hub
python3 scripts/auto_research.py \
--seed-urls https://docs.solanalabs.com/llms.txt \
--depth 3 \
--loop --interval-hours 6 \
--push-to-hub solanaclawd/solana-clawd-instruct
# Uses ClawdRouter free tier by default (clawd_free_* key)
# Override with: --api-base https://clawd-box-router.fly.dev/v1 --api-key $HF_TOKEN
The SQLite manifest at data/research_manifest.db tracks every visited URL β no page is fetched twice across cycles. Output goes to data/autoResearch.jsonl in the same {"messages": [...]} format as the rest of the training data and can be merged directly.
Clawd Autoresearch Wiki Integration
Source: github.com/Solizardking/clawd-autoresearch-wiki
The wiki is a companion monorepo containing three modules now integrated into this pipeline:
Wiki β Training Data (ingest_wiki_data.py)
Pulls 18 curated Solana SFT pairs from the wiki's solana-chat/solana/dataset.py and appends them to data/solana_clawd_seed.jsonl. Skips duplicates automatically.
# Add wiki SFT pairs to seed data (dry-run first)
python3 scripts/ingest_wiki_data.py --dry-run
python3 scripts/ingest_wiki_data.py
# Add + push merged dataset to Hub
python3 scripts/ingest_wiki_data.py --push --repo solanaclawd/solana-clawd-instruct
Coverage: PDA mechanics Β· rent/compute/CPI Β· SPL/Token-2022 Β· Anchor Β· pump.fun bonding curves Β· perp liquidations Β· rug-check checklist Β· honeypot detection Β· brain/hands split Β· skill registry Β· Light Protocol Β· ZK routing Β· three on-chain laws Β· x402 payment flow.
Solana Knowledge Benchmark (solana_benchmark.py)
18-question MCQ eval across 6 domains, adapted from the wiki's solana-chat/solana/tasks.py. Uses any OpenAI-compatible endpoint β designed to track fine-tune delta pre/post training.
export WANDB_API_KEY=<key>
# Baseline (pre-fine-tune)
python3 scripts/solana_benchmark.py
# Post-training eval
python3 scripts/solana_benchmark.py --model ordlibrary/DeepSolanaZKr-1
# Against local vLLM
python3 scripts/solana_benchmark.py \
--model solanaclawd/solana-clawd-core-ai-1.5b-lora \
--base-url http://localhost:8000/v1 --api-key none
Domains: core Β· defi Β· security Β· agent Β· zk Β· constitution
Full release verifier
Run the broad verifier before calling the setup/release goal complete. It checks
the explicit core-ai and ai-training path list, local manifests, public Hub
datasets, the Core AI adapter repo, and release-doc secret hygiene.
cd ai-training
python3 scripts/verify_full_goal_release.py --strict
Release complete β solanaclawd/solana-clawd-core-ai-1.5b-lora contains
adapter_config.json and adapter_model.safetensors (pushed 2026-06-19T23:44Z).
cd ai-training
python3 scripts/verify_full_goal_release.py --strict # should now pass
Persistent Memory (memory/honcho.py)
Honcho-backed cross-session memory for the training pipeline β remembers eval results, dataset decisions, and experiment lessons across context wipes.
from memory.honcho import AgentMemory
mem = AgentMemory(api_key="hch-...", workspace="clawd-training")
mem.remember_eval("ordlibrary/DeepSolanaZKr-1", "6a3464cf", 0.78, 18, "post-SFT run")
mem.remember_training_run("6a3464cf", "Qwen/Qwen2.5-1.5B-Instruct",
"solanaclawd/solana-clawd-instruct", "COMPLETE")
ctx = mem.recall("What was the last eval accuracy?")
summary = mem.dream() # autonomous consolidation
Set HONCHO_API_KEY to enable cloud persistence; falls back to local in-memory log if unset.
Onchain AI Registry
Every Clawd model has a permanent onchain identity anchored via the solana_ai_inference Anchor program (3dLst2E3djtCSwG19mFS3REHxtZPngjyga7iYZLDL5xj) and indexed at onchain.x402.wtf.
Solana AI Model Kit one-shot
Safe audit-only bootstrap:
curl -fsSL https://raw.githubusercontent.com/Solizardking/solana-clawd/main/ai-training/scripts/solana_ai_model_kit.sh | bash
From a local checkout:
bash scripts/solana_ai_model_kit.sh --local
bash scripts/solana_ai_model_kit.sh --local --register
bash scripts/solana_ai_model_kit.sh --local --live-register --hf-model YOUR_ORG/your-model
See model-kit/README.md for the full fork, train,
register, and OnChain-AI sidecar workflow.
One-shot curl registration (off-chain index only)
./dao/register_model.sh \
--hf-model "solanaclawd/solana-clawd-1.5b" \
--eval-accuracy 0.60 \
--dataset-size 36109
# With auto-computed hash from train_lora.py:
./dao/register_model.sh \
--hf-model "solanaclawd/solana-clawd-1.5b" \
--model-hash "sha256:$(sha256sum scripts/train_lora.py | awk '{print $1}')"
Full onchain registration (creates ModelRegistry PDA)
# Requires: funded Solana wallet, pnpm, @coral-xyz/anchor installed
./dao/register_model.sh --onchain \
--hf-model "solanaclawd/solana-clawd-1.5b" \
--keypair ~/.config/solana/id.json \
--cluster devnet
This calls initialize_model(model_hash, ModelType::TextGeneration, api_endpoint, term_reward_rate) which creates a ModelRegistry PDA at ["model", authority.pubkey]. The PDA stores accuracy, validation count, training status, and the CLAWD reward rate β all queryable without a centralized API.
# Verify onchain registration
solana account <MODEL_REGISTRY_PDA> --url devnet --output json
CAAP/1.0 registry format
The off-chain index at onchain.x402.wtf/.well-known/clawd-registry.json maps model IDs to their capabilities and onchain anchors:
{
"protocol": "CAAP/1.0",
"registry": [{
"model_id": "solanaclawd/solana-clawd-1.5b",
"capabilities": ["solana-dev", "protocol-qa", "anchor-codegen"],
"eval_accuracy": 0.60,
"sas_attestation": "At1...",
"program_pda": "...",
"clawd_token_gate": "8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump"
}]
}
ZK Attestations (zk.x402.wtf)
Model quality claims are anchored as compressed on-chain credentials using Solana Attestation Service (SAS) and Light Protocol V2.
| Artifact | Type | Cost |
|---|---|---|
| Dataset snapshot (36K examples Merkle root) | compressed | ~0.00003 SOL |
| LoRA adapter checksum | compressed | ~0.00003 SOL |
| W&B Weave eval result | standard | ~0.002 SOL |
| Governance proposal | standard + nullifier | ~0.003 SOL |
# Create eval attestation (dry run first)
pnpm tsx dao/attestation/create_attestation.ts \
--type eval \
--model-id "solanaclawd/solana-clawd-1.5b" \
--accuracy 0.60 \
--wandb-run "ktvtubjs" \
--keypair ~/.config/solana/id.json \
--dry-run
# Create dataset attestation (compressed, mainnet)
pnpm tsx dao/attestation/create_attestation.ts \
--type dataset \
--model-id "solanaclawd/solana-clawd-1.5b" \
--size 36109 \
--hash "sha256:$(sha256sum data/solana_clawd_merged.jsonl | awk '{print $1}')" \
--compressed \
--keypair ~/.config/solana/id.json
Attestation addresses are written to dao/attestation/attestations.jsonl and included in the CAAP/1.0 registry. Verify any attestation without trusting the Clawd team:
solana account <ATTESTATION_PDA> --url mainnet-beta --output json
DAO & Governance
See dao/DAO_DESIGN.md for the full architecture. Summary:
Hard constraints:
- User capital lives in Percolator insurance pools β genesis programs never touch it
- All authority changes require 1-week Squads timelock (non-reducible, even by governance vote)
- 3-of-5 multisig emergency pause covers trading only β withdrawals are always open
What governance controls: model training priorities, dataset curation budget, compute allocation, registry parameters, validator slashing thresholds
Validator network (from solana_ai_inference IDL):
become_validator(stake_amount)β register and stakesubmit_data(data_hash, DataType, size, metadata)β submit training data for attributionrate_data(quality_score, term_reward)β validators score submissions (0β100)- Quality Γ
term_reward_rate= $CLAWD attribution per validated example
Public announcement
The first Solana Clawd community article is at outputs/community-article.md β ready to publish at huggingface.co/blog/solanaclawd. It covers the model family, 36K dataset, perps agent example, Percolator AutoResearch, onchain registry, ZK attestations, and DAO safety design.
See also
AGENTS.mdβ the Clawd agent catalogCONSTITUTION.mdβ the Clawd Constitutionthree-laws.mdβ the three on-chain lawsdao/DAO_DESIGN.mdβ DAO architecture and safety model- models.musebook.trade β official Clawd AI catalog
- Hugging Face: solanaclawd β official model, dataset, and Space repositories
- Realtime Research Instruct β featured research dataset
- onchain.x402.wtf β onchain AI registry
- zk.x402.wtf β ZK attestation layer
- Percolator meta β recursive research pattern
- Vulcan CLI β Phoenix perps trading CLI with MCP
- Hugging Face
hfCLI docs - TRL SFTTrainer
- PEFT LoRA
- HF Jobs
- Solana Attestation Service
- Light Protocol ZK compression