Ginie — Smart Contract LLM
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.
What is Ginie?
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.
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).
Canton Network processes $6 trillion in tokenised assets, backed by Goldman Sachs, JPMorgan, and DTCC. Every institution building on it needs smart contracts. Ginie writes them.
Quickstart
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("GinieAI/Solidity-LLM")
5model = AutoModelForCausalLM.from_pretrained(
6 "GinieAI/Solidity-LLM",
7 torch_dtype=torch.bfloat16,
8 device_map="auto"
9)
10
11prompt = """### Instruction:
12Write a Solidity ERC20 token contract with minting, burning, and owner controls.
13
14### Response:
15"""
16
17inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
18outputs = model.generate(
19 **inputs,
20 max_new_tokens=800,
21 temperature=0.7,
22 do_sample=True,
23 pad_token_id=tokenizer.eos_token_id
24)
25
26print(tokenizer.decode(outputs[0], skip_special_tokens=True))
npm SDK — 30,000+ active weekly downloads
1import { Ginie } from 'ginie-sdk'
2
3const ginie = new Ginie({ apiKey: 'your-key' })
4
5const contract = await ginie.generate({
6 prompt: 'ERC20 token with vesting schedule for a startup',
7 chain: 'ethereum',
8 audit: true
9})
10
11console.log(contract.code)
12console.log(contract.securityScore)
13console.log(contract.compiled)
Model Details
Model Description
- Developed by: Ginie AI
- Model type: Causal LM — Code Generation
- Language: English instructions → Solidity / Daml
- Parameters: 2 Billion
- Architecture: 32 Transformer blocks
- Context length: 2048 tokens
- Precision: bfloat16
- Tokenizer: GPT2Tokenizer
- Finetuned from: Chain-GPT/Solidity-LLM
- License: MIT
Model Sources
Uses
Direct Use
- ERC20, ERC721, ERC1155 token contracts
- DeFi protocols — staking, liquidity pools, yield farming
- DAO and governance contracts
- Multisig wallets and escrow agreements
- NFT marketplaces
- Automated compliance and audit loops
Downstream Use
- Integrated into IDEs and smart contract development platforms
- Embedded in agentic pipelines for autonomous contract deployment
- npm SDK for direct integration in any JavaScript or TypeScript project
Out-of-Scope Use
- Production deployment without expert review
- Formal legal or compliance auditing
- Non-code generation tasks
Bias, Risks, and Limitations
- May reflect patterns from web-scraped Solidity including outdated or insecure practices
- Can generate syntactically valid but logically incorrect contracts
- Security score is indicative — not a substitute for a professional audit
- All generated contracts must be reviewed before mainnet deployment
How to Get Started
See the
Quickstart section above. For streaming output:
1from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("GinieAI/Solidity-LLM")
5model = AutoModelForCausalLM.from_pretrained(
6 "GinieAI/Solidity-LLM",
7 torch_dtype=torch.bfloat16,
8 device_map="auto"
9)
10
11prompt = """### Instruction:
12Write a Solidity staking contract with reward distribution.
13
14### Response:
15"""
16
17inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
18streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
19
20model.generate(
21 **inputs,
22 max_new_tokens=1000,
23 temperature=0.7,
24 do_sample=True,
25 streamer=streamer,
26 pad_token_id=tokenizer.eos_token_id
27)
Training Details
Training Data
- AlfredPros/smart-contracts-instructions — 6,000 instruction-output pairs
- Filtered: Solidity >= 0.5, token length 200–4000, compilable contracts only
- Deduplicated and validated before training
Training Procedure
- Method: LoRA fine-tuning (rank 16, alpha 16)
- Base: Chain-GPT/Solidity-LLM → Salesforce/codegen-2B-multi
- Epochs: 3
- Precision: bfloat16
- Framework: Unsloth + HuggingFace TRL
- Validation: Slither static analysis + solc compilation check
Evaluation
Evaluated on 100 held-out Solidity prompts. Compilation measured via
solc. Security measured via
Slither.
| Metric | Ginie v1 | GPT-4o mini | DeepSeek-Coder-7B |
|---|
| Compilation rate | 83% | 78% | 75% |
| OpenZeppelin compliance | 65% | 61% | 58% |
| Gas efficiency | 72% | 65% | 63% |
| Security score | 58% | 54% | 51% |
Ginie achieves the highest compilation rate at 2B parameters — domain specialisation over general-purpose scale.
Chains Supported
| Blockchain | Language | Status |
|---|
| Ethereum | Solidity | Live |
| Avalanche | Solidity | Live |
| Camp Network | Solidity | Live |
| Canton Network | Daml | v3 roadmap |
| Vara Network | Rust | v3 roadmap |
Roadmap
| Version | What ships |
|---|
| v1.0 (current) | Solidity generation — 2B params, 83% compile rate |
| v2.0 | Expanded corpus — DISL + Zellic, 7,800+ examples, security score 70%+ |
| v3.0 | Daml + Rust — Canton Network and Vara Network |
| v4.0 | Weekly retraining flywheel on verified user prompts |
Citation
1@misc{ginie2025,
2 title = {Ginie: Smart Contract LLM for Institutional Blockchain},
3 author = {Ginie AI},
4 year = {2025},
5 url = {https://huggingface.co/GinieAI/Solidity-LLM},
6 note = {Fine-tuned from Chain-GPT/Solidity-LLM (Salesforce/codegen-2B-multi)}
7}
License and Attribution
Released under the MIT License. Built on
Chain-GPT/Solidity-LLM by ChainGPT, fine-tuned from
Salesforce/codegen-2B-multi. Full credit to the original authors.
Smart contracts generated by Ginie require expert review before production deployment. Security scores are indicative and do not constitute a formal audit.