Text Classification
Transformers
Safetensors
English
qwen3_5
image-text-to-text
decision-model
classification
routing
custom-code
Instructions to use EpochEcho/decision-4b-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EpochEcho/decision-4b-preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="EpochEcho/decision-4b-preview")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("EpochEcho/decision-4b-preview") model = AutoModelForMultimodalLM.from_pretrained("EpochEcho/decision-4b-preview", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 695 Bytes
883a747 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """Adapter for the separately installed official Decision Index kit."""
from decision_index.engines import Engine, Unsupported
from model import DecisionModel
class ModelEngine(Engine):
name = "decision-4b-preview"
def __init__(self, **options):
super().__init__(**options)
self.model = DecisionModel(options.get("folder"))
def __call__(self, state, questions):
try:
response = self.model.decide({"state": state, "questions": questions})
except ValueError as error:
if "complete input exceeds limit" in str(error):
raise Unsupported(str(error)) from error
raise
return response, None
|