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
Download clef_runtime/cache.py from Aikimi/clef-nf4: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/Aikimi/clef-nf4/resolve/main/clef_runtime/cache.py
- Command line
-
hf download hf://Aikimi/clef-nf4/clef_runtime/cache.py
-
curl -L -o cache.py https://huggingface.co/Aikimi/clef-nf4/resolve/main/clef_runtime/cache.py
1.35 kB
| """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", | |
| } | |