Views
No views yet
⚠️ Intermediate checkpoint — Stage 1 of 5. This is the spec→contract instruction-following LoRA, layered on top of the Stage 0 CPT adapter. Not intended for direct production use. Audit/reasoning capability and last-mile pass-rate improvements come from Stages 2-4. Use the final-stage output for actual deployment.
Qwopus3.6-27B-solidity-cpt-merged (the merged Stage 0 CPT base) that teaches the model to translate natural-language specs into idiomatic Solidity contracts, plus optionally Foundry test suites.| # | Stage | Status | Output |
|---|---|---|---|
| 0 | Continued pretrain (DoRA on Solidity corpus) | ✅ done | Qwopus3.6-27B-solidity-cpt-stageA |
| 1 | SFT (instruction): spec → contract | ✅ done — this repo | this repo |
| 2 | SFT (audit / Long-CoT reasoning) | 🟡 in progress | TBD |
| 3 | RFT (rejection-sampling FT against forge test) | ⬜ planned | TBD |
| 4 | GSPO (sequence-level RL with executor reward) | ⬜ planned | TBD |
<think>...</think> block is intentionally empty for this stage; per-token reasoning supervision comes in Stage 2.| Source | Rows | Role |
|---|---|---|
braindao/solidity-base-sft-v2 (filtered) + lohoz/Smart-Contract-MultiTask-Dataset[requirement_fsm_code] | 65,100 | spec → contract, pragma ≥ 0.7 |
Opus 4.7-synthesized (contract, Foundry test) pairs that compile AND pass forge test | 4,919 | spec → contract + test suite |
| Total pool | 70,019 | sampled to 14,000 → 12,796 after ctx≤8192 filter |
verify_synth.py (initial run had only 384 verified due to a hard-coded ≥0.8.13 preflight; patched to accept any 0.8.x and rewrite plain pragmas to ^0.8.0).q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, out_projadamw_8bit), weight decay 0.001qwen3-thinking (with <think></think> empty for this stage)train_on_responses_only (loss only on assistant tokens after <|im_start|>assistant\n<think>)torchrun --nproc-per-node=21from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = AutoModelForCausalLM.from_pretrained(
5 "samscrack/Qwopus3.6-27B-solidity-cpt-stageA", # merge with your CPT base first
6 torch_dtype="bfloat16", device_map="auto",
7)
8model = PeftModel.from_pretrained(base, "samscrack/Qwopus3.6-27B-solidity-sft-stage1B")
9tokenizer = AutoTokenizer.from_pretrained("samscrack/Qwopus3.6-27B-solidity-sft-stage1B")
10
11messages = [{"role": "user", "content":
12 "Implement an ERC-20 token with a 1% transfer tax that goes to a treasury address. "
13 "Include events, ownership, and Solidity 0.8.20 syntax."}]
14prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
15inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
16out = model.generate(**inputs, max_new_tokens=2048, do_sample=False)
17print(tokenizer.decode(out[0], skip_special_tokens=False))<think> block is empty by design for Stage 1. Expect direct contract emission, no chain-of-thought. Stage 2 adds Long-CoT.forge test validation in the loss. Stage 1 uses next-token cross-entropy only. RFT (Stage 3) introduces test-pass as a reward signal.samscrack/Qwopus3.6-27B-solidity-cpt-stageAsamscrack/solidity-eval-2026samscrack/solidity-audit-cot1@misc{qwopus3-6-27b-solidity-sft-stage1b-2026,
2 author = {samscrack},
3 title = {Qwopus3.6-27B-solidity-sft-stage1B: Stage 1 instruction LoRA on the Solidity-pretrained base},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/samscrack/Qwopus3.6-27B-solidity-sft-stage1B}},
7}