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 at solanaclawd/solana-clawd-1.5b-lora (Qwen2.5 base) and the 8B tool-use variant at solanaclawd/solana-clawd-8b-lora (Hermes-3 base).

What this model knows

  • Solana mechanics: PDAs, accounts, instructions, rent, compute budgets, Token-2022
  • ZK primitives: clawd-zk program (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

Parameter Value
Base model zai-org/GLM-5.2
LoRA rank / alpha 32 / 64
Target modules all-linear (auto-detected)
Trainable params ~TBD
Epochs 3
Learning rate 1.0e-4 (cosine, 3% warmup)
Effective batch size 16 (1 × 16 grad accum)
Max sequence length 4096
Quantization 4-bit NF4 (CUDA)
Loss Assistant-only
Dataset 47 curated conversations (42 train / 2 eval / 3 test)
Dataset includes 15 ZK-primitives examples (clawd-zk, nullifiers, Groth16)
Config ai-training/configs/glm52_lora_config.yaml

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.yaml

Limitations

  • 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}
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ordlibrary/Clawd-GLM-5.2

Base model

zai-org/GLM-5.2
Adapter
(2)
this model

Dataset used to train ordlibrary/Clawd-GLM-5.2