Image-Text-to-Text
Transformers
Safetensors
qwen2_5_vl
qwen3_vl
vision-language
visual-token-pruning
visionzip
scopd
Instructions to use enmingzhangzz/SCOPD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use enmingzhangzz/SCOPD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="enmingzhangzz/SCOPD")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("enmingzhangzz/SCOPD", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use enmingzhangzz/SCOPD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "enmingzhangzz/SCOPD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "enmingzhangzz/SCOPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/enmingzhangzz/SCOPD
- SGLang
How to use enmingzhangzz/SCOPD with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "enmingzhangzz/SCOPD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "enmingzhangzz/SCOPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "enmingzhangzz/SCOPD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "enmingzhangzz/SCOPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use enmingzhangzz/SCOPD with Docker Model Runner:
docker model run hf.co/enmingzhangzz/SCOPD
Download evaluation/runtime/prepare.py from enmingzhangzz/SCOPD: direct link, hf CLI and curl.
- Browser
- Download file 2.44 kB
-
https://huggingface.co/enmingzhangzz/SCOPD/resolve/main/evaluation/runtime/prepare.py
- Command line
-
hf download hf://enmingzhangzz/SCOPD/evaluation/runtime/prepare.py
-
curl -L -o prepare.py https://huggingface.co/enmingzhangzz/SCOPD/resolve/main/evaluation/runtime/prepare.py
2.44 kB
| """Reconstruct the hash-pinned evaluation Transformers tree.""" | |
| import argparse | |
| import hashlib | |
| import json | |
| from pathlib import Path | |
| import shutil | |
| import subprocess | |
| import sys | |
| from zipfile import ZipFile | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def main(): | |
| parser = argparse.ArgumentParser(description=__doc__) | |
| parser.add_argument('--mode', choices=['eval', 'qwen3'], default='eval') | |
| parser.add_argument('--wheel', type=Path) | |
| args = parser.parse_args() | |
| manifest = json.loads((ROOT / 'runtime/manifest.json').read_text()) | |
| cache = ROOT / '.runtime/downloads' | |
| cache.mkdir(parents=True, exist_ok=True) | |
| wheel = args.wheel or cache / 'transformers-4.57.0-py3-none-any.whl' | |
| if not wheel.exists(): | |
| subprocess.run([sys.executable, '-m', 'pip', 'download', '--no-deps', | |
| '--dest', str(cache), 'transformers==4.57.0'], check=True) | |
| if hashlib.sha256(wheel.read_bytes()).hexdigest() != manifest['wheel_sha256']: | |
| raise ValueError('Transformers wheel hash mismatch') | |
| target = ROOT / f'.runtime/{args.mode}/src' | |
| source_hashes = {} | |
| with ZipFile(wheel) as archive: | |
| for member in archive.infolist(): | |
| if member.filename.startswith('transformers/') and not member.is_dir(): | |
| if '..' in Path(member.filename).parts: | |
| raise ValueError('Unsafe wheel member') | |
| dest = target / member.filename | |
| dest.parent.mkdir(parents=True, exist_ok=True) | |
| dest.write_bytes(archive.read(member)) | |
| if args.mode == 'qwen3' and member.filename.endswith('.py'): | |
| source_hashes[member.filename] = hashlib.sha256(archive.read(member)).hexdigest() | |
| if args.mode == 'qwen3': | |
| (target.parent / 'source_manifest.json').write_text(json.dumps({ | |
| 'wheel_sha256': manifest['wheel_sha256'], 'files': source_hashes}, indent=2) + '\n') | |
| for relative, expected in (manifest['overlays']['eval'] if args.mode == 'eval' else {}).items(): | |
| src = ROOT / 'runtime/overlays/eval' / relative | |
| if hashlib.sha256(src.read_bytes()).hexdigest() != expected: | |
| raise ValueError(f'Overlay hash mismatch: {relative}') | |
| dest = target / relative | |
| dest.parent.mkdir(parents=True, exist_ok=True) | |
| shutil.copyfile(src, dest) | |
| print('Evaluation runtime prepared and verified') | |
| if __name__ == '__main__': | |
| main() | |