Made the model card better
#1
by SatyamSinghal - opened
README.md
CHANGED
|
@@ -1,51 +1,44 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 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 |
[](https://ginie.xyz)
|
|
|
|
| 22 |
[](https://opensource.org/licenses/MIT)
|
| 23 |
-
[](https://ginie.xyz)
|
| 6 |
+
[](https://npmjs.com/package/ginie-sdk)
|
| 7 |
[](https://opensource.org/licenses/MIT)
|
| 8 |
+
[](https://huggingface.co/spaces/GinieAI/Ginie-Demo)
|
| 9 |
+
[](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.
|