Instructions to use immanuelpeter/DeepSeek-ViT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use immanuelpeter/DeepSeek-ViT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="immanuelpeter/DeepSeek-ViT")# pip install -U transformers accelerate # Load model directly from transformers import DeepSeekV41ViT model = DeepSeekV41ViT.from_pretrained("immanuelpeter/DeepSeek-ViT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Sync card, example, and manifest with GitHub main
Browse files- examples/inference.py +4 -3
examples/inference.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import argparse
|
| 2 |
from pathlib import Path
|
| 3 |
-
import
|
| 4 |
|
| 5 |
from PIL import Image
|
| 6 |
import torch
|
|
@@ -8,8 +8,9 @@ from huggingface_hub import hf_hub_download
|
|
| 8 |
from safetensors.torch import load_file
|
| 9 |
from torchvision import transforms
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
MODEL_ID = "immanuelpeter/DeepSeek-ViT"
|
|
|
|
| 1 |
import argparse
|
| 2 |
from pathlib import Path
|
| 3 |
+
import runpy
|
| 4 |
|
| 5 |
from PIL import Image
|
| 6 |
import torch
|
|
|
|
| 8 |
from safetensors.torch import load_file
|
| 9 |
from torchvision import transforms
|
| 10 |
|
| 11 |
+
BUNDLE = Path(__file__).absolute().parents[1]
|
| 12 |
+
module = runpy.run_path(str(BUNDLE / "vision.py"))
|
| 13 |
+
Aligner, ViT = module["Aligner"], module["ViT"]
|
| 14 |
|
| 15 |
|
| 16 |
MODEL_ID = "immanuelpeter/DeepSeek-ViT"
|