Zero-Shot Classification
Transformers
qwen3_5
feature-extraction
decision-model
system-one
semantic-router
vela
token-classification
named-entity-recognition
relation-extraction
pii-detection
hallucination-detection
content-safety
multimodal
custom_code
Instructions to use vllm-sr/vela3-lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vllm-sr/vela3-lite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="vllm-sr/vela3-lite", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("vllm-sr/vela3-lite", trust_remote_code=True) model = AutoModel.from_pretrained("vllm-sr/vela3-lite", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Keep each thread's adapter gate to itself
#2
by subin - opened
- SHA256SUMS +1 -1
- vela3_adapters.py +2 -1
SHA256SUMS
CHANGED
|
@@ -17,7 +17,7 @@ e304705ed0bdf825cd1b88374fa80e1e3db26225857420226796f397d0ae5b60 router_questio
|
|
| 17 |
d2c5f2f446cf12d2f8a24dbf634452477088523b0973e1e07df244c851421efb span_decode_v2.py
|
| 18 |
9abec87ef24a0b1b3101ed1a4245859186a581a4efed49c5ce2c7a945f64b14f span_head.safetensors
|
| 19 |
11cc6312d4e5862bb665d71d14aa4887499cc23a956e4069fc837afaca8116be span_lora.safetensors
|
| 20 |
-
|
| 21 |
aa3508dfbf7942be09d35624ba64bd934bfa89513e10831cd141a43e3ebce96e vela3_config.json
|
| 22 |
b7fcefdd1a0b3e8ac22ac12338c72e76925688a989b5af6c70a104fa70122a39 vela3_labeldef.py
|
| 23 |
97d2448765a7ee5411dff44c601c3a073fdad9a9921f9818bac4135916081c20 vela3_span.py
|
|
|
|
| 17 |
d2c5f2f446cf12d2f8a24dbf634452477088523b0973e1e07df244c851421efb span_decode_v2.py
|
| 18 |
9abec87ef24a0b1b3101ed1a4245859186a581a4efed49c5ce2c7a945f64b14f span_head.safetensors
|
| 19 |
11cc6312d4e5862bb665d71d14aa4887499cc23a956e4069fc837afaca8116be span_lora.safetensors
|
| 20 |
+
2e88d7af591e3097a735ecbbb17fa6433aaa5b803e4b810cab6231e62ce3a2ee vela3_adapters.py
|
| 21 |
aa3508dfbf7942be09d35624ba64bd934bfa89513e10831cd141a43e3ebce96e vela3_config.json
|
| 22 |
b7fcefdd1a0b3e8ac22ac12338c72e76925688a989b5af6c70a104fa70122a39 vela3_labeldef.py
|
| 23 |
97d2448765a7ee5411dff44c601c3a073fdad9a9921f9818bac4135916081c20 vela3_span.py
|
vela3_adapters.py
CHANGED
|
@@ -11,12 +11,13 @@ from __future__ import annotations
|
|
| 11 |
|
| 12 |
import contextlib
|
| 13 |
import json
|
|
|
|
| 14 |
|
| 15 |
import torch
|
| 16 |
from torch import nn
|
| 17 |
|
| 18 |
|
| 19 |
-
class _Gate:
|
| 20 |
name = None # active adapter name, or None (all adapters off)
|
| 21 |
rows = None # None = every row of the batch; else a bool tensor [B]
|
| 22 |
|
|
|
|
| 11 |
|
| 12 |
import contextlib
|
| 13 |
import json
|
| 14 |
+
import threading
|
| 15 |
|
| 16 |
import torch
|
| 17 |
from torch import nn
|
| 18 |
|
| 19 |
|
| 20 |
+
class _Gate(threading.local): # per thread: concurrent requests never see each other's adapter
|
| 21 |
name = None # active adapter name, or None (all adapters off)
|
| 22 |
rows = None # None = every row of the batch; else a bool tensor [B]
|
| 23 |
|