solanaclawd/solana-clawd-instruct
Viewer • Updated • 47 • 96
How to use ordlibrary/Clawd-GLM-5.2 with PEFT:
Task type is invalid.
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 atsolanaclawd/solana-clawd-8b-lora(Hermes-3 base).
clawd-zk program (nullifiers, Groth16, Light Protocol V2 compressed state)| 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 |
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"])
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
Adapter weights: Apache-2.0
Base model: GLM-5.2 license
Training data: CC-BY-4.0
@misc{clawd-glm52-2026,
title = {Clawd-GLM-5.2 (LoRA)},
author = {ordlibrary},
year = {2026},
url = {https://huggingface.co/ordlibrary/Clawd-GLM-5.2}
}
Base model
zai-org/GLM-5.2