Text Generation
Transformers
Safetensors
English
qwen2
abliterated
uncensored
SEARCH
conversational
text-generation-inference
Instructions to use marcuscedricridia/QwQ-R1984-32B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marcuscedricridia/QwQ-R1984-32B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marcuscedricridia/QwQ-R1984-32B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("marcuscedricridia/QwQ-R1984-32B") model = AutoModelForMultimodalLM.from_pretrained("marcuscedricridia/QwQ-R1984-32B") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use marcuscedricridia/QwQ-R1984-32B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marcuscedricridia/QwQ-R1984-32B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marcuscedricridia/QwQ-R1984-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marcuscedricridia/QwQ-R1984-32B
- SGLang
How to use marcuscedricridia/QwQ-R1984-32B 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 "marcuscedricridia/QwQ-R1984-32B" \ --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": "marcuscedricridia/QwQ-R1984-32B", "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 "marcuscedricridia/QwQ-R1984-32B" \ --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": "marcuscedricridia/QwQ-R1984-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use marcuscedricridia/QwQ-R1984-32B with Docker Model Runner:
docker model run hf.co/marcuscedricridia/QwQ-R1984-32B
| 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) | |
| ``` |