Made the model card better

#1
by SatyamSinghal - opened
Files changed (1) hide show
  1. README.md +126 -84
README.md CHANGED
@@ -1,51 +1,44 @@
1
- ---
2
- license: mit
3
- language:
4
- - en
5
- tags:
6
- - code
7
- - solidity
8
- - blockchain
9
- - smart-contracts
10
- - code-generation
11
- - ethereum
12
- - web3
13
- - daml
14
- base_model: Chain-GPT/Solidity-LLM
15
- pipeline_tag: text-generation
16
- library_name: transformers
17
- ---
18
- <div align="center">
19
- # 🧞 Ginie β€” Solidity Smart Contract LLM
20
- **The AI built for Web3 developers**
21
  [![Website](https://img.shields.io/badge/Website-ginie.xyz-blue)](https://ginie.xyz)
 
22
  [![License](https://img.shields.io/badge/License-MIT-green)](https://opensource.org/licenses/MIT)
23
- [![Model](https://img.shields.io/badge/Model-2B_Parameters-orange)]()
24
- [![Solidity](https://img.shields.io/badge/Language-Solidity-purple)]()
25
- </div>
26
  ---
 
27
  ## What is Ginie?
28
- **Ginie AI** is the world's first specialized AI assistant for **Daml + Solidity smart contract generation**,
29
- built for the institutional blockchain ecosystem on [Canton Network](https://canton.network).
30
- This model β€” **Ginie Solidity LLM v1.0** β€” generates production-quality Solidity smart contracts
31
- from plain English instructions. It understands ERC standards, OpenZeppelin patterns, DeFi protocols,
32
- DAOs, governance, and more.
33
- > 🌐 Try the live demo: [huggingface.co/spaces/GinieAI/Ginie-Demo](https://huggingface.co/spaces/GinieAI/Ginie-Demo)
 
34
  ---
 
35
  ## Quickstart
 
36
  ```python
37
  from transformers import AutoModelForCausalLM, AutoTokenizer
38
  import torch
 
39
  tokenizer = AutoTokenizer.from_pretrained("GinieAI/Solidity-LLM")
40
  model = AutoModelForCausalLM.from_pretrained(
41
  "GinieAI/Solidity-LLM",
42
  torch_dtype=torch.bfloat16,
43
  device_map="cuda"
44
  )
 
45
  prompt = """### Instruction:
46
  Write a Solidity ERC20 token contract with minting, burning, and owner controls.
 
47
  ### Response:
48
  """
 
49
  inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
50
  outputs = model.generate(
51
  **inputs,
@@ -54,58 +47,107 @@ outputs = model.generate(
54
  do_sample=True,
55
  pad_token_id=tokenizer.eos_token_id
56
  )
57
- print(tokenizer.decode(outputs, skip_special_tokens=True))
58
- ```
59
- ---
60
- ## Model Details
61
- | Property | Value |
62
- |---|---|
63
- | **Developer** | [Ginie AI](https://ginie.xyz) |
64
- | **Model type** | Causal LM β€” Code Generation |
65
- | **Parameters** | 2 Billion |
66
- | **Architecture** | 32 Transformer blocks |
67
- | **Context length** | 2048 tokens |
68
- | **Precision** | bfloat16 |
69
- | **Tokenizer** | GPT-2 |
70
- | **Language** | Solidity (Ethereum-compatible) |
71
- | **License** | MIT |
72
- ---
73
- ## Performance Benchmarks
74
- | Metric | Ginie v1 | GPT-4o mini | DeepSeek-Coder-7B |
75
- |---|---|---|---|
76
- | Compilation Rate | **83%** | 78% | 75% |
77
- | OpenZeppelin Compliance | **65%** | 61% | 58% |
78
- | Gas Efficiency | **72%** | 65% | 63% |
79
- | Security Score | **58%** | 54% | 51% |
80
- ---
81
- ## Use Cases
82
- - βœ… Generating ERC20, ERC721, ERC1155 token contracts
83
- - βœ… DeFi protocols β€” staking, liquidity, yield farming
84
- - βœ… DAO and governance contracts
85
- - βœ… Multisig wallets and escrow
86
- - βœ… NFT marketplaces
87
- - βœ… Canton Network / Daml integration (v2 roadmap)
88
- ## Not suitable for
89
- - ❌ Production deployment without expert review
90
- - ❌ Non-Solidity languages (v2 roadmap includes Rust/Daml)
91
- - ❌ Legal or formal contract auditing
92
- ---
93
- ## Roadmap
94
- | Version | What's new |
95
- |---|---|
96
- | **v1.0** (now) | Base Solidity generation β€” 2B params |
97
- | **v2.0** | +7,800 training examples β€” DISL + Zellic corpus |
98
- | **v3.0** | Daml smart contract support β€” Canton Network |
99
- | **v4.0** | Real user data flywheel β€” weekly retraining |
100
- ---
101
- ## License & Attribution
102
- This model is released under the **MIT License**.
103
- Built on top of [Chain-GPT/Solidity-LLM](https://huggingface.co/Chain-GPT/Solidity-LLM)
104
- by [ChainGPT](https://chaingpt.org), which is itself fine-tuned from
105
- [Salesforce/codegen-2B-multi](https://huggingface.co/Salesforce/codegen-2B-multi).
106
- Full credit to the original authors. Ginie AI extends this work for the
107
- institutional Canton/Daml ecosystem.
108
- ---
109
- ## About Ginie AI
110
- Ginie AI is building the developer layer for institutional blockchain.
111
- 🌐 [ginie.xyz](https://ginie.xyz)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ginie β€” Smart Contract LLM
2
+
3
+ The first AI model purpose-built to generate, compile, audit, and deploy smart contracts across institutional and public blockchains. Plain English in. Production-ready contract out. On-chain in under 90 seconds.
4
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  [![Website](https://img.shields.io/badge/Website-ginie.xyz-blue)](https://ginie.xyz)
6
+ [![npm](https://img.shields.io/badge/npm-30k%2B_weekly_downloads-red)](https://npmjs.com/package/ginie-sdk)
7
  [![License](https://img.shields.io/badge/License-MIT-green)](https://opensource.org/licenses/MIT)
8
+ [![Demo](https://img.shields.io/badge/Demo-Live-brightgreen)](https://huggingface.co/spaces/GinieAI/Ginie-Demo)
9
+ [![Canton](https://img.shields.io/badge/Canton_Network-Supported-purple)](https://canton.network)
10
+
11
  ---
12
+
13
  ## What is Ginie?
14
+
15
+ Ginie is the developer layer for the next generation of on-chain applications. The friction keeping developers off-chain is not the blockchain itself β€” it is the specialised languages, compiler toolchains, and security requirements that sit between an idea and a deployed contract. Ginie removes all of that.
16
+
17
+ Write a description. Get a contract that compiles, passes security checks, and deploys β€” across Solidity (Ethereum, Avalanche, Camp Network), Daml (Canton Network), and Rust (Vara Network).
18
+
19
+ Canton Network alone processes $6 trillion in tokenised assets, backed by Goldman Sachs, JPMorgan, and DTCC. Every institution building on it needs smart contracts. Ginie writes them.
20
+
21
  ---
22
+
23
  ## Quickstart
24
+
25
  ```python
26
  from transformers import AutoModelForCausalLM, AutoTokenizer
27
  import torch
28
+
29
  tokenizer = AutoTokenizer.from_pretrained("GinieAI/Solidity-LLM")
30
  model = AutoModelForCausalLM.from_pretrained(
31
  "GinieAI/Solidity-LLM",
32
  torch_dtype=torch.bfloat16,
33
  device_map="cuda"
34
  )
35
+
36
  prompt = """### Instruction:
37
  Write a Solidity ERC20 token contract with minting, burning, and owner controls.
38
+
39
  ### Response:
40
  """
41
+
42
  inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
43
  outputs = model.generate(
44
  **inputs,
 
47
  do_sample=True,
48
  pad_token_id=tokenizer.eos_token_id
49
  )
50
+
51
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
52
+
53
+
54
+ npm SDK β€” 30,000+ active weekly downloads
55
+
56
+ npm install ginie-sdk
57
+
58
+
59
+ import { Ginie } from 'ginie-sdk'
60
+
61
+ const ginie = new Ginie({ apiKey: 'your-key' })
62
+
63
+ const contract = await ginie.generate({
64
+ prompt: 'ERC20 token with vesting schedule for a startup',
65
+ chain: 'ethereum',
66
+ audit: true
67
+ })
68
+
69
+ console.log(contract.code)
70
+ console.log(contract.securityScore)
71
+ console.log(contract.compiled)
72
+
73
+
74
+ Model Details
75
+
76
+
77
+
78
+ |Property |Value |
79
+ |--------------|-----------------------------|
80
+ |Developer |[Ginie AI](https://ginie.xyz)|
81
+ |Model type |Causal LM β€” Code Generation |
82
+ |Parameters |2 Billion |
83
+ |Architecture |32 Transformer blocks |
84
+ |Context length|2048 tokens |
85
+ |Precision |bfloat16 |
86
+ |Tokenizer |GPT-2 |
87
+ |Base model |Chain-GPT/Solidity-LLM |
88
+ |License |MIT |
89
+
90
+ Performance
91
+ Evaluated against GPT-4o mini and DeepSeek-Coder-7B on 100 Solidity contract generation prompts. Compilation success and security assessed via Slither static analysis. OpenZeppelin compliance assessed against standard library usage patterns.
92
+
93
+
94
+
95
+ |Metric |Ginie v1|GPT-4o mini|DeepSeek-Coder-7B|
96
+ |-----------------------|--------|-----------|-----------------|
97
+ |Compilation rate |**83%** |78% |75% |
98
+ |OpenZeppelin compliance|**65%** |61% |58% |
99
+ |Gas efficiency |**72%** |65% |63% |
100
+ |Security score |**58%** |54% |51% |
101
+
102
+ Ginie achieves the highest compilation rate despite being the smallest model in the comparison β€” a direct result of domain specialisation over general-purpose scale.
103
+
104
+ What Ginie generates today
105
+ βˆ™ ERC20, ERC721, ERC1155 token contracts
106
+ βˆ™ DeFi protocols β€” staking, liquidity pools, yield farming
107
+ βˆ™ DAO and governance contracts
108
+ βˆ™ Multisig wallets and escrow agreements
109
+ βˆ™ NFT marketplaces
110
+ βˆ™ Automated compliance and audit loops
111
+ Chains supported
112
+
113
+
114
+
115
+ |Chain |Language|Status |
116
+ |--------------|--------|----------|
117
+ |Ethereum |Solidity|Live |
118
+ |Avalanche |Solidity|Live |
119
+ |Camp Network |Solidity|Live |
120
+ |Canton Network|Daml |v3 roadmap|
121
+ |Vara Network |Rust |v3 roadmap|
122
+
123
+ Not suitable for
124
+ βˆ™ Production deployment without expert review
125
+ βˆ™ Formal legal contract auditing
126
+ βˆ™ Non-code generation tasks
127
+
128
+ Roadmap
129
+
130
+
131
+
132
+ |Version |What ships |
133
+ |----------|---------------------------------------------------------|
134
+ |v1.0 (now)|Solidity generation β€” 2B params, 83% compile rate |
135
+ |v2.0 |Expanded corpus β€” DISL + Zellic, 7,800+ training examples|
136
+ |v3.0 |Daml and Rust support β€” Canton Network and Vara Network |
137
+ |v4.0 |Data flywheel β€” weekly retraining on real user prompts |
138
+
139
+ The v4 flywheel is the permanent moat. Every contract a user successfully generates becomes a training example for the next version. The model improves weekly from real usage β€” a data distribution no statically trained competitor can replicate.
140
+
141
+ Training
142
+ Ginie v1 is fine-tuned from Chain-GPT/Solidity-LLM using LoRA on a curated Solidity instruction dataset. Training focused on instruction-following quality, OpenZeppelin pattern adherence, and compilable output over raw token prediction.
143
+ Security validation uses Slither static analysis. Compilation validation uses solc. Both are integrated into the generation pipeline β€” not just evaluation.
144
+
145
+ License and Attribution
146
+ Released under the MIT License.
147
+ Built on Chain-GPT/Solidity-LLM by ChainGPT, which is fine-tuned from Salesforce/codegen-2B-multi. Full credit to the original authors. Ginie extends this work for the institutional blockchain ecosystem.
148
+
149
+ About Ginie AI
150
+ Ginie AI is building the developer layer for institutional blockchain. Backed by the Canton Foundation and supported by the Canton Network ecosystem β€” the institutional blockchain processing $6 trillion in tokenised assets with Goldman Sachs, JPMorgan, and DTCC.
151
+ ginie.xyz Β· npm SDK Β· Live demo
152
+
153
+ Smart contracts generated by Ginie should be reviewed by a qualified developer before production deployment. Security scores are indicative and do not constitute a formal audit.