Views
No views yet
| Models | DeepSeek-R1-Distill-Qwen-7B | DeepSeek-R1-ReDistill-Qwen-7B-v1.1 |
|---|---|---|
| ARC (25-shot) | 55.03 | 52.3 |
| HellaSwag (10-shot) | 61.9 | 62.36 |
| MMLU (5-shot) | 56.75 | 59.53 |
| TruthfulQA-MC2 | 45.76 | 47.7 |
| Winogrande (5-shot) | 60.38 | 61.8 |
| GSM8K (5-shot) | 78.85 | 83.4 |
| Average | 59.78 | 61.18 |
| Models | DeepSeek-R1-Distill-Qwen-7B | DeepSeek-R1-ReDistill-Qwen-7B-v1.1 |
|---|---|---|
| GPQA (0-shot) | 30.9 | 34.99 |
| MMLU PRO (5-shot) | 28.83 | 31.02 |
| MUSR (0-shot) | 38.85 | 44.42 |
| BBH (3-shot) | 43.54 | 51.53 |
| IfEval (0-shot) - strict | 42.33 | 35.49 |
| IfEval (0-shot) - loose | 30.31 | 38.49 |
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3compute_dtype = torch.bfloat16
4device = 'cuda'
5model_id = "mobiuslabsgmbh/DeepSeek-R1-ReDistill-Qwen-7B-v1.1"
6
7model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=compute_dtype, attn_implementation="sdpa", device_map=device)
8tokenizer = AutoTokenizer.from_pretrained(model_id)
9
10prompt = "What is 1.5+102.2?"
11chat = tokenizer.apply_chat_template([{"role":"user", "content":prompt}], tokenize=True, add_generation_prompt=True, return_tensors="pt")
12outputs = model.generate(chat.to(device), max_new_tokens=1024, do_sample=True)
13print(tokenizer.decode(outputs[0]))<|begin▁of▁sentence|><|User|>What is 1.5+102.2?<|Assistant|><think>
First, I need to add the whole number parts of the two numbers. The whole numbers are 1 and 102, which add up to 103.
Next, I add the decimal parts of the two numbers. The decimal parts are 0.5 and 0.2, which add up to 0.7.
Finally, I combine the whole number and decimal parts to get the total sum. Adding 103 and 0.7 gives me 103.7.
</think>
To add the numbers \(1.5\) and \(102.2\), follow these steps:
1. **Add the whole number parts:**
\[
1 + 102 = 103
\]
2. **Add the decimal parts:**
\[
0.5 + 0.2 = 0.7
\]
3. **Combine the results:**
\[
103 + 0.7 = 103.7
\]
**Final Answer:**
\[
\boxed{103.7}
\]<|end▁of▁sentence|>pip install hqq1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from hqq.models.hf.base import AutoHQQHFModel
4from hqq.core.quantize import *
5
6#Params
7device = 'cuda:0'
8backend = "torchao_int4"
9compute_dtype = torch.bfloat16 if backend=="torchao_int4" else torch.float16
10model_id = "mobiuslabsgmbh/DeepSeek-R1-ReDistill-Qwen-7B-v1.1"
11
12#Load
13tokenizer = AutoTokenizer.from_pretrained(model_id)
14model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=compute_dtype, attn_implementation="sdpa")
15
16#Quantize
17quant_config = BaseQuantizeConfig(nbits=4, group_size=64, axis=1)
18AutoHQQHFModel.quantize_model(model, quant_config=quant_config, compute_dtype=compute_dtype, device=device)
19
20#Optimize
21from hqq.utils.patching import prepare_for_inference
22prepare_for_inference(model, backend=backend, verbose=False)
23
24############################################################
25#Generate (streaming)
26from hqq.utils.generation_hf import HFGenerator
27gen = HFGenerator(model, tokenizer, max_new_tokens=4096, do_sample=True, compile='partial').warmup()
28
29prompt = "If A equals B, and C equals B - A, what would be the value of C?"
30out = gen.generate(prompt, print_tokens=True)
31
32############################################################
33# #Generate (simple)
34# from hqq.utils.generation_hf import patch_model_for_compiled_runtime
35# patch_model_for_compiled_runtime(model, tokenizer, warmup=True)
36
37# prompt = "If A equals B, and C equals B - A, what would be the value of C?"
38# chat = tokenizer.apply_chat_template([{"role":"user", "content":prompt}], tokenize=True, add_generation_prompt=True, return_tensors="pt")
39# outputs = model.generate(chat.to(device), max_new_tokens=8192, do_sample=True)
40# print(tokenizer.decode(outputs[0]))