ordlibrary/Clawd-GLM-5.2
1
Clawd-GLM-5.2 (LoRA)
A LoRA fine-tune of zai-org/GLM-5.2 on the solanaclawd/solana-clawd-instruct dataset. Trained to be a sovereign, constitutionally-grounded Solana-native AI agent ("Clawd") with deep knowledge of ZK compression, DeFi, and the Clawd agent ecosystem.
Part of the ordlibrary model family. See also the 1.5B variant atsolanaclawd/solana-clawd-1.5b-lora(Qwen2.5 base) and the 8B tool-use variant atsolanaclawd/solana-clawd-8b-lora(Hermes-3 base).
What this model knows
- Solana mechanics: PDAs, accounts, instructions, rent, compute budgets, Token-2022
- ZK primitives:
clawd-zkprogram (nullifiers, Groth16, Light Protocol V2 compressed state) - DeFi: AMMs, CLMMs, perpetuals (Phoenix, Drift), bonding curves, Jupiter
- Memecoin risk: rug detection, holder concentration, deployer forensics
- Agent architecture: skill registries, brain/hands split, multi-agent coordination
- Constitutional reasoning: Clawd Constitution, guardrails, refusal patterns
- Code generation: Anchor/Rust, TypeScript @solana/kit, Python
- Runtime v2: xAI Voice Agent, MCP skills catalog, ClawdRouter, x402 payments
Training Details
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
from peft import PeftModel
BASE = "zai-org/GLM-5.2"
ADAPTER = "ordlibrary/Clawd-GLM-5.2"
# Option A: transformers pipeline (simplest)
pipe = pipeline("text-generation", model=BASE, trust_remote_code=True)
# Then load LoRA adapter via PeftModel...
# Option B: manual load
tokenizer = AutoTokenizer.from_pretrained(BASE, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(BASE, trust_remote_code=True, device_map="auto")
model = PeftModel.from_pretrained(model, ADAPTER)
messages = [
{"role": "user", "content": "What is a nullifier in clawd-zk?"},
]
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
print(pipe(messages)[0]["generated_text"][-1]["content"])Reproduce Training
cd solana-clawd/ai-training
pip install -r requirements.txt
export HF_TOKEN=hf_...
# Inject ZK training data
python3 scripts/add_zk_examples.py
# Prepare + push dataset (47 examples)
python3 scripts/prepare_dataset.py \
--input data/solana_clawd_seed.jsonl \
--output data/processed \
--push --repo-id solanaclawd/solana-clawd-instruct
# Train (remote A100 via HF Jobs — requires paid credits)
./scripts/launch_hf_jobs.sh a100-large glm52
# Or train locally if you have 12+ GB VRAM and ~10 GB disk
python3 scripts/train_lora.py --config configs/glm52_lora_config.yamlLimitations
- Knowledge cutoff: mid-2026 training data
- Not a trading oracle: generates analysis, not financial advice
- Constitutional guardrails are heuristic: not formally verified
- ZK examples are instructional: the model explains clawd-zk but does not execute proofs
License
Adapter weights: Apache-2.0 Base model: GLM-5.2 license Training data: CC-BY-4.0
Citation
@misc{clawd-glm52-2026,
title = {Clawd-GLM-5.2 (LoRA)},
author = {ordlibrary},
year = {2026},
url = {https://huggingface.co/ordlibrary/Clawd-GLM-5.2}
}