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")# pip install -U transformers accelerate # 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
File size: 1,031 Bytes
87edecd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | """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)
|