Views
No views yet
Qwen/Qwen2.5-3B-Instruct (Chosen for its lightweight footprint and strong base capability in structural formatting and reasoning).Unsloth (Utilized to accelerate training speed and heavily reduce VRAM consumption during computation via optimized gradient checkpointing).q_proj, v_proj, k_proj, etc.) to isolate the translation layers.{"instruction": "...", "output": "..."}1<|im_start|>system
2[Custom System Alignment Rules]<|im_end|>
3<|im_start|>user
4[Legal Clause Input]<|im_end|>
5<|im_start|>assistant
6[Architectural Plan + Secure Solidity Code]<|im_end|>Q4_K_M GGUF (Compiles the 3B layers into a highly optimized ~2GB package, allowing smooth execution on standard consumer hardware).solidity_dataset.json) into the Google Colab workspace.fine_tune_qwen.py script to initiate the TRL SFTTrainer.TrainingArguments can cause serialization crashes (PicklingError) at step checkpointing on newer versions of trl. This is bypassed by utilizing the native SFTConfig block and setting save_strategy = "no".model.save_pretrained_gguf to natively compile the layers into a quantized GGUF format..gguf weights from your drive.C:\Users\<User>\.cache\lm-studio\models\local\qwen-solidity\).constructor() public or forgetting state mutations). To solve this, you must apply explicit behavioral boundaries in the UI:1You are an expert Solidity compiler assistant specializing in modern, secure smart contracts conforming strictly to version 0.8.20.
2
3OUTPUT FORMAT RULES:
41. Always start your response with a clean "ARCHITECTURE PLAN" broken down into "State Variables:" and "Functions:".
52. Follow the plan with a clean markdown code block starting with exact keyword "solidity".
63. NEVER add visibility modifiers (like 'public') to the 'constructor'. Write it as: constructor() { ... }
74. If a function is restricted to the owner, apply the `onlyOwner` modifier to its definition.
8
9Verification & Testing
10Once the UI is configured, test the alignment with a prompt containing a real-world legal constraint:
11
12Plaintext
13Convert the following legal clause into a secure Solidity 0.8.20 smart contract.
14[CLAUSE]
151. The contract must track a public timestamp marking a release deadline.
162. The deployment address is designated as the contract Owner.
173. The Owner can extend this release deadline to a new timestamp in the future.
18[/CLAUSE]
19Expected Quality Control Metrics:
20Structural Parsing: The model outputs an unstructured text ARCHITECTURE PLAN detailing functions and states prior to any code generation.
21
22Syntax Integrity: The generated smart contract omits constructor visibility, applies the custom onlyOwner access modifier, and cleanly validates structural states.
23