Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Tess-2.0-Llama-3-8B.Q2_K.gguf | Q2_K | 2.96GB |
| Tess-2.0-Llama-3-8B.IQ3_XS.gguf | IQ3_XS | 3.28GB |
| Tess-2.0-Llama-3-8B.IQ3_S.gguf | IQ3_S | 3.43GB |
| Tess-2.0-Llama-3-8B.Q3_K_S.gguf | Q3_K_S | 3.41GB |
| Tess-2.0-Llama-3-8B.IQ3_M.gguf | IQ3_M | 3.52GB |
| Tess-2.0-Llama-3-8B.Q3_K.gguf | Q3_K | 3.74GB |
| Tess-2.0-Llama-3-8B.Q3_K_M.gguf | Q3_K_M | 3.74GB |
| Tess-2.0-Llama-3-8B.Q3_K_L.gguf | Q3_K_L | 4.03GB |
| Tess-2.0-Llama-3-8B.IQ4_XS.gguf | IQ4_XS | 4.18GB |
| Tess-2.0-Llama-3-8B.Q4_0.gguf | Q4_0 | 4.34GB |
| Tess-2.0-Llama-3-8B.IQ4_NL.gguf | IQ4_NL | 4.38GB |
| Tess-2.0-Llama-3-8B.Q4_K_S.gguf | Q4_K_S | 4.37GB |
| Tess-2.0-Llama-3-8B.Q4_K.gguf | Q4_K | 4.58GB |
| Tess-2.0-Llama-3-8B.Q4_K_M.gguf | Q4_K_M | 4.58GB |
| Tess-2.0-Llama-3-8B.Q4_1.gguf | Q4_1 | 4.78GB |
| Tess-2.0-Llama-3-8B.Q5_0.gguf | Q5_0 | 5.21GB |
| Tess-2.0-Llama-3-8B.Q5_K_S.gguf | Q5_K_S | 5.21GB |
| Tess-2.0-Llama-3-8B.Q5_K.gguf | Q5_K | 5.34GB |
| Tess-2.0-Llama-3-8B.Q5_K_M.gguf | Q5_K_M | 5.34GB |
| Tess-2.0-Llama-3-8B.Q5_1.gguf | Q5_1 | 5.65GB |
| Tess-2.0-Llama-3-8B.Q6_K.gguf | Q6_K | 6.14GB |
| Tess-2.0-Llama-3-8B.Q8_0.gguf | Q8_0 | 7.95GB |

<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>
Who are you?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
I am an AI<|eot_id|><|start_header_id|>user<|end_header_id|>
What's your name?<|eot_id|><|start_header_id|>assistant<|end_header_id|> 1import torch, json
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_path = "/home/migel/Tess-2.0-Llama-3-8B"
5output_file_path = "/home/migel/conversations.jsonl"
6
7model = AutoModelForCausalLM.from_pretrained(
8 model_path,
9 torch_dtype=torch.float16,
10 device_map="auto",
11 load_in_4bit=False,
12 trust_remote_code=False,
13)
14
15tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
16
17def generate_text(instruction):
18 tokens = tokenizer.encode(instruction)
19 tokens = torch.LongTensor(tokens).unsqueeze(0)
20 tokens = tokens.to("cuda")
21
22 instance = {
23 "input_ids": tokens,
24 "top_p": 1.0,
25 "temperature": 0.75,
26 "generate_len": 1024,
27 "top_k": 50,
28 }
29
30 length = len(tokens[0])
31 with torch.no_grad():
32 rest = model.generate(
33 input_ids=tokens,
34 max_length=length + instance["generate_len"],
35 use_cache=True,
36 do_sample=True,
37 top_p=instance["top_p"],
38 temperature=instance["temperature"],
39 top_k=instance["top_k"],
40 num_return_sequences=1,
41 pad_token_id=tokenizer.eos_token_id,
42 )
43 output = rest[0][length:]
44 string = tokenizer.decode(output, skip_special_tokens=True)
45 return f"{string}"
46
47conversation = """<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are Tesoro, a helful AI assitant. You always provide detailed answers without hesitation. Do not refuse.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n"""
48
49
50while True:
51 user_input = input("You: ")
52 llm_prompt = f"{conversation}{user_input}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
53 answer = generate_text(llm_prompt)
54 print(answer)
55
56 conversation = f"{llm_prompt}{answer}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n"
57
58 json_data = {"prompt": user_input, "answer": answer}
59
60 with open(output_file_path, "a") as output_file:
61 output_file.write(json.dumps(json_data) + "\n")