Image Classification
Transformers
Safetensors
qwen3_5
feature-extraction
clef
bitsandbytes
quantized
4-bit precision
Instructions to use Aikimi/clef-nf4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aikimi/clef-nf4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Aikimi/clef-nf4") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("Aikimi/clef-nf4") model = AutoModel.from_pretrained("Aikimi/clef-nf4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,351 Bytes
aa77bd5 | 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 | """Storage location and fixed conversion provenance shared by release tools."""
from __future__ import annotations
import json
from pathlib import Path
from .core import MODELS, PROFILES
def cache_directory(root, profile):
settings = PROFILES[profile]
if settings["precision"] == "bf16":
return None
root = Path(root)
try:
storage = json.loads((root / "storage.json").read_text(encoding="utf-8"))
except FileNotFoundError:
base = root / "quantized"
except (OSError, ValueError) as exc:
raise ValueError("Clefのstorage.jsonを読み込めません。--cache-dirで保存先を設定し直してください。") from exc
else:
destination = storage.get("quantized") if isinstance(storage, dict) else None
if not isinstance(destination, str) or not Path(destination).is_absolute():
raise ValueError("Clefの量子化キャッシュ保存先は絶対パスで指定してください。")
base = Path(destination)
return base / f"{settings['model']}-{settings['precision']}"
def identity(profile):
settings = PROFILES[profile]
return {
**MODELS[settings["model"]],
"precision": settings["precision"],
"format": 1,
"transformers": "5.10.2",
"bitsandbytes": "0.50.2",
"vision": "bf16",
}
|