Text Generation
Transformers
Safetensors
English
Hindi
Spanish
qwen3_5
image-text-to-text
router
planner
orchestration
tool-use
structured-output
json
lora
qwen3.5
health-assistant
conversational
Instructions to use meet4150/xevyo-01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meet4150/xevyo-01 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meet4150/xevyo-01") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("meet4150/xevyo-01") model = AutoModelForMultimodalLM.from_pretrained("meet4150/xevyo-01", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meet4150/xevyo-01 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meet4150/xevyo-01" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meet4150/xevyo-01", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/meet4150/xevyo-01
- SGLang
How to use meet4150/xevyo-01 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "meet4150/xevyo-01" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meet4150/xevyo-01", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "meet4150/xevyo-01" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meet4150/xevyo-01", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use meet4150/xevyo-01 with Docker Model Runner:
docker model run hf.co/meet4150/xevyo-01
Download code/serve/vllm_schema.py from meet4150/xevyo-01: direct link, hf CLI and curl.
- Browser
- Download file 4.18 kB
-
https://huggingface.co/meet4150/xevyo-01/resolve/main/code/serve/vllm_schema.py
- Command line
-
hf download hf://meet4150/xevyo-01/code/serve/vllm_schema.py
-
curl -L -o vllm_schema.py https://huggingface.co/meet4150/xevyo-01/resolve/main/code/serve/vllm_schema.py
4.18 kB
| """The per-turn schema in the form vLLM 0.17 can decode. | |
| spec/validate.py `guided_schema(offered_tools)` is correct JSON Schema, but the grammar | |
| engines inside vLLM 0.17.0 (xgrammar 0.1.29, llguidance 1.3.0) do not handle all of it: | |
| * `uniqueItems` (on `directives`): the server answers HTTP 400 | |
| `Grammar error: Unimplemented keys: ["uniqueItems"]`. | |
| * a number with a lower bound and no upper bound (`{"type":"number","exclusiveMinimum":0}`, | |
| used by weights, heights, doses, concentrations): xgrammar builds a grammar that | |
| cannot write any value between 0 and 1, and does allow 0. Asked for 0.5, the model | |
| is forced to write 0. A wrong dose input is worse than an unchecked one. | |
| * `maxLength` (39 string fields): correct, but it is what makes the grammar huge. | |
| With it, xgrammar needs 7-21 s to compile one schema (13 s for 17 offered tools, | |
| 21 s for all 22) and the compiled grammar is 93-663 MB, so vLLM's 512 MB grammar | |
| cache holds one schema at most: every change of the offered tool set costs the | |
| compile again, on the request path. Without `maxLength` the same schemas compile | |
| in 0.2-0.3 s to 7-17 MB. Runaway strings are still stopped by `max_tokens`. | |
| `for_vllm` removes exactly those three things and nothing else. The removed rules are | |
| not lost: spec/validate.py checks the full schema on every decoded plan (duplicate | |
| directives, numbers that must be above zero, string lengths), so ALWAYS validate | |
| after decoding. `for_vllm(schema, keep_max_length=True)` keeps the lengths for a | |
| caller that sends one fixed schema and can afford the compile at start-up. | |
| from serve.vllm_schema import plan_schema, response_format | |
| body["response_format"] = response_format(offered_tools) | |
| Standard library + spec/validate.py (jsonschema). | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "spec")) | |
| import validate | |
| REJECTED_KEYWORDS = {"uniqueItems"} | |
| SLOW_KEYWORDS = {"maxLength"} | |
| LOWER_BOUNDS = ("minimum", "exclusiveMinimum") | |
| UPPER_BOUNDS = ("maximum", "exclusiveMaximum") | |
| def strip_keywords(schema, names): | |
| """A copy of `schema` without the given keywords. Property NAMES are never touched.""" | |
| if isinstance(schema, dict): | |
| out = {} | |
| for key, value in schema.items(): | |
| if key in names: | |
| continue | |
| if key == "properties" and isinstance(value, dict): | |
| out[key] = {prop: strip_keywords(sub, names) for prop, sub in value.items()} | |
| else: | |
| out[key] = strip_keywords(value, names) | |
| return out | |
| if isinstance(schema, list): | |
| return [strip_keywords(item, names) for item in schema] | |
| return schema | |
| def _drop_open_lower_bounds(schema): | |
| if isinstance(schema, dict): | |
| out = {} | |
| kinds = schema.get("type") | |
| kinds = kinds if isinstance(kinds, list) else [kinds] | |
| open_number = "number" in kinds and not any(k in schema for k in UPPER_BOUNDS) | |
| for key, value in schema.items(): | |
| if open_number and key in LOWER_BOUNDS: | |
| continue | |
| if key == "properties" and isinstance(value, dict): | |
| out[key] = {prop: _drop_open_lower_bounds(sub) for prop, sub in value.items()} | |
| else: | |
| out[key] = _drop_open_lower_bounds(value) | |
| return out | |
| if isinstance(schema, list): | |
| return [_drop_open_lower_bounds(item) for item in schema] | |
| return schema | |
| def for_vllm(schema, keep_max_length=False): | |
| """`schema` without the keywords vLLM 0.17 rejects, decodes wrongly or compiles slowly.""" | |
| drop = REJECTED_KEYWORDS if keep_max_length else REJECTED_KEYWORDS | SLOW_KEYWORDS | |
| return _drop_open_lower_bounds(strip_keywords(schema, drop)) | |
| def plan_schema(offered_tools): | |
| """The schema to send for a turn that offers `offered_tools`.""" | |
| return for_vllm(validate.guided_schema(offered_tools)) | |
| def response_format(offered_tools): | |
| """The `response_format` field of a chat completion request (the method that works).""" | |
| return {"type": "json_schema", | |
| "json_schema": {"name": "turn_plan", "schema": plan_schema(offered_tools), "strict": True}} | |