Image-Text-to-Text
Transformers
Safetensors
qwen3_5
techwithsergiu
conversational
4-bit precision
bitsandbytes
Instructions to use techwithsergiu/Qwen3.5-2B-bnb-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use techwithsergiu/Qwen3.5-2B-bnb-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="techwithsergiu/Qwen3.5-2B-bnb-4bit") 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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("techwithsergiu/Qwen3.5-2B-bnb-4bit") model = AutoModelForMultimodalLM.from_pretrained("techwithsergiu/Qwen3.5-2B-bnb-4bit") 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 techwithsergiu/Qwen3.5-2B-bnb-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "techwithsergiu/Qwen3.5-2B-bnb-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "techwithsergiu/Qwen3.5-2B-bnb-4bit", "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/techwithsergiu/Qwen3.5-2B-bnb-4bit
- SGLang
How to use techwithsergiu/Qwen3.5-2B-bnb-4bit 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 "techwithsergiu/Qwen3.5-2B-bnb-4bit" \ --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": "techwithsergiu/Qwen3.5-2B-bnb-4bit", "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 "techwithsergiu/Qwen3.5-2B-bnb-4bit" \ --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": "techwithsergiu/Qwen3.5-2B-bnb-4bit", "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 techwithsergiu/Qwen3.5-2B-bnb-4bit with Docker Model Runner:
docker model run hf.co/techwithsergiu/Qwen3.5-2B-bnb-4bit
upd Model family in readme
Browse files- .gitattributes +1 -0
- README.md +10 -10
- diagrams/diagram_01.png +0 -0
- diagrams/diagram_02.png +2 -2
.gitattributes
CHANGED
|
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
diagrams/diagram_02.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
diagrams/diagram_02.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
diagrams/diagram_01.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -19,7 +19,7 @@ Retains the full visual tower — this is a **VLM-capable** model (image + text
|
|
| 19 |
Primary use-case: Unsloth LoRA fine-tuning when you need image understanding in the
|
| 20 |
fine-tuned result.
|
| 21 |
|
| 22 |
-
> If you only need text fine-tuning, use
|
| 23 |
> [techwithsergiu/Qwen3.5-text-2B-bnb-4bit](https://huggingface.co/techwithsergiu/Qwen3.5-text-2B-bnb-4bit)
|
| 24 |
> instead — same backbone, visual tower removed, lighter VRAM footprint.
|
| 25 |
|
|
@@ -33,16 +33,16 @@ fine-tuned result.
|
|
| 33 |
|
| 34 |

|
| 35 |
|
| 36 |
-
| Model |
|
| 37 |
|---|---|---|
|
| 38 |
-
| [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B) | f16 |
|
| 39 |
-
| **techwithsergiu/Qwen3.5-2B-bnb-4bit** | BNB NF4 |
|
| 40 |
-
| [techwithsergiu/Qwen3.5-text-2B](https://huggingface.co/techwithsergiu/Qwen3.5-text-2B) | bf16 |
|
| 41 |
-
| [techwithsergiu/Qwen3.5-text-2B-bnb-4bit](https://huggingface.co/techwithsergiu/Qwen3.5-text-2B-bnb-4bit) | BNB NF4 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
|
| 47 |
## Fine-tuning
|
| 48 |
|
|
|
|
| 19 |
Primary use-case: Unsloth LoRA fine-tuning when you need image understanding in the
|
| 20 |
fine-tuned result.
|
| 21 |
|
| 22 |
+
> If you only need text fine-tuning, use
|
| 23 |
> [techwithsergiu/Qwen3.5-text-2B-bnb-4bit](https://huggingface.co/techwithsergiu/Qwen3.5-text-2B-bnb-4bit)
|
| 24 |
> instead — same backbone, visual tower removed, lighter VRAM footprint.
|
| 25 |
|
|
|
|
| 33 |
|
| 34 |

|
| 35 |
|
| 36 |
+
| Model | Type | Base model |
|
| 37 |
|---|---|---|
|
| 38 |
+
| [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B) | f16 · VLM · source | — |
|
| 39 |
+
| **[techwithsergiu/Qwen3.5-2B-bnb-4bit](https://huggingface.co/techwithsergiu/Qwen3.5-2B-bnb-4bit)** | BNB NF4 · VLM | Qwen/Qwen3.5-2B |
|
| 40 |
+
| [techwithsergiu/Qwen3.5-text-2B](https://huggingface.co/techwithsergiu/Qwen3.5-text-2B) | bf16 · text-only | Qwen/Qwen3.5-2B |
|
| 41 |
+
| [techwithsergiu/Qwen3.5-text-2B-bnb-4bit](https://huggingface.co/techwithsergiu/Qwen3.5-text-2B-bnb-4bit) | BNB NF4 · text-only | Qwen3.5-text-2B |
|
| 42 |
+
| [techwithsergiu/Qwen3.5-text-2B-GGUF](https://huggingface.co/techwithsergiu/Qwen3.5-text-2B-GGUF) | GGUF quants | Qwen3.5-text-2B |
|
| 43 |
+
|
| 44 |
+
The visual tower is a fixed ~0.65 GB bf16 overhead shared across all model sizes.
|
| 45 |
+
BNB-quantized models are roughly 40% of the original f16 size (exact ratio varies by size).
|
| 46 |
|
| 47 |
## Fine-tuning
|
| 48 |
|
diagrams/diagram_01.png
CHANGED
|
|
Git LFS Details
|
diagrams/diagram_02.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|