Instructions to use Qwen/Qwen2.5-Coder-32B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen2.5-Coder-32B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Qwen/Qwen2.5-Coder-32B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-32B-Instruct") model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-32B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Qwen/Qwen2.5-Coder-32B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen2.5-Coder-32B-Instruct" # 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/Qwen2.5-Coder-32B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Qwen/Qwen2.5-Coder-32B-Instruct
- SGLang
How to use Qwen/Qwen2.5-Coder-32B-Instruct 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/Qwen2.5-Coder-32B-Instruct" \ --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/Qwen2.5-Coder-32B-Instruct", "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 "Qwen/Qwen2.5-Coder-32B-Instruct" \ --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/Qwen2.5-Coder-32B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Qwen/Qwen2.5-Coder-32B-Instruct with Docker Model Runner:
docker model run hf.co/Qwen/Qwen2.5-Coder-32B-Instruct
TemporalMesh Transformer: 29.4 PPL at 48% compute — beats Mamba, new open-source architecture
New transformer architecture: TMT — dynamic graph attention + per-token adaptive depth
TemporalMesh Transformer (TMT) achieves 29.4 PPL on WikiText-2 at 48% compute (120M params) — outperforming Mamba (31.8), RWKV (33.1), Longformer (39.6), and vanilla transformer (42.1).
5 innovations unified in one forward pass:
| Innovation | What it does | Cost |
|---|---|---|
| Mesh Attention | Dynamic kNN graph per layer from cosine similarity | O(S·k) vs O(S²) |
| Temporal Decay | Learned multiplicative attenuation post-softmax | ~0 overhead |
| Adaptive Exit | Per-token gate: punctuation exits layer 2, rare words layer 12 | −52% compute |
| Dual-Stream FFN | Syntax + semantic parallel MLP streams | Same FLOPs |
| EMA Anchors | 16 persistent fast-weight vectors, β=0.99 | 32KB params |
Cross-benchmark results:
- WikiText-103: 36.1 PPL vs 38.4 Mamba
- LongBench: 53.4 vs 51.3 Mamba
- C4: 27.4 PPL vs 30.1 Mamba
- The Pile: 35.8 PPL
- 226 tests passing, 3 seeds (42/1337/2024), full ablations
Superadditive synergy: Combined gain = 12.7 PPL vs 8.6 from summing individual components.
📄 Paper: https://zenodo.org/records/20287390 (DOI: 10.5281/zenodo.20287197)
💻 Code: https://github.com/vignesh2027/TemporalMesh-Transformer
🎮 Live demo: https://huggingface.co/spaces/vigneshwar234/TemporalMesh-Transformer-Demo
🤗 Model + benchmarks: https://huggingface.co/vigneshwar234/TemporalMesh-Transformer