Order and Login GPU Server
Advanced GPU Dedicated Server - A5000
Enterprise GPU Dedicated Server - RTX A6000
Enterprise GPU Dedicated Server - RTX 4090
Enterprise GPU Dedicated Server - A100
Multi-GPU Dedicated Server - 2xA100
Enterprise GPU Dedicated Server - A100(80GB)
Enterprise GPU Dedicated Server - H100
# install Ollama on Linux curl -fsSL https://ollama.com/install.sh | sh # on GPU dedicated server with RTX 4090 24GB ollama run qwq >>> How many r's are in the word "strawberry"? …… Final Answer: There are three "R"s in "strawberry." total duration: 55.10358031s load duration: 54.175044ms prompt eval count: 235 token(s) prompt eval duration: 45ms prompt eval rate: 5222.22 tokens/s eval count: 1936 token(s) eval duration: 54.949s eval rate: 35.23 tokens/s
By default, vLLM uses the model file on HuggingFace, using Tensor type BF16, which is 4 times the size of the 4-bit quantization in the Ollama library, about 72GB. It is recommended to use a GPU card with 80GB memory.
# Prerequirements # A100 80GB or H100 GPU Dedicated Server uv pip install vllm vllm serve Qwen/QwQ-32B --max-model-len 4096
Below are brief examples demonstrating how to use QwQ-32B via Hugging Face Transformers.
# Prerequirements # A100 80GB or H100 GPU Dedicated Server # uv pip install transformers from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "Qwen/QwQ-32B" model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype="auto", device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained(model_name) prompt = "How many r's are in the word \"strawberry\"" messages = [ {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) model_inputs = tokenizer([text], return_tensors="pt").to(model.device) generated_ids = model.generate( **model_inputs, max_new_tokens=32768 ) generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) ] response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] print(response)