Gemma-2-2b-it OpenVINO (INT8)

OpenVINO IR conversion of google/gemma-2-2b-it with weight-only INT8 quantization, produced on CPU-only Kaggle with optimum-cli (fully offline, token-free).

  • Base model: google/gemma-2-2b-it (Gemma2ForCausalLM, 2.6B params, Gemma license)
  • Task: text-generation (instruction-tuned)
  • Precision: weights INT8 (NNCF), activations FP16/FP32 as traced
  • Converted with: optimum-intel 2.2.0, openvino 2026.4.1, transformers 5.16.1
  • 8192 context, soft-capping attention (Gemma 2 architecture)
  • 3 IR parts: openvino_model, openvino_tokenizer, openvino_detokenizer

Usage

optimum-intel

from optimum.intel import OVModelForCausalLM
from transformers import AutoTokenizer

model = OVModelForCausalLM.from_pretrained("Nekodeus/gemma-2-2b-it-openvino")
tokenizer = AutoTokenizer.from_pretrained("Nekodeus/gemma-2-2b-it-openvino")
inputs = tokenizer("Explain photosynthesis in two sentences:", return_tensors="pt")
print(tokenizer.decode(model.generate(**inputs, max_new_tokens=64)[0]))

OpenVINO GenAI

ov::genai::LLMPipeline pipe("path/to/gemma-2-2b-it-openvino", "CPU");

Reproduce

optimum-cli export openvino \
  --model google/gemma-2-2b-it \
  --task text-generation \
  --weight-format int8 \
  gemma-2-2b-it-openvino

Note: built with transformers==5.16.1 pinned (Kaggle image ships 5.20.2, which removed VisionRotaryEmbedding that optimum-intel 2.2.0 imports) plus a bypass of optimum's legacy MAX_TRANSFORMERS_VERSION gate (needed for Gemma exporters).

Downloads last month
69
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support