Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| salamandra-7b-aligned-EADOP.Q2_K.gguf | Q2_K | 3.08GB |
| salamandra-7b-aligned-EADOP.Q3_K_S.gguf | Q3_K_S | 3.5GB |
| salamandra-7b-aligned-EADOP.Q3_K.gguf | Q3_K | 3.77GB |
| salamandra-7b-aligned-EADOP.Q3_K_M.gguf | Q3_K_M | 3.77GB |
| salamandra-7b-aligned-EADOP.Q3_K_L.gguf | Q3_K_L | 4.0GB |
| salamandra-7b-aligned-EADOP.IQ4_XS.gguf | IQ4_XS | 4.18GB |
| salamandra-7b-aligned-EADOP.Q4_0.gguf | Q4_0 | 4.33GB |
| salamandra-7b-aligned-EADOP.IQ4_NL.gguf | IQ4_NL | 4.36GB |
| salamandra-7b-aligned-EADOP.Q4_K_S.gguf | Q4_K_S | 4.35GB |
| salamandra-7b-aligned-EADOP.Q4_K.gguf | Q4_K | 4.52GB |
| salamandra-7b-aligned-EADOP.Q4_K_M.gguf | Q4_K_M | 4.52GB |
| salamandra-7b-aligned-EADOP.Q4_1.gguf | Q4_1 | 4.72GB |
| salamandra-7b-aligned-EADOP.Q5_0.gguf | Q5_0 | 5.11GB |
| salamandra-7b-aligned-EADOP.Q5_K_S.gguf | Q5_K_S | 5.11GB |
| salamandra-7b-aligned-EADOP.Q5_K.gguf | Q5_K | 5.21GB |
| salamandra-7b-aligned-EADOP.Q5_K_M.gguf | Q5_K_M | 5.21GB |
| salamandra-7b-aligned-EADOP.Q5_1.gguf | Q5_1 | 5.5GB |
| salamandra-7b-aligned-EADOP.Q6_K.gguf | Q6_K | 5.94GB |
| salamandra-7b-aligned-EADOP.Q8_0.gguf | Q8_0 | 7.69GB |
[!WARNING] DISCLAIMER: This model is a proof-of-concept designed to demonstrate the effects of finetuning an Instruction model with a small dataset of out-of-domain questions in the model's capability to politely and informatively refuse to answer questions that are out-of-domain. As a proof-of-concept, the model is still prone to generate harmful or inappropriate content.
1from datetime import datetime
2from transformers import AutoTokenizer, AutoModelForCausalLM
3import transformers
4import torch
5
6model_id = "projecte-aina/salamandra-7b-aligned-EADOP"
7
8text = "Quina és la finalitat del Servei Meterològic de Catalunya ?"
9
10tokenizer = AutoTokenizer.from_pretrained(model_id)
11model = AutoModelForCausalLM.from_pretrained(
12 model_id,
13 device_map="auto",
14 torch_dtype=torch.bfloat16
15 )
16
17message = [ { "role": "user", "content": text } ]
18
19prompt = tokenizer.apply_chat_template(
20 message,
21 tokenize=False,
22 add_generation_prompt=True
23)
24
25inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
26outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=200)
27
28print(tokenizer.decode(outputs[0], skip_special_tokens=True))<|im_start|> delimiter and the role of the entity
(either user, for content supplied by the user, or assistant for LLM responses), and finished with the <|im_end|> token.