Update README.md
Browse files
README.md
CHANGED
@@ -30,4 +30,54 @@ Benchmarks is as follows for both Qwerky-QwQ-32B and Qwerky-72B models:
|
|
30 |
| winogrande | acc | **0.7324** | 0.7048 | **0.7956** | 0.7632 |
|
31 |
| mmlu | acc | 0.7431 | **0.7985** | 0.7746 | **0.8338** |
|
32 |
|
33 |
-
> *Note: All benchmarks except MMLU are 0-shot and Version 1. For MMLU, it's Version 2.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
| winogrande | acc | **0.7324** | 0.7048 | **0.7956** | 0.7632 |
|
31 |
| mmlu | acc | 0.7431 | **0.7985** | 0.7746 | **0.8338** |
|
32 |
|
33 |
+
> *Note: All benchmarks except MMLU are 0-shot and Version 1. For MMLU, it's Version 2.*
|
34 |
+
|
35 |
+
|
36 |
+
## Running with `transformers`
|
37 |
+
|
38 |
+
Since this model is not on transformers at the moment you will have to enable remote code with the following line.
|
39 |
+
|
40 |
+
```py
|
41 |
+
# ...
|
42 |
+
|
43 |
+
model = AutoModelForCausalLM.from_pretrained("featherless-ai/Qwerky-QwQ-32B", trust_remote_code=True)
|
44 |
+
|
45 |
+
# ...
|
46 |
+
```
|
47 |
+
|
48 |
+
Other than enabling remote code, you may run the model like a regular model with transformers like so.
|
49 |
+
|
50 |
+
```py
|
51 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
52 |
+
|
53 |
+
model_name = "featherless-ai/Qwerky-72B"
|
54 |
+
|
55 |
+
model = AutoModelForCausalLM.from_pretrained(
|
56 |
+
model_name,
|
57 |
+
torch_dtype="auto",
|
58 |
+
device_map="auto",
|
59 |
+
trust_remote_code=True,
|
60 |
+
)
|
61 |
+
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
63 |
+
|
64 |
+
prompt = """There is a very famous song that I recall by the singer's surname as Astley.
|
65 |
+
I can't remember the name or the youtube URL that people use to link as an example url.
|
66 |
+
What's song name?"""
|
67 |
+
messages = [
|
68 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
69 |
+
{"role": "user", "content": prompt},
|
70 |
+
]
|
71 |
+
text = tokenizer.apply_chat_template(
|
72 |
+
messages, tokenize=False, add_generation_prompt=True
|
73 |
+
)
|
74 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
75 |
+
|
76 |
+
generated_ids = model.generate(**model_inputs, max_new_tokens=512)
|
77 |
+
generated_ids = [
|
78 |
+
output_ids[len(input_ids) :]
|
79 |
+
for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
80 |
+
]
|
81 |
+
|
82 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
83 |
+
```
|