A distilled version of Qwen3.5-27B, enhanced with Claude Opus 4.6 reasoning patterns through knowledge distillation.
1from vllm import LLM, SamplingParams
2
3# Initialize the model
4llm = LLM(
5 model="HarleyWang/Qwen3.5-27B-Claude-Opus-4.6-High-Reasoning",
6 dtype="bfloat16",
7 tensor_parallel_size=2, # Adjust based on your GPU count
8 max_model_len=8192,
9)
10
11# Define sampling parameters
12sampling_params = SamplingParams(
13 temperature=0.7,
14 top_p=0.9,
15 max_tokens=2048,
16)
17
18# Create messages
19messages = [
20 {"role": "system", "content": "You are a helpful assistant."},
21 {"role": "user", "content": "Explain how to optimize a slow database query."}
22]
23
24# Use apply_chat_template from tokenizer
25from transformers import AutoTokenizer
26tokenizer = AutoTokenizer.from_pretrained("HarleyWang/Qwen3.5-27B-Claude-Opus-4.6-High-Reasoning")
27prompt = tokenizer.apply_chat_template(messages, tokenize=False)
28
29# Generate
30outputs = llm.generate(prompt, sampling_params)
31
32# Print output
33for output in outputs:
34 print(output.outputs[0].text)
1from vllm import LLM, SamplingParams
2from transformers import AutoTokenizer
3
4llm = LLM(
5 model="HarleyWang/Qwen3.5-27B-Claude-Opus-4.6-High-Reasoning",
6 dtype="bfloat16",
7 tensor_parallel_size=2,
8)
9
10tokenizer = AutoTokenizer.from_pretrained("HarleyWang/Qwen3.5-27B-Claude-Opus-4.6-High-Reasoning")
11
12messages = [
13 {"role": "user", "content": "Write a Python function to sort a list."}
14]
15prompt = tokenizer.apply_chat_template(messages, tokenize=False)
16
17sampling_params = SamplingParams(
18 temperature=0.7,
19 top_p=0.9,
20 max_tokens=1024,
21 stream=True, # Enable streaming
22)
23
24for output in llm.generate(prompt, sampling_params, use_tqdm=False):
25 print(output.outputs[0].text, end="", flush=True)
26print()
1from vllm import LLM, SamplingParams
2
3llm = LLM(
4 model="HarleyWang/Qwen3.5-27B-Claude-Opus-4.6-High-Reasoning",
5 dtype="bfloat16",
6 tensor_parallel_size=2,
7)
8
9prompts = [
10 "Explain quantum computing.",
11 "Write a haiku about coding.",
12 "Debug: Why is this loop infinite?",
13]
14
15sampling_params = SamplingParams(
16 temperature=0.7,
17 top_p=0.9,
18 max_tokens=512,
19)
20
21outputs = llm.generate(prompts, sampling_params)
22
23for output in outputs:
24 print(f"Prompt: {output.prompt}")
25 print(f"Response: {output.outputs[0].text}")
26 print("-" * 50)
1# Start an OpenAI-compatible API server
2python -m vllm.entrypoints.openai.api_server \
3 --model HarleyWang/Qwen3.5-27B-Claude-Opus-4.6-High-Reasoning \
4 --dtype bfloat16 \
5 --tensor-parallel-size 2 \
6 --host 0.0.0.0 \
7 --port 8000
8
9# In another terminal, use the API
10curl http://localhost:8000/v1/chat/completions \
11 -H "Content-Type: application/json" \
12 -d '{
13 "model": "default",
14 "messages": [
15 {"role": "system", "content": "You are a helpful assistant."},
16 {"role": "user", "content": "What is the capital of France?"}
17 ],
18 "temperature": 0.7,
19 "max_tokens": 256
20 }'
This model is licensed under Apache-2.0.