Downloads · 30 days
23
0% of all-time downloads
RichardErkhov/DeepMount00_-_Gemma_QA_ITA_v3-gguf
DeepMount00_-_Gemma_QA_ITA_v3-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
23
0% of all-time downloads
All-time downloads
5.3K
Public
Repo size
26.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf31.7 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
Gemma_QA_ITA_v3 - GGUF
| Name | Quant method | Size |
|---|---|---|
| Gemma_QA_ITA_v3.Q2_K.gguf | Q2_K | 1.08GB |
| Gemma_QA_ITA_v3.Q3_K_S.gguf | Q3_K_S | 1.2GB |
| Gemma_QA_ITA_v3.Q3_K.gguf | Q3_K | 1.29GB |
| Gemma_QA_ITA_v3.Q3_K_M.gguf | Q3_K_M | 1.29GB |
| Gemma_QA_ITA_v3.Q3_K_L.gguf | Q3_K_L | 1.36GB |
| Gemma_QA_ITA_v3.IQ4_XS.gguf | IQ4_XS | 1.4GB |
| Gemma_QA_ITA_v3.Q4_0.gguf | Q4_0 | 1.44GB |
| Gemma_QA_ITA_v3.IQ4_NL.gguf | IQ4_NL | 1.45GB |
| Gemma_QA_ITA_v3.Q4_K_S.gguf | Q4_K_S | 1.45GB |
| Gemma_QA_ITA_v3.Q4_K.gguf | Q4_K | 1.52GB |
| Gemma_QA_ITA_v3.Q4_K_M.gguf | Q4_K_M | 1.52GB |
| Gemma_QA_ITA_v3.Q4_1.gguf | Q4_1 | 1.56GB |
| Gemma_QA_ITA_v3.Q5_0.gguf | Q5_0 | 1.68GB |
| Gemma_QA_ITA_v3.Q5_K_S.gguf | Q5_K_S | 1.68GB |
| Gemma_QA_ITA_v3.Q5_K.gguf | Q5_K | 1.71GB |
| Gemma_QA_ITA_v3.Q5_K_M.gguf | Q5_K_M | 1.71GB |
| Gemma_QA_ITA_v3.Q5_1.gguf | Q5_1 | 1.79GB |
| Gemma_QA_ITA_v3.Q6_K.gguf | Q6_K | 1.92GB |
| Gemma_QA_ITA_v3.Q8_0.gguf | Q8_0 | 2.49GB |
library_name: transformers datasets:
How to use Gemma Q&A
import transformers
from transformers import TextStreamer, AutoTokenizer
import torch
model_name = "DeepMount00/Gemma_QA_ITA_v3"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = transformers.GemmaForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto").eval()
def stream(contesto, domanda):
device = "cuda:0"
prefix_text = 'Di seguito ti verrà fornito un contesto e poi una domanda. Il tuo compito è quello di rispondere alla domanda basandoti esclusivamente sul contesto.\n\n'
prompt = f"""{prefix_text}##CONTESTO: {contesto}\n##DOMANDA: {domanda}"""
inputs = tokenizer([prompt], return_tensors="pt").to(device)
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
_ = model.generate(**inputs, streamer=streamer, max_new_tokens=150, temperature=0.01,
repetition_penalty=1.0, eos_token_id=107, do_sample=True, num_return_sequences=1)
contesto = """Seneca seguì molto intensamente gli insegnamenti dei maestri, che esercitarono su di lui un profondo influsso sia con la parola sia con l'esempio di una vita vissuta in coerenza con gli ideali professati. Da Attalo imparò i principi dello stoicismo e l'abitudine alle pratiche ascetiche. Da Sozione, oltre ad apprendere i principi delle dottrine di Pitagora, fu avviato per qualche tempo verso la pratica vegetariana; venne distolto però dal padre che non amava la filosofia e dal fatto che l'imperatore Tiberio proibisse di seguire consuetudini di vita non romane."""
domanda = "Chi è Seneca?"
stream(contesto, domanda)