Create README.md
Browse filesModel Details
Model Name: SolidityGPTVersion: 1.0Developed by: [Your Name or Organization]License: [Specify license, e.g., MIT, Apache 2.0]Model Type: Code Generation (Solidity)Framework: [Specify framework, e.g., PyTorch, TensorFlow]Language: SolidityDataset: Custom dataset of Solidity smart contracts from [Specify sources: GitHub, Etherscan, curated sources]
Model Description
SolidityGPT is a transformer-based model trained for Solidity smart contract generation, completion, and analysis. It aids blockchain developers by providing accurate and optimized Solidity code snippets, reducing development time and minimizing vulnerabilities.
Intended Use
Smart Contract Development: Auto-generating Solidity code for Ethereum smart contracts.
Code Completion: Suggesting code snippets and function implementations.
Bug Detection & Security Analysis: Highlighting potential vulnerabilities.
Learning & Experimentation: Assisting developers in understanding Solidity syntax and best practices.
Limitations
May generate insecure or inefficient Solidity code if not carefully reviewed.
Trained on historical datasets, may not fully support the latest Solidity versions or EVM upgrades.
Does not execute or validate contract logic on-chain.
Training Data
The model is trained on publicly available Solidity smart contracts sourced from:
Open-source repositories (GitHub, Etherscan, etc.)
Solidity best practices and security-focused datasets
Curated samples of high-quality smart contract implementations
Performance Metrics
Code Quality: Evaluated using Solidity linters and static analysis tools.
Security Awareness: Benchmarked against known vulnerabilities using smart contract auditing tools.
Code Completion Accuracy: Assessed through developer feedback and automated completion tests.
Usage
Example 1: Generating a Smart Contract
from transformers import pipeline
solidity_gpt = pipeline("text-generation", model="your-username/SolidityGPT")
prompt = "pragma solidity ^0.8.0; contract SimpleStorage {"
result = solidity_gpt(prompt, max_length=200)
print(result[0]['generated_text'])
Example 2: Completing a Function
prompt = "function transfer(address recipient, uint256 amount) public {"
result = solidity_gpt(prompt, max_length=150)
print(result[0]['generated_text'])
Ethical Considerations
The model may generate code with security flaws; users must verify outputs manually.
Smart contract deployments should be audited before mainnet deployment.
Users are responsible for ensuring compliance with legal and regulatory requirements.
Future Improvements
Enhance dataset with the latest Solidity contracts.
Integrate reinforcement learning to improve security heuristics.
Extend support for complex contract structures and DeFi protocols.
Citation
If you use SolidityGPT in your research or development, please cite it as:
@misc
{SolidityGPT2025,
author = {Your Name or Organization},
title = {SolidityGPT: Transformer-based Solidity Code Generation},
year = {2025},
url = {https://huggingface.co/your-username/SolidityGPT}
}
Contact
For issues, suggestions, or collaborations, reach out via [your contact email] or open an issue on the Hugging Face model page.
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- seyyedaliayati/solidity-dataset
|
4 |
+
- Royal-lobster/Slither-Audited-Solidity-QA
|
5 |
+
- braindao/solidity-base
|
6 |
+
- Quangnguyen711/solidity_re_entrancy_dataset
|
7 |
+
- braindao/solidity-bettergpt-base-v2-preference-enriched
|
8 |
+
- braindao/solidity-bettergpt-base-v2-preference
|
9 |
+
- nguyenminh871/reentrancy_solidity_function
|
10 |
+
- braindao/solidity-bettergpt-base-v2-prompts
|
11 |
+
- msc-smart-contract-auditing/audits-with-reasons
|
12 |
+
- andstor/smart_contracts
|
13 |
+
- AlfredPros/smart-contracts-instructions
|
14 |
+
- braindao/smart-contracts-instructions-cleaned
|
15 |
+
- jainabh/smart_contracts_malicious
|
16 |
+
- Ruschio/smart-contracts-source
|
17 |
+
- nitt/smartcontracts
|
18 |
+
- nayankur/paired-smart-contracts
|
19 |
+
- fasdfasdffasdfas/verified_smart_contracts
|
20 |
+
language:
|
21 |
+
- en
|
22 |
+
metrics:
|
23 |
+
- accuracy
|
24 |
+
- code_eval
|
25 |
+
base_model:
|
26 |
+
- deepseek-ai/DeepSeek-R1-Zero
|
27 |
+
- deepseek-ai/DeepSeek-R1
|
28 |
+
- deepseek-ai/Janus-Pro-7B
|
29 |
+
new_version: deepseek-ai/DeepSeek-R1-Distill-Llama-8B
|
30 |
+
pipeline_tag: reinforcement-learning
|
31 |
+
---
|