Downloads · 30 days
60
11% of all-time downloads
benjamin/Gemma2-2B-IT-with-Qwen2-Tokenizer
Gemma2-2B-IT-with-Qwen2-Tokenizer is a text generation model from benjamin. Use it when you need the model to write or continue text. It is set up for transformers.
Gemma2-2B-IT transferred to the Qwen2 Tokenizer. The model approximately preserves performance of the original on most benchmarks, except for some slight degradations.
Downloads · 30 days
60
11% of all-time downloads
All-time downloads
538
Public
Parameters
2.4B
19 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors9.5 GB · 50%
From the Hugging Face model README
Gemma2-2B-IT transferred to the Qwen2 Tokenizer. The model approximately preserves performance of the original on most benchmarks, except for some slight degradations.
| 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 |
Details on the training methodology are forthcoming.
import torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="benjamin/Gemma2-2B-IT-with-Qwen2-Tokenizer",
model_kwargs={"torch_dtype": torch.bfloat16},
device="cuda", # replace with "mps" to run on a Mac device
)
messages = [
{"role": "user", "content": "Who are you? Please, answer in pirate-speak."},
]
outputs = pipe(messages, max_new_tokens=256)
assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
print(assistant_response)