How to use from
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 "isfs/Qwen3.5-2B-Base-int4" \
    --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": "isfs/Qwen3.5-2B-Base-int4",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
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 "isfs/Qwen3.5-2B-Base-int4" \
        --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": "isfs/Qwen3.5-2B-Base-int4",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

isfs/Qwen3.5-2B-Base-int4

This is a 4-bit quantized version of Qwen/Qwen3.5-2B-Base.

The weights on this repository are already quantized (4-bit), significantly reducing disk size and memory usage compared to the original BF16 model.

Model Details

  • Base Model: Qwen/Qwen3.5-2B-Base
  • Quantization: BitsAndBytes (NF4, Double Quantization)
  • Compute Dtype: bfloat16

Usage

You must install bitsandbytes and transformers.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

model_id = "isfs/Qwen3.5-2B-Base-int4"

# Since the weights are already quantized, you can simply load them.
# However, BitsAndBytes still requires a config for loading.
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    trust_remote_code=True
)

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
Downloads last month
4
Safetensors
Model size
2B params
Tensor type
F32
BF16
U8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support