Text Classification
Transformers
Safetensors
English
qwen3_5
image-text-to-text
decision-model
jev
nimble
qwen3.5
calibration
negative-control
structured-prediction
Instructions to use richardyoung/Bev-9B-inverted with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use richardyoung/Bev-9B-inverted with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="richardyoung/Bev-9B-inverted")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("richardyoung/Bev-9B-inverted") model = AutoModelForMultimodalLM.from_pretrained("richardyoung/Bev-9B-inverted", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download serving_schema.py from richardyoung/Bev-9B-inverted: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/richardyoung/Bev-9B-inverted/resolve/main/serving_schema.py
- Command line
-
hf download hf://richardyoung/Bev-9B-inverted/serving_schema.py
-
curl -L -o serving_schema.py https://huggingface.co/richardyoung/Bev-9B-inverted/resolve/main/serving_schema.py
1.03 kB
| """Serving extension for 255 candidates without changing legacy training prompts. | |
| Also shipped as a standalone module in the v2 Hugging Face package. | |
| """ | |
| if __package__: | |
| from . import extended_schema, parallel_schema | |
| else: | |
| import extended_schema | |
| import parallel_schema | |
| MAX_CHOICES = 255 | |
| choice_key = parallel_schema.choice_key | |
| validate_schema = extended_schema.validate_schema | |
| def codes_for(count, tokenizer): | |
| if type(count) is not int or not 1 <= count <= MAX_CHOICES: | |
| raise ValueError(f"Candidate count must be between 1 and {MAX_CHOICES}") | |
| return extended_schema.codes_for(count, tokenizer) | |
| parse_schema = extended_schema.parse_schema | |
| def prepare_prompts(tokenizer, context, schema, max_input_tokens, system_role=True): | |
| validate_schema(schema) | |
| width = max(len(extended_schema.choices_for(field)) for field in schema.values()) | |
| module = parallel_schema if width <= 26 else extended_schema | |
| return module.prepare_prompts(tokenizer, context, schema, max_input_tokens, system_role) | |