File size: 3,446 Bytes
abe9b06
 
4d2af68
abe9b06
4d2af68
abe9b06
 
7c5ab1c
abe9b06
7c5ab1c
abe9b06
4d2af68
abe9b06
4d2af68
 
 
abe9b06
4d2af68
 
 
 
7c5ab1c
4d2af68
abe9b06
4d2af68
7c5ab1c
abe9b06
4d2af68
 
abe9b06
7c5ab1c
4d2af68
 
 
 
 
 
 
abe9b06
 
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
 
 
 
 
7c5ab1c
abe9b06
 
 
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
 
 
 
 
 
 
 
 
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
 
 
 
 
 
 
 
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
 
 
 
 
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
 
 
 
 
 
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
abe9b06
7c5ab1c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Ginie — Smart Contract LLM

[![Website](https://img.shields.io/badge/Website-ginie.xyz-blue)](https://ginie.xyz)
[![npm](https://img.shields.io/badge/npm-30k%2B_weekly_downloads-red)](https://npmjs.com/package/ginie-sdk)
[![License](https://img.shields.io/badge/License-MIT-green)](https://opensource.org/licenses/MIT)
[![Demo](https://img.shields.io/badge/Demo-Live-brightgreen)](https://huggingface.co/spaces/GinieAI/Ginie-Demo)

Generate, compile, and deploy smart contracts from plain English. Built for Solidity, Daml (Canton Network), and Rust (Vara Network).

-----

## Quickstart

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

tokenizer = AutoTokenizer.from_pretrained("GinieAI/Solidity-LLM")
model = AutoModelForCausalLM.from_pretrained(
    "GinieAI/Solidity-LLM",
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

prompt = """### Instruction:
Write a Solidity ERC20 token with minting, burning, and owner controls.

### Response:
"""

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
    **inputs,
    max_new_tokens=800,
    temperature=0.7,
    do_sample=True,
    pad_token_id=tokenizer.eos_token_id
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

**npm SDK**

```bash
npm install ginie-sdk
```

```javascript
import { Ginie } from 'ginie-sdk'

const ginie = new Ginie({ apiKey: 'your-key' })

const contract = await ginie.generate({
  prompt: 'ERC20 token with vesting schedule',
  chain: 'ethereum',
  audit: true
})
```

-----

## Model

|Property      |Value                 |
|--------------|----------------------|
|Parameters    |2B                    |
|Architecture  |32 Transformer blocks |
|Context length|2048 tokens           |
|Precision     |bfloat16              |
|Tokenizer     |GPT-2                 |
|Base model    |Chain-GPT/Solidity-LLM|
|License       |MIT                   |

-----

## Performance

|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%              |

Evaluated on 100 prompts. Security via Slither static analysis.

-----

## Chains

|Chain                            |Language|Status|
|---------------------------------|--------|------|
|Ethereum, Avalanche, Camp Network|Solidity|Live  |
|Canton Network                   |Daml    |v3    |
|Vara Network                     |Rust    |v3    |

-----

## Roadmap

|Version|Ships                                  |
|-------|---------------------------------------|
|v1.0   |Solidity — 2B params                   |
|v2.0   |DISL + Zellic corpus — 7,800+ examples |
|v3.0   |Daml + Rust support                    |
|v4.0   |Weekly retraining flywheel on user data|

-----

## Attribution

Fine-tuned from [Chain-GPT/Solidity-LLM](https://huggingface.co/Chain-GPT/Solidity-LLM), itself based on [Salesforce/codegen-2B-multi](https://huggingface.co/Salesforce/codegen-2B-multi). MIT License.

-----

[ginie.xyz](https://ginie.xyz) · Canton Network processes $6T in tokenised assets backed by Goldman Sachs, JPMorgan, and DTCC.

> Generated contracts require expert review before production deployment.