Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Tess-v2.5-Qwen2-72B.Q2_K.gguf | Q2_K | 27.76GB |
| Tess-v2.5-Qwen2-72B.IQ3_XS.gguf | IQ3_XS | 30.59GB |
| Tess-v2.5-Qwen2-72B.IQ3_S.gguf | IQ3_S | 32.12GB |
| Tess-v2.5-Qwen2-72B.Q3_K_S.gguf | Q3_K_S | 32.12GB |
| Tess-v2.5-Qwen2-72B.IQ3_M.gguf | IQ3_M | 33.07GB |
| Tess-v2.5-Qwen2-72B.Q3_K.gguf | Q3_K | 35.11GB |
| Tess-v2.5-Qwen2-72B.Q3_K_M.gguf | Q3_K_M | 35.11GB |
| Tess-v2.5-Qwen2-72B.Q3_K_L.gguf | Q3_K_L | 36.79GB |
| Tess-v2.5-Qwen2-72B.IQ4_XS.gguf | IQ4_XS | 37.4GB |
| Tess-v2.5-Qwen2-72B.Q4_0.gguf | Q4_0 | 38.4GB |
| Tess-v2.5-Qwen2-72B.IQ4_NL.gguf | IQ4_NL | 38.9GB |
| Tess-v2.5-Qwen2-72B.Q4_K_S.gguf | Q4_K_S | 40.88GB |
| Tess-v2.5-Qwen2-72B.Q4_K.gguf | Q4_K | 44.16GB |
| Tess-v2.5-Qwen2-72B.Q4_K_M.gguf | Q4_K_M | 44.16GB |
| Tess-v2.5-Qwen2-72B.Q4_1.gguf | Q4_1 | 42.56GB |
| Tess-v2.5-Qwen2-72B.Q5_0.gguf | Q5_0 | 46.72GB |
| Tess-v2.5-Qwen2-72B.Q5_K_S.gguf | Q5_K_S | 47.85GB |
| Tess-v2.5-Qwen2-72B.Q5_K.gguf | Q5_K | 50.71GB |
| Tess-v2.5-Qwen2-72B.Q5_K_M.gguf | Q5_K_M | 50.71GB |
| Tess-v2.5-Qwen2-72B.Q5_1.gguf | Q5_1 | 50.88GB |
| Tess-v2.5-Qwen2-72B.Q6_K.gguf | Q6_K | 59.93GB |
| Tess-v2.5-Qwen2-72B.Q8_0.gguf | Q8_0 | 71.96GB |




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