Views
No views yet
| Benchmark | Gemma2-2B w/ Qwen Tokenizer | Original Gemma2-2B-IT |
|---|---|---|
| PiQA | 76.9 | 79.6 |
| HS | 70.7 | 72.5 |
| ARC-C | 46.8 | 50.4 |
| BoolQ | 82.8 | 83.8 |
| MMLU | 53.8 | 56.9 |
| Arith. | 83.9 | 84.8 |
| IFEval | 62.5 | 62.5 |
1import torch
2from transformers import pipeline
3
4pipe = pipeline(
5 "text-generation",
6 model="benjamin/Gemma2-2B-IT-with-Qwen2-Tokenizer",
7 model_kwargs={"torch_dtype": torch.bfloat16},
8 device="cuda", # replace with "mps" to run on a Mac device
9)
10
11messages = [
12 {"role": "user", "content": "Who are you? Please, answer in pirate-speak."},
13]
14
15outputs = pipe(messages, max_new_tokens=256)
16assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
17print(assistant_response)