Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Emotional-llama-8B.Q2_K.gguf | Q2_K | 2.96GB |
| Emotional-llama-8B.IQ3_XS.gguf | IQ3_XS | 3.28GB |
| Emotional-llama-8B.IQ3_S.gguf | IQ3_S | 3.43GB |
| Emotional-llama-8B.Q3_K_S.gguf | Q3_K_S | 3.41GB |
| Emotional-llama-8B.IQ3_M.gguf | IQ3_M | 3.52GB |
| Emotional-llama-8B.Q3_K.gguf | Q3_K | 3.74GB |
| Emotional-llama-8B.Q3_K_M.gguf | Q3_K_M | 3.74GB |
| Emotional-llama-8B.Q3_K_L.gguf | Q3_K_L | 4.03GB |
| Emotional-llama-8B.IQ4_XS.gguf | IQ4_XS | 4.18GB |
| Emotional-llama-8B.Q4_0.gguf | Q4_0 | 4.34GB |
| Emotional-llama-8B.IQ4_NL.gguf | IQ4_NL | 4.38GB |
| Emotional-llama-8B.Q4_K_S.gguf | Q4_K_S | 4.37GB |
| Emotional-llama-8B.Q4_K.gguf | Q4_K | 4.58GB |
| Emotional-llama-8B.Q4_K_M.gguf | Q4_K_M | 4.58GB |
| Emotional-llama-8B.Q4_1.gguf | Q4_1 | 4.78GB |
| Emotional-llama-8B.Q5_0.gguf | Q5_0 | 5.21GB |
| Emotional-llama-8B.Q5_K_S.gguf | Q5_K_S | 5.21GB |
| Emotional-llama-8B.Q5_K.gguf | Q5_K | 5.34GB |
| Emotional-llama-8B.Q5_K_M.gguf | Q5_K_M | 5.34GB |
| Emotional-llama-8B.Q5_1.gguf | Q5_1 | 5.65GB |
| Emotional-llama-8B.Q6_K.gguf | Q6_K | 6.14GB |
| Emotional-llama-8B.Q8_0.gguf | Q8_0 | 7.95GB |
1%pip install accelerate
2%pip install -i https://pypi.org/simple/ bitsandbytes
3
4from transformers import AutoTokenizer, AutoModelForCausalLM
5import torch
6
7model_id = "OEvortex/Emotional-llama-8B"
8
9tokenizer = AutoTokenizer.from_pretrained(model_id)
10model = AutoModelForCausalLM.from_pretrained(
11 model_id,
12 torch_dtype=torch.bfloat16,
13 device_map="auto",
14)
15
16
17messages = [
18 # {"role": "system", "content": "Be Helpful"},
19 {"role": "user", "content": "I'm feeling really down today. Nothing seems to be going right."},
20]
21
22input_ids = tokenizer.apply_chat_template(
23 messages,
24 add_generation_prompt=True,
25 return_tensors="pt"
26).to(model.device)
27
28terminators = [
29 tokenizer.eos_token_id,
30 tokenizer.convert_tokens_to_ids("<|eot_id|>")
31]
32
33outputs = model.generate(
34 input_ids,
35 max_new_tokens=256,
36 eos_token_id=terminators,
37 do_sample=True,
38 temperature=0.9,
39 top_p=0.9,
40)
41response = outputs[0][input_ids.shape[-1]:]
42print(tokenizer.decode(response, skip_special_tokens=True))
43
44# Now you can generate text using the model!