Downloads · 30 days
25
41% of all-time downloads
islamassanov/Qwen3.5-2B-auto-optimized
Qwen3.5-2B-auto-optimized is a image-text-to-text model from islamassanov. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This is Qwen3.5-2B auto-optimized by Claude Fable for fast single-request text generation. Fable built and tuned the included qwen35fast inference engine while keeping Qwen's original BF16 weights unchanged.
Downloads · 30 days
25
41% of all-time downloads
All-time downloads
61
Public
Parameters
2.3B
4.6 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors4.5 GB · 99%
How the weights are stored.
BF162.3B · 100%
From the Hugging Face model README
This is Qwen3.5-2B auto-optimized by Claude Fable for fast single-request text generation. Fable built and tuned the included qwen35_fast inference engine while keeping Qwen's original BF16 weights unchanged.
| Single H100, batch 1, 256 output tokens | Decode tokens/s |
|---|---|
| Transformers eager | 50–51 |
| vLLM 0.29 | 429–437 |
| vLLM 0.29 + MTP | 527–915 |
| Fable-optimized engine | 582–848 |
Across 12 development workloads, the Fable engine delivered 14× the decode speed of Transformers eager and 1.02× the speed of vLLM with MTP (geometric means). On 12 held-out workloads, it reached 528–866 tokens/s and 1.01× vLLM with MTP.
Use Python 3.12 and an NVIDIA CUDA GPU. Download the model and install its dependencies:
pip install huggingface_hub
hf download islamassanov/Qwen3.5-2B-auto-optimized --local-dir qwen35-fable
pip install -r qwen35-fable/requirements.txt
Run the optimized engine:
import sys
from transformers import AutoTokenizer
path = "qwen35-fable"
sys.path.insert(0, path)
from qwen35_fast import Engine
tokenizer = AutoTokenizer.from_pretrained(path)
prompt = [{"role": "user", "content": "Explain how a CPU cache hierarchy works."}]
input_ids = tokenizer.apply_chat_template(
prompt, tokenize=True, add_generation_prompt=True, enable_thinking=False
)["input_ids"]
engine = Engine(path, spec_k=2, compile_blocks=True, fused_gdn=True)
output = engine.generate(
input_ids,
n_out=512,
eos_ids={tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|im_end|>")},
)
print(tokenizer.decode(output["tokens"], skip_special_tokens=True))
The original checkpoint also works with Transformers for Qwen's standard text and vision-language workflows; the speed figures above use qwen35_fast.
torch.compile and Triton Gated-DeltaNet kernels.The optimized path runs batch-1, greedy, non-thinking text generation. The weights and tokenizer come unchanged from Qwen revision 15852e8c16360a2fea060d615a32b45270f8a8fc.
Results are median decode tokens/s over five runs on one H100 SXM, with 256 generated tokens per prompt. Prompts cover prose, code, and structured output at 128, 512, 2,048, and 8,192 input tokens. Engines ran sequentially in the same session; decode timing starts after the first token.
| Development prompts | Transformers eager | vLLM + MTP | Fable engine |
|---|---|---|---|
| Prose, 128–8,192 input tokens | 50–51 | 528–576 | 582–618 |
| Code, 128–8,192 input tokens | 50–51 | 637–736 | 661–738 |
| Structured, 128–8,192 input tokens | 50–51 | 824–915 | 807–848 |
Full per-prompt results, held-out measurements, and the IFEval regression are in RESULTS.md. The project repository contains the benchmark code and development history.