Instructions to use trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6") 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("trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6") model = AutoModelForImageTextToText.from_pretrained("trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6") 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 trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6", "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/trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6
- SGLang
How to use trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6 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 "trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6" \ --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": "trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6", "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 "trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6" \ --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": "trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6", "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 trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6 with Docker Model Runner:
docker model run hf.co/trl-internal-testing/tiny-Qwen3_5MoeForConditionalGeneration-3.6
Upload processor
Browse files- processor_config.json +4 -1
- tokenizer.json +2 -2
- tokenizer_config.json +1 -2
processor_config.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"image_processor": {
|
|
|
|
| 3 |
"do_convert_rgb": true,
|
| 4 |
"do_normalize": true,
|
| 5 |
"do_rescale": true,
|
|
@@ -9,7 +10,7 @@
|
|
| 9 |
0.5,
|
| 10 |
0.5
|
| 11 |
],
|
| 12 |
-
"image_processor_type": "
|
| 13 |
"image_std": [
|
| 14 |
0.5,
|
| 15 |
0.5,
|
|
@@ -27,6 +28,8 @@
|
|
| 27 |
},
|
| 28 |
"processor_class": "Qwen3VLProcessor",
|
| 29 |
"video_processor": {
|
|
|
|
|
|
|
| 30 |
"do_convert_rgb": true,
|
| 31 |
"do_normalize": true,
|
| 32 |
"do_rescale": true,
|
|
|
|
| 1 |
{
|
| 2 |
"image_processor": {
|
| 3 |
+
"data_format": "channels_first",
|
| 4 |
"do_convert_rgb": true,
|
| 5 |
"do_normalize": true,
|
| 6 |
"do_rescale": true,
|
|
|
|
| 10 |
0.5,
|
| 11 |
0.5
|
| 12 |
],
|
| 13 |
+
"image_processor_type": "Qwen2VLImageProcessorFast",
|
| 14 |
"image_std": [
|
| 15 |
0.5,
|
| 16 |
0.5,
|
|
|
|
| 28 |
},
|
| 29 |
"processor_class": "Qwen3VLProcessor",
|
| 30 |
"video_processor": {
|
| 31 |
+
"data_format": "channels_first",
|
| 32 |
+
"default_to_square": true,
|
| 33 |
"do_convert_rgb": true,
|
| 34 |
"do_normalize": true,
|
| 35 |
"do_rescale": true,
|
tokenizer.json
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:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4
|
| 3 |
+
size 19989343
|
tokenizer_config.json
CHANGED
|
@@ -10,7 +10,6 @@
|
|
| 10 |
"errors": "replace",
|
| 11 |
"image_token": "<|image_pad|>",
|
| 12 |
"is_local": false,
|
| 13 |
-
"local_files_only": false,
|
| 14 |
"model_max_length": 262144,
|
| 15 |
"model_specific_special_tokens": {
|
| 16 |
"audio_bos_token": "<|audio_start|>",
|
|
@@ -25,7 +24,7 @@
|
|
| 25 |
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 26 |
"processor_class": "Qwen3VLProcessor",
|
| 27 |
"split_special_tokens": false,
|
| 28 |
-
"tokenizer_class": "
|
| 29 |
"unk_token": null,
|
| 30 |
"video_token": "<|video_pad|>",
|
| 31 |
"vision_bos_token": "<|vision_start|>",
|
|
|
|
| 10 |
"errors": "replace",
|
| 11 |
"image_token": "<|image_pad|>",
|
| 12 |
"is_local": false,
|
|
|
|
| 13 |
"model_max_length": 262144,
|
| 14 |
"model_specific_special_tokens": {
|
| 15 |
"audio_bos_token": "<|audio_start|>",
|
|
|
|
| 24 |
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 25 |
"processor_class": "Qwen3VLProcessor",
|
| 26 |
"split_special_tokens": false,
|
| 27 |
+
"tokenizer_class": "TokenizersBackend",
|
| 28 |
"unk_token": null,
|
| 29 |
"video_token": "<|video_pad|>",
|
| 30 |
"vision_bos_token": "<|vision_start|>",
|