File size: 2,512 Bytes
3bc2f55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
license: apache-2.0
language:
- en
base_model:
- Qwen/QwQ-32B
tags:
- abliterated
- uncensored
- SEARCH
library_name: transformers
---

# VIDraft/QwQ-R1984-32B

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. QwQ-R1984-32B is an enhanced version based on QwQ-32B that incorporates additional features such as uncensored capabilities and deep research functionality. This allows for more unrestricted responses and in-depth information provision based on real-time web searches.


# This repo contains the QwQ-R1984-32B model, which has the following features:


- **Type:** Reasoning-enhanced Causal Language Model  
- **Training Stage:** Pretraining, Supervised Finetuning, Reinforcement Learning, and Uncensoring  
- **Architecture:** Transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias  
- **Number of Parameters:** 32.5B  
- **Number of Parameters (Non-Embedding):** 31.0B  
- **Number of Layers:** 64  
- **Number of Attention Heads (GQA):** 40 for Q and 8 for KV  
- **Context Length:** 8,000 tokens  
- **Additional Features:**  
  - Deep research capabilities via web search  
  - Uncensored response generation


# Quickstart

Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.

```py

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "VIDraft/QwQ-R1984-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)

```