Any-to-Any
Transformers
Safetensors
multilingual
spev
feature-extraction
multimodal
text
audio
image
video
decision-model
choice
qwen3-omni
lora
custom-code
custom_code
Instructions to use SpragAI/SPEV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SpragAI/SPEV with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SpragAI/SPEV", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_spev.py from SpragAI/SPEV: direct link, hf CLI and curl.
- Browser
- Download file 1.75 kB
-
https://huggingface.co/SpragAI/SPEV/resolve/main/configuration_spev.py
- Command line
-
hf download hf://SpragAI/SPEV/configuration_spev.py
-
curl -L -o configuration_spev.py https://huggingface.co/SpragAI/SPEV/resolve/main/configuration_spev.py
1.75 kB
| """Configuration for the SPEV multimodal decision model.""" | |
| import math | |
| from typing import ClassVar | |
| from transformers import PretrainedConfig, Qwen3OmniMoeThinkerConfig | |
| class SPEVConfig(PretrainedConfig): | |
| model_type = "spev" | |
| sub_configs: ClassVar[dict] = {"thinker_config": Qwen3OmniMoeThinkerConfig} | |
| def __init__( | |
| self, | |
| thinker_config=None, | |
| adapter_rank=32, | |
| adapter_alpha=64, | |
| head_width=256, | |
| temperature=1.0, | |
| max_tokens=8192, | |
| **kwargs, | |
| ): | |
| if isinstance(thinker_config, dict): | |
| thinker_config = Qwen3OmniMoeThinkerConfig(**thinker_config) | |
| self.thinker_config = thinker_config or Qwen3OmniMoeThinkerConfig() | |
| for name, value in ( | |
| ("adapter_rank", adapter_rank), | |
| ("head_width", head_width), | |
| ("max_tokens", max_tokens), | |
| ): | |
| if not isinstance(value, int) or isinstance(value, bool) or value <= 0: | |
| raise ValueError(f"{name} must be a positive integer") | |
| if not math.isfinite(adapter_alpha) or adapter_alpha <= 0: | |
| raise ValueError("adapter_alpha must be positive and finite") | |
| if not math.isfinite(temperature) or temperature <= 0: | |
| raise ValueError("temperature must be positive and finite") | |
| self.adapter_rank = adapter_rank | |
| self.adapter_alpha = adapter_alpha | |
| self.head_width = head_width | |
| self.temperature = temperature | |
| self.max_tokens = max_tokens | |
| kwargs.setdefault("tie_word_embeddings", False) | |
| super().__init__(**kwargs) | |
| def get_text_config(self, decoder=False, encoder=False): | |
| return self.thinker_config.text_config | |
| SPEVConfig.register_for_auto_class() | |