Instructions to use onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration") 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)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration") model = AutoModelForImageTextToText.from_pretrained("onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration
- SGLang
How to use onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration 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 "onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration" \ --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": "onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration" \ --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": "onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration with Docker Model Runner:
docker model run hf.co/onnx-internal-testing/tiny-random-Qwen3_5ForConditionalGeneration
v2 (#1)
Browse files- onnx/decoder_model_merged.onnx +2 -2
- onnx/decoder_model_merged.onnx_data +1 -1
- onnx/decoder_model_merged_fp16.onnx +3 -0
- onnx/decoder_model_merged_fp16.onnx_data +3 -0
- onnx/embed_tokens_fp16.onnx +3 -0
- onnx/embed_tokens_fp16.onnx_data +3 -0
- onnx/vision_encoder_fp16.onnx +3 -0
- onnx/vision_encoder_fp16.onnx_data +3 -0
onnx/decoder_model_merged.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f62ff47b408419208a31a64551c89bcb76c54e744518c2a7a3e3926f8622ca82
|
| 3 |
+
size 157865
|
onnx/decoder_model_merged.onnx_data
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 8138752
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e0f9b4f101b522671d60f81dd4ab1f704e46ddfd230d0ec1e6f96c2179aa3f5
|
| 3 |
size 8138752
|
onnx/decoder_model_merged_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8241cb7214fd9647723c57cdd873e96c1e6e6d9c0f545684495b5c4272d34d1
|
| 3 |
+
size 188786
|
onnx/decoder_model_merged_fp16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dacf62460fbead627e6010065ca9353bb4eee66e3c82af24b29895ee19c665ec
|
| 3 |
+
size 4063232
|
onnx/embed_tokens_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:700f5995f871f6d4509fa20a669edc54f8e6531c475238c686e4fd45ce99dec0
|
| 3 |
+
size 631
|
onnx/embed_tokens_fp16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4daceca7ca70ff8b95fd83093e8558e392a5488f086517500883c0f7c054594c
|
| 3 |
+
size 3973120
|
onnx/vision_encoder_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02b0993da7c6ee0a589375b3e8302625786cf824c805074dcdc37c053aae4bdf
|
| 3 |
+
size 59816
|
onnx/vision_encoder_fp16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e742aba6c9a8caa154927615cd7d3064c36bc4f7f2a207ed1b790ce625ab9d7e
|
| 3 |
+
size 1052672
|