File size: 1,454 Bytes
b205b38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: bigcode-openrail-m
library_name: openvino
tags:
  - openvino
  - int8
  - text-generation
  - starcoder
  - code
  - llm
---

# StarCoder2-7B OpenVINO (INT8)

OpenVINO IR conversion of [bigcode/starcoder2-7b](https://huggingface.co/bigcode/starcoder2-7b) with weight-only INT8 quantization, produced on CPU-only Kaggle with `optimum-cli` (fully offline, token-free).

- Base model: `bigcode/starcoder2-7b` (Starcoder2ForCausalLM, 7B params, BigCode OpenRAIL-M v1)
- Task: `text-generation`
- Precision: weights INT8 (NNCF), activations FP16/FP32 as traced
- Converted with: `optimum-intel 2.2.0`, `openvino 2026.4.1`, `transformers 5.16.1`
- Specialization: code completion (fill-in-the-middle, 8k context)

## Usage

### optimum-intel

```python
from optimum.intel import OVModelForCausalLM
from transformers import AutoTokenizer

model = OVModelForCausalLM.from_pretrained("Nekodeus/starcoder2-7b-openvino")
tok = AutoTokenizer.from_pretrained("Nekodeus/starcoder2-7b-openvino", trust_remote_code=True)
inputs = tok("def fibonacci(n):\n    if n <= 1:\n        return", return_tensors="pt")
print(tok.decode(model.generate(**inputs, max_new_tokens=64)[0]))
```

### OpenVINO GenAI

```cpp
ov::genai::LLMPipeline pipe("path/to/Nekodeus/starcoder2-7b-openvino", "CPU");
```

## Reproduce

```bash
optimum-cli export openvino \
  --model bigcode/starcoder2-7b \
  --task text-generation \
  --weight-format int8 \
  starcoder2-7b-openvino
```