Instructions to use Qwen/Qwen3.5-2B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen3.5-2B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Qwen/Qwen3.5-2B-Base") 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("Qwen/Qwen3.5-2B-Base") model = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3.5-2B-Base") 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 Qwen/Qwen3.5-2B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen3.5-2B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen3.5-2B-Base", "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/Qwen/Qwen3.5-2B-Base
- SGLang
How to use Qwen/Qwen3.5-2B-Base 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 "Qwen/Qwen3.5-2B-Base" \ --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": "Qwen/Qwen3.5-2B-Base", "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 "Qwen/Qwen3.5-2B-Base" \ --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": "Qwen/Qwen3.5-2B-Base", "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 Qwen/Qwen3.5-2B-Base with Docker Model Runner:
docker model run hf.co/Qwen/Qwen3.5-2B-Base
[License Violation Alert] NemoStation/Marlin-2B – Fine-tune of Qwen3.5-2B-Base illegally relicensed under BSL 1.1
Subject: [License Violation Alert] NemoStation/Marlin-2B – Fine-tune of Qwen3.5-2B-Base illegally relicensed under BSL 1.1
Dear Qwen Team,
I am writing to bring to your attention a potential license violation involving your model Qwen/Qwen3.5-2B-Base, which is released under the Apache License, Version 2.0.
The Hugging Face model NemoStation/Marlin-2B (https://huggingface.co/NemoStation/Marlin-2B) explicitly states in its model card that it is "a fine-tune of Qwen3.5-2B" (see "Model & Training" section: "Marlin is a fine-tune of Qwen3.5-2B"). However, the license attached to this derivative work is Business Source License 1.1 (BSL 1.1) , not Apache 2.0.
This is a license incompatibility and likely a violation of the Apache 2.0 terms.
The Problem
Under Section 2 of the Apache 2.0, any derivative work must preserve the original license's grant of rights, which includes:
"a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to ... distribute the Work and such Derivative Works"
Section 4 further requires that any derivative work:
- (a) Must include a copy of the Apache 2.0 license
- (c) Must retain all copyright and attribution notices
- (d) Must not impose additional restrictions on the rights granted by the Apache 2.0
The BSL 1.1 imposed by NemoStation adds a restriction that directly contradicts the Apache 2.0: it bans any "competitive offering" against NemoStation's paid version. The Apache 2.0 explicitly allows use for any purpose, including competing with the original licensor or any third party.
By distributing a derivative of your Apache-licensed model under BSL 1.1, NemoStation is:
- Failing to provide recipients with a copy of the Apache 2.0 license
- Imposing additional usage restrictions (the "no competitive offerings" clause)
- Effectively attempting to revoke rights that the Apache 2.0 grants as perpetual and irrevocable
Why This Matters
This is not just a technicality. If left unchallenged, it sets a dangerous precedent where anyone can:
- Take an Apache 2.0 model from a major contributor like Alibaba
- Fine-tune it (which is perfectly legal and encouraged)
- Re-release it under a restrictive "source available" license
- Exploit the open source ecosystem's goodwill while giving nothing back
This harms the entire open source AI community and undermines the legal integrity of the Apache 2.0 license.
What We Request
As the copyright holder of Qwen3.5-2B-Base, your team has the right and responsibility to enforce the Apache 2.0 terms. I respectfully request that you:
- Investigate
NemoStation/Marlin-2Band confirm it is indeed a derivative of your model - Contact NemoStation (contact email in their license: aryan@letsnemo.com) to demand compliance
- Request they either:
- Re-license Marlin-2B under Apache 2.0 (or a compatible license)
- Remove the model from Hugging Face until license compliance is achieved
- File a takedown notice with Hugging Face if they refuse to comply (under HF's DMCA policy)
Additional Context
I have already written a detailed article analyzing this issue, which includes references to the Open Source Definition and GNU Four Freedoms:
Marlin-2B model? "Open Source" -- my ass!:
https://hyperscope.link/1/2/4/9/9/7/Marlin-2B-model-Open-Source-my-ass-124997.html
The article explains why BSL 1.1 is not open source, and why relicensing an Apache 2.0 derivative under BSL 1.1 is legally problematic.
Thank You
Thank you for your stewardship of Qwen and for releasing your models under genuine open source licenses like Apache 2.0. I hope you will take this complaint seriously and act to protect the integrity of your license.
Please let me know if you need any additional information from my end.
Sincerely,
An open source community member and supporter of legitimate open source licensing