Text Generation
Transformers
Safetensors
English
qwen2
chat
conversational
Eval Results
text-generation-inference
Instructions to use Qwen/Qwen2.5-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen2.5-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Qwen/Qwen2.5-7B-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-7B-Instruct") model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-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-7B-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-7B-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-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Qwen/Qwen2.5-7B-Instruct
- SGLang
How to use Qwen/Qwen2.5-7B-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-7B-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-7B-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-7B-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-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Qwen/Qwen2.5-7B-Instruct with Docker Model Runner:
docker model run hf.co/Qwen/Qwen2.5-7B-Instruct
Multilingual powerhouse — testing for mobile deployment
#56 opened 15 days ago
by
3morixd
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#55 opened 26 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#54 opened 26 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#53 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#52 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#51 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#50 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#49 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#48 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#47 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#46 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#45 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#44 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#43 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#42 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#41 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#40 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#39 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#38 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#37 opened 27 days ago
by
duola15
OMS Score -- OMS 83.1 (A) -- Qwen2.5 7B | 5-dimension independent scoring
#36 opened 27 days ago
by
duola15
New architecture: TemporalMesh Transformer — dynamic kNN graph attention + per-token exit routing, 29.4 PPL at 48% compute
#35 opened about 1 month ago
by
vigneshwar234
Add LEXam evaluation results
#34 opened about 1 month ago
by
joelniklaus
If you are getting getting undefined symbol: _ZN3c1013MessageLoggerC1EPKciib when following instructions or other errors on vLLM
1
#32 opened 3 months ago
by
iprojects
Qwen2.5-7b-Instruct
#31 opened 3 months ago
by
willowoods
Technical question: Lineage of Qwen/Qwen2-7B-Instruct
#28 opened 4 months ago
by
dqdw
How good is Qwen/Qwen-2.5-7B-Instruct at tool calling? Any open-source models better at it?
2
#27 opened 6 months ago
by
Al-Abdulkarim
Safety Audit: GAE Score 25.16% (FAIL)
11
#26 opened 7 months ago
by
GAE-Auditor
demo
#24 opened 8 months ago
by
ZhenchaoGreg
Minimum Hardware required for finetuning using images ?
#23 opened 9 months ago
by
AtulBelekar
Performance Problem
#22 opened 12 months ago
by
omerdemirugm
Update README.md
#21 opened about 1 year ago
by
jwhoakley-cdw
Failed to download the model from the hub
1
#19 opened about 1 year ago
by
ChawkiHjaiji
ValueError: Unrecognized model in Qwen/Qwen2.5-7B-Instruct. Should have a `model_type` key in its config.json,
1
#18 opened about 1 year ago
by
Rawan
Improve language tag
#17 opened about 1 year ago
by
lbourdois
为何Qwen从1.5开始基本都是Instruction模型
1
#16 opened over 1 year ago
by
YuboWang
How do I make the model output JSON?
6
#14 opened over 1 year ago
by
vmajor
Wrong chat template?
#12 opened over 1 year ago
by
Lyrcaxis
Evaluating Qwen2.5 Performance Using the LLaVA-NeXT Framework: Impressive Results !
#11 opened over 1 year ago
by
xiangan
Independent evaluation results
#9 opened almost 2 years ago
by
yaronr
能做文本的embedding吗?
10
#7 opened almost 2 years ago
by
dingguofeng
Эротика
❤️👀 3
#6 opened almost 2 years ago
by
RadaTeplinskaa
Adding Evaluation Results
#4 opened almost 2 years ago
by
leaderboard-pr-bot
Less knowledge, maybe better reasoning versus Qwen2
2
#3 opened almost 2 years ago
by
rjmalagon
Scorecard on popular benchmarks
2
#2 opened almost 2 years ago
by
tanliboy