Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| gemma-4b-instruct-v0.2.Q2_K.gguf | Q2_K | 1.6GB |
| gemma-4b-instruct-v0.2.IQ3_XS.gguf | IQ3_XS | 1.74GB |
| gemma-4b-instruct-v0.2.IQ3_S.gguf | IQ3_S | 1.82GB |
| gemma-4b-instruct-v0.2.Q3_K_S.gguf | Q3_K_S | 1.82GB |
| gemma-4b-instruct-v0.2.IQ3_M.gguf | IQ3_M | 1.85GB |
| gemma-4b-instruct-v0.2.Q3_K.gguf | Q3_K | 1.98GB |
| gemma-4b-instruct-v0.2.Q3_K_M.gguf | Q3_K_M | 1.98GB |
| gemma-4b-instruct-v0.2.Q3_K_L.gguf | Q3_K_L | 2.11GB |
| gemma-4b-instruct-v0.2.IQ4_XS.gguf | IQ4_XS | 2.17GB |
| gemma-4b-instruct-v0.2.Q4_0.gguf | Q4_0 | 2.25GB |
| gemma-4b-instruct-v0.2.IQ4_NL.gguf | IQ4_NL | 2.27GB |
| gemma-4b-instruct-v0.2.Q4_K_S.gguf | Q4_K_S | 2.27GB |
| gemma-4b-instruct-v0.2.Q4_K.gguf | Q4_K | 2.38GB |
| gemma-4b-instruct-v0.2.Q4_K_M.gguf | Q4_K_M | 2.38GB |
| gemma-4b-instruct-v0.2.Q4_1.gguf | Q4_1 | 2.46GB |
| gemma-4b-instruct-v0.2.Q5_0.gguf | Q5_0 | 2.66GB |
| gemma-4b-instruct-v0.2.Q5_K_S.gguf | Q5_K_S | 2.66GB |
| gemma-4b-instruct-v0.2.Q5_K.gguf | Q5_K | 2.73GB |
| gemma-4b-instruct-v0.2.Q5_K_M.gguf | Q5_K_M | 2.73GB |
| gemma-4b-instruct-v0.2.Q5_1.gguf | Q5_1 | 2.87GB |
| gemma-4b-instruct-v0.2.Q6_K.gguf | Q6_K | 3.1GB |
| gemma-4b-instruct-v0.2.Q8_0.gguf | Q8_0 | 4.01GB |
1!pip install -qU transformers accelerate
2
3from transformers import AutoTokenizer
4import transformers
5import torch
6
7model = "frankenmerger/gemma-4b-instruct-v0.2"
8messages = [{"role": "user", "content": "What is a large language model?"}]
9
10tokenizer = AutoTokenizer.from_pretrained(model)
11prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
12pipeline = transformers.pipeline(
13 "text-generation",
14 model=model,
15 torch_dtype=torch.float16,
16 device_map="auto",
17)
18
19outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
20print(outputs[0]["generated_text"])