Views
No views yet
⚠️ Intermediate checkpoint — Stage 2 of 5. This is the audit / Long-CoT reasoning LoRA, layered on top of the Stage 1B SFT base. Not yet RFT-tuned — Stage 3 (rejection-sampling fine-tuning againstforge test) and the optional Stage 4 (GSPO RL with executor reward) come next.
Qwopus3.6-27B-solidity-sft1B-merged (Stage 1B merged into bf16 base) that teaches the model to:<think>...</think>| # | Stage | Status | Output |
|---|---|---|---|
| 0 | Continued pretrain (DoRA on Solidity corpus) | ✅ done | Qwopus3.6-27B-solidity-cpt-stageA |
| 1 | SFT (instruction): spec → contract | ✅ done | Qwopus3.6-27B-solidity-sft-stage1B |
| 2 | SFT (audit / Long-CoT reasoning) | ✅ done — this repo | this repo |
| 3 | RFT (rejection-sampling FT against forge test) | ⬜ planned | TBD |
| 4 | GSPO (sequence-level RL with executor reward) | ⬜ optional | TBD |
samscrack/solidity-audit-cot — Long-CoT audit traces generated by Claude Opus 4.7 (adaptive thinking, xhigh effort) over real Solidity contracts.audit_cot_clean_long_tailed.jsonl] for a future longer-context Stage 2 re-run.none rows are deliberate — they teach the model not to fabricate vulnerabilities.<think>{12 reasoning paragraphs joined}</think> followed by a structured finding rendered as markdown.q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, out_projqwen3-thinking (with <think> filled by real Opus-derived reasoning)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
4# Load the Stage-1B-merged base, then layer the Stage 2 LoRA
5base = AutoModelForCausalLM.from_pretrained(
6 "samscrack/Qwopus3.6-27B-solidity-sft-stage1B", # merge with the CPT base first locally
7 torch_dtype="bfloat16", device_map="auto",
8)
9model = PeftModel.from_pretrained(base, "samscrack/Qwopus3.6-27B-solidity-audit-stage2")
10tokenizer = AutoTokenizer.from_pretrained("samscrack/Qwopus3.6-27B-solidity-audit-stage2")
11
12contract = open("MyContract.sol").read()
13messages = [{"role": "user", "content":
14 "Audit the following Solidity contract for security issues. Identify the most "
15 "impactful vulnerability (or 'none' if the contract is clean), reason step-by-step "
16 "about your analysis, then output a structured finding with severity, category, "
17 "location, description, impact, and a concrete fix.\n\n"
18 f"```solidity\n{contract}\n```"}]
19prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
20inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
21out = model.generate(**inputs, max_new_tokens=4096, do_sample=False)
22print(tokenizer.decode(out[0], skip_special_tokens=False))<think> block with multi-paragraph reasoning followed by a markdown audit report.forge test validation in the loss. This stage uses next-token cross-entropy on Opus traces. Stage 3 RFT introduces test-pass as a reward signal — that's where functional correctness gets enforced.samscrack/Qwopus3.6-27B-solidity-cpt-stageAsamscrack/Qwopus3.6-27B-solidity-sft-stage1Bsamscrack/solidity-audit-cotsamscrack/solidity-eval-20261@misc{qwopus3-6-27b-solidity-audit-stage2-2026,
2 author = {samscrack},
3 title = {Qwopus3.6-27B-solidity-audit-stage2: Stage 2 audit/Long-CoT LoRA},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/samscrack/Qwopus3.6-27B-solidity-audit-stage2}},
7}