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 Settings
- 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 Qwen3_5MoeForConditionalGeneration
Browse files- config.json +2 -2
- generation_config.json +6 -10
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -59,7 +59,7 @@
|
|
| 59 |
"vocab_size": 248320
|
| 60 |
},
|
| 61 |
"tie_word_embeddings": false,
|
| 62 |
-
"transformers_version": "5.
|
| 63 |
"video_token_id": 248057,
|
| 64 |
"vision_config": {
|
| 65 |
"deepstack_visual_indexes": [],
|
|
@@ -69,7 +69,7 @@
|
|
| 69 |
"in_channels": 3,
|
| 70 |
"initializer_range": 0.02,
|
| 71 |
"intermediate_size": 32,
|
| 72 |
-
"model_type": "
|
| 73 |
"num_heads": 4,
|
| 74 |
"num_position_embeddings": 2304,
|
| 75 |
"out_hidden_size": 16,
|
|
|
|
| 59 |
"vocab_size": 248320
|
| 60 |
},
|
| 61 |
"tie_word_embeddings": false,
|
| 62 |
+
"transformers_version": "5.2.0",
|
| 63 |
"video_token_id": 248057,
|
| 64 |
"vision_config": {
|
| 65 |
"deepstack_visual_indexes": [],
|
|
|
|
| 69 |
"in_channels": 3,
|
| 70 |
"initializer_range": 0.02,
|
| 71 |
"intermediate_size": 32,
|
| 72 |
+
"model_type": "qwen3_5_moe",
|
| 73 |
"num_heads": 4,
|
| 74 |
"num_position_embeddings": 2304,
|
| 75 |
"out_hidden_size": 16,
|
generation_config.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"bos_token_id": 248044,
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
"pad_token_id": 248044,
|
| 9 |
-
"temperature": 1.0,
|
| 10 |
-
"top_k": 20,
|
| 11 |
-
"top_p": 0.95,
|
| 12 |
-
"transformers_version": "5.7.0.dev0"
|
| 13 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
"bos_token_id": 248044,
|
| 4 |
+
"eos_token_id": 248044,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"transformers_version": "5.2.0",
|
| 8 |
+
"use_cache": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 16801224
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94d9044cc69166b4ae58c63e9f173e95408a33fa4733a983748b58ec433749a2
|
| 3 |
size 16801224
|