Update README.md

This commit is contained in:
Cherrytest 2025-03-05 17:26:36 +00:00
parent 770a0a9dda
commit 9987c9d176

View File

@ -17,7 +17,7 @@ tags:
## Introduction
QwQ is the reasoning model of Qwen series. Compared with conventional instruction-tuned models QwQ which is capable of thinking and reasoning can achieve significantly enhanced performance in downstream tasks espeically hard problems. QwQ-32B is the medium-size reasoning model, which is capable of achieving competitive performance against state-of-the art reasoning models, e.g., DeepSeek-R1, o1-mini.
QwQ is the reasoning model of the Qwen series. Compared with conventional instruction-tuned models, QwQ, which is capable of thinking and reasoning, can achieve significantly enhanced performance in downstream tasks, especially hard problems. QwQ-32B is the medium-sized reasoning model, which is capable of achieving competitive performance against state-of-the-art reasoning models, e.g., DeepSeek-R1, o1-mini.
**This repo contains the QwQ 32B model**, which has the following features:
- Type: Causal Language Models
@ -68,10 +68,6 @@ text = tokenizer.apply_chat_template(
add_generation_prompt=True
)
# avoid empty thought content by forcing the model to start with "<think>\n"
response_prefix = "<think>\n"
text += response_prefix
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
@ -83,14 +79,14 @@ generated_ids = [
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response_prefix + response)
print(response)
```
### Usage Guidelines
To achieve optimal performance, we recommend the following settings:
1. **Enforce Thoughtful Output**: Ensure the model starts with "\<think\>\n" to prevent generating empty thinking content, which can degrade output quality.
1. **Enforce Thoughtful Output**: Ensure the model starts with "\<think\>\n" to prevent generating empty thinking content, which can degrade output quality. If you use `apply_chat_template` and set `add_generation_prompt=True`, this is already automatically implemented, but it may cause the response to lack the \<think\> tag at the beginning. This is normal behavior.
2. **Sampling Parameters**:
- Use Temperature=0.6 and TopP=0.95 instead of Greedy decoding to avoid endless repetitions and enhance diversity.