File size: 10,809 Bytes
4c66790
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ea7fab7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4c66790
 
 
 
 
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
---
pipeline_tag: text-generation
base_model: ibm-granite/granite-3b-code-base
license: apache-2.0
datasets:
  - bigcode/commitpackft
  - TIGER-Lab/MathInstruct
  - meta-math/MetaMathQA
  - glaiveai/glaive-code-assistant-v3
  - glaive-function-calling-v2
  - bugdaryan/sql-create-context-instruction
  - garage-bAInd/Open-Platypus
  - nvidia/HelpSteer
metrics:
  - code_eval
library_name: transformers
tags:
  - code
  - granite
model-index:
  - name: granite-3b-code-instruct
    results:
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalSynthesis(Python)
        metrics:
          - name: pass@1
            type: pass@1
            value: 51.2
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalSynthesis(JavaScript)
        metrics:
          - name: pass@1
            type: pass@1
            value: 43.9
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalSynthesis(Java)
        metrics:
          - name: pass@1
            type: pass@1
            value: 41.5
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalSynthesis(Go)
        metrics:
          - name: pass@1
            type: pass@1
            value: 31.7
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalSynthesis(C++)
        metrics:
          - name: pass@1
            type: pass@1
            value: 40.2
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalSynthesis(Rust)
        metrics:
          - name: pass@1
            type: pass@1
            value: 29.3
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalExplain(Python)
        metrics:
          - name: pass@1
            type: pass@1
            value: 39.6
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalExplain(JavaScript)
        metrics:
          - name: pass@1
            type: pass@1
            value: 26.8
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalExplain(Java)
        metrics:
          - name: pass@1
            type: pass@1
            value: 39
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalExplain(Go)
        metrics:
          - name: pass@1
            type: pass@1
            value: 14
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalExplain(C++)
        metrics:
          - name: pass@1
            type: pass@1
            value: 23.8
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalExplain(Rust)
        metrics:
          - name: pass@1
            type: pass@1
            value: 12.8
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalFix(Python)
        metrics:
          - name: pass@1
            type: pass@1
            value: 26.8
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalFix(JavaScript)
        metrics:
          - name: pass@1
            type: pass@1
            value: 28
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalFix(Java)
        metrics:
          - name: pass@1
            type: pass@1
            value: 33.5
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalFix(Go)
        metrics:
          - name: pass@1
            type: pass@1
            value: 27.4
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalFix(C++)
        metrics:
          - name: pass@1
            type: pass@1
            value: 31.7
            veriefied: false
      - task:
          type: text-generation
        dataset:
          type: bigcode/humanevalpack
          name: HumanEvalFix(Rust)
        metrics:
          - name: pass@1
            type: pass@1
            value: 16.5
            veriefied: false
---

![image/png](https://cdn-uploads.huggingface.co/production/uploads/64a28db2f1968b7d7f357182/kaudiTlvRQBA5NSeq4BbM.png)
*This model was quantized by [SanctumAI](https://sanctum.ai). To leave feedback, join our community in [Discord](https://discord.gg/7ZNE78HJKh).*

# Granite 3B Code Instruct GGUF

**Model creator:** [ibm-granite](https://huggingface.co/ibm-granite)<br>
**Original model**: [granite-3b-code-instruct](https://huggingface.co/ibm-granite/granite-3b-code-instruct)<br>

## Model Summary:

**Granite-3B-Code-Instruct** is a 3B parameter model fine tuned from *Granite-3B-Code-Base* on a combination of **permissively licensed** instruction data to enhance instruction following capabilities including logical reasoning and problem-solving skills.

- **Developers:** IBM Research
- **GitHub Repository:** [ibm-granite/granite-code-models](https://github.com/ibm-granite/granite-code-models)
- **Paper:** [Granite Code Models: A Family of Open Foundation Models for Code Intelligence](https://arxiv.org/abs/2405.04324)
- **Release Date**: May 6th, 2024
- **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).

## Prompt Template:

If you're using Sanctum app, simply use `IBM Granite Code` model preset.

Prompt template:

```
System:
{system_prompt}
Question:
{prompt}
Answer:

```

## Hardware Requirements Estimate

| Name | Quant method | Size | Memory (RAM, vRAM) required (for full context of 32k tokens) |
| ---- | ---- | ---- | ---- |
| [granite-3b-code-instruct.Q2_K.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q2_K.gguf) | Q2_K | 1.34 GB | 4.68 GB |
| [granite-3b-code-instruct.Q3_K_S.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q3_K_S.gguf) | Q3_K_S | 1.55 GB | ? |
| [granite-3b-code-instruct.Q3_K_M.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q3_K_M.gguf) | Q3_K_M | 1.73 GB | ? |
| [granite-3b-code-instruct.Q3_K_L.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q3_K_L.gguf) | Q3_K_L | 1.88 GB | ? |
| [granite-3b-code-instruct.Q4_0.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q4_0.gguf) | Q4_0 | 2.00 GB | ? |
| [granite-3b-code-instruct.Q4_K_S.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q4_K_S.gguf) | Q4_K_S | 2.01 GB | ? |
| [granite-3b-code-instruct.Q4_K_M.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q4_K_M.gguf) | Q4_K_M | 2.13 GB | ? |
| [granite-3b-code-instruct.Q4_K.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q4_K.gguf) | Q4_K | 2.13 GB | ? |
| [granite-3b-code-instruct.Q4_1.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q4_1.gguf) | Q4_1 | 2.21 GB | ? |
| [granite-3b-code-instruct.Q5_0.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q5_0.gguf) | Q5_0 | 2.42 GB | ? |
| [granite-3b-code-instruct.Q5_K_S.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q5_K_S.gguf) | Q5_K_S | 2.42 GB | ? |
| [granite-3b-code-instruct.Q5_K_M.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q5_K_M.gguf) | Q5_K_M | 2.49 GB | ? |
| [granite-3b-code-instruct.Q5_K.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q5_K.gguf) | Q5_K | 2.49 GB | ? |
| [granite-3b-code-instruct.Q5_1.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q5_1.gguf) | Q5_1 | 2.63 GB | ? |
| [granite-3b-code-instruct.Q6_K.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q6_K.gguf) | Q6_K | 2.86 GB | ? |
| [granite-3b-code-instruct.Q8_0.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.Q8_0.gguf) | Q8_0 | 3.71 GB | ? |
| [granite-3b-code-instruct.f16.gguf](https://huggingface.co/SanctumAI/granite-3b-code-instruct-GGUF/blob/main/granite-3b-code-instruct.f16.gguf) | f16 | 6.97 GB | 4.68 GB |

## Disclaimer

Sanctum is not the creator, originator, or owner of any Model featured in the Models section of the Sanctum application. Each Model is created and provided by third parties. Sanctum does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Model listed there. You understand that supported Models can produce content that might be offensive, harmful, inaccurate or otherwise inappropriate, or deceptive. Each Model is the sole responsibility of the person or entity who originated such Model. Sanctum may not monitor or control the Models supported and cannot, and does not, take responsibility for any such Model. Sanctum disclaims all warranties or guarantees about the accuracy, reliability or benefits of the Models. Sanctum further disclaims any warranty that the Model will meet your requirements, be secure, uninterrupted or available at any time or location, or error-free, viruses-free, or that any errors will be corrected, or otherwise. You will be solely responsible for any damage resulting from your use of or access to the Models, your downloading of any Model, or use of any other Model provided by or through Sanctum.