Instructions to use gatilin/kanana-2-vision-encoder-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gatilin/kanana-2-vision-encoder-tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="gatilin/kanana-2-vision-encoder-tiny", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gatilin/kanana-2-vision-encoder-tiny", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Kanana-2 Vision Encoder Tiny
Powered by Kanana
Community mirror of Kakao's Kanana-2 Vision Encoder Tiny, revision df5f3b7752af77d2cccdaea78aac1a5aa3344e58. This is a standalone 98M-parameter visual feature extractor, not a full multimodal language model. The safetensors file is byte-identical to the official file and was checked against its source LFS SHA-256. The original configuration, processor and model implementation are included unmodified; component.py is the added convenience loader.
Loading
Install PyTorch, torchvision, Transformers, accelerate, safetensors and Pillow. Download the repository and use:
import sys, torch
from PIL import Image
from huggingface_hub import snapshot_download
root = snapshot_download('gatilin/kanana-2-vision-encoder-tiny')
sys.path.insert(0, root)
from component import load_model, load_processor
model = load_model(root)
processor = load_processor(root)
inputs = processor(images=Image.open('image.jpg').convert('RGB'), return_tensors='pt')
inputs['pixel_values'] = inputs['pixel_values'].to(next(model.parameters()).dtype)
with torch.inference_mode():
features = model(**inputs).last_hidden_state
See validation.json for the real-image CPU smoke test; it is not an end-to-end VLM or GPU parity evaluation.
License and use restrictions
The Kanana Open License Agreement applies, including its prohibited-use policy and redistribution conditions. Uses must comply with applicable laws and Kakao's Guidelines for Responsible AI as required by section 2.2. Certain commercial services require a separate license. The required copyright notice is included in NOTICE.
- Downloads last month
- 14
Model tree for gatilin/kanana-2-vision-encoder-tiny
Base model
kakaocorp/kanana-2-vision-encoder-tiny