LoneStriker
commited on
Commit
•
3f1804c
1
Parent(s):
8d43243
Upload folder using huggingface_hub
Browse files- .gitattributes +5 -35
- README.md +106 -0
- Tess-2.0-Llama-3-8B-Q3_K_L.gguf +3 -0
- Tess-2.0-Llama-3-8B-Q4_K_M.gguf +3 -0
- Tess-2.0-Llama-3-8B-Q5_K_M.gguf +3 -0
- Tess-2.0-Llama-3-8B-Q6_K.gguf +3 -0
- Tess-2.0-Llama-3-8B-Q8_0.gguf +3 -0
.gitattributes
CHANGED
@@ -1,35 +1,5 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
1 |
+
Tess-2.0-Llama-3-8B-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
2 |
+
Tess-2.0-Llama-3-8B-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
3 |
+
Tess-2.0-Llama-3-8B-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
4 |
+
Tess-2.0-Llama-3-8B-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
5 |
+
Tess-2.0-Llama-3-8B-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: llama3
|
3 |
+
---
|
4 |
+
|
5 |
+
![Tesoro](https://huggingface.co/migtissera/Tess-2.0-Mixtral-8x22B/resolve/main/Tess-2.png)
|
6 |
+
|
7 |
+
# Tess-2.0-Llama-3-8B
|
8 |
+
Tess, short for Tesoro (Treasure in Italian), is a general purpose Large Language Model series. Tess-2.0-Llama-3-8B was trained on the meta-llama/Meta-Llama-3-8B base.
|
9 |
+
|
10 |
+
# Prompt Format
|
11 |
+
Prompt format used for this fine-tune is Llama-3
|
12 |
+
|
13 |
+
```
|
14 |
+
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
|
15 |
+
|
16 |
+
You are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>
|
17 |
+
|
18 |
+
Who are you?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
19 |
+
|
20 |
+
I am an AI<|eot_id|><|start_header_id|>user<|end_header_id|>
|
21 |
+
|
22 |
+
What's your name?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
23 |
+
```
|
24 |
+
|
25 |
+
# Training Methodology
|
26 |
+
Tess-2.0-Llama-3 was trained on the (still curating) Tess-2.0 dataset. Tess-2.0 dataset contains ~100K high-quality code and general training samples. The dataset is highly uncensored, hence the model will almost always follow instructions.
|
27 |
+
|
28 |
+
The model was only fine-tuned for 1-epoch with a low learning rate to try and preserve its entropy as much as possible.
|
29 |
+
|
30 |
+
|
31 |
+
# Sample code to run inference
|
32 |
+
|
33 |
+
```python
|
34 |
+
import torch, json
|
35 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
36 |
+
|
37 |
+
model_path = "/home/migel/Tess-2.0-Llama-3-8B"
|
38 |
+
output_file_path = "/home/migel/conversations.jsonl"
|
39 |
+
|
40 |
+
model = AutoModelForCausalLM.from_pretrained(
|
41 |
+
model_path,
|
42 |
+
torch_dtype=torch.float16,
|
43 |
+
device_map="auto",
|
44 |
+
load_in_4bit=False,
|
45 |
+
trust_remote_code=False,
|
46 |
+
)
|
47 |
+
|
48 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
|
49 |
+
|
50 |
+
def generate_text(instruction):
|
51 |
+
tokens = tokenizer.encode(instruction)
|
52 |
+
tokens = torch.LongTensor(tokens).unsqueeze(0)
|
53 |
+
tokens = tokens.to("cuda")
|
54 |
+
|
55 |
+
instance = {
|
56 |
+
"input_ids": tokens,
|
57 |
+
"top_p": 1.0,
|
58 |
+
"temperature": 0.75,
|
59 |
+
"generate_len": 1024,
|
60 |
+
"top_k": 50,
|
61 |
+
}
|
62 |
+
|
63 |
+
length = len(tokens[0])
|
64 |
+
with torch.no_grad():
|
65 |
+
rest = model.generate(
|
66 |
+
input_ids=tokens,
|
67 |
+
max_length=length + instance["generate_len"],
|
68 |
+
use_cache=True,
|
69 |
+
do_sample=True,
|
70 |
+
top_p=instance["top_p"],
|
71 |
+
temperature=instance["temperature"],
|
72 |
+
top_k=instance["top_k"],
|
73 |
+
num_return_sequences=1,
|
74 |
+
pad_token_id=tokenizer.eos_token_id,
|
75 |
+
)
|
76 |
+
output = rest[0][length:]
|
77 |
+
string = tokenizer.decode(output, skip_special_tokens=True)
|
78 |
+
return f"{string}"
|
79 |
+
|
80 |
+
conversation = """<|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"""
|
81 |
+
|
82 |
+
|
83 |
+
while True:
|
84 |
+
user_input = input("You: ")
|
85 |
+
llm_prompt = f"{conversation}{user_input}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
|
86 |
+
answer = generate_text(llm_prompt)
|
87 |
+
print(answer)
|
88 |
+
|
89 |
+
conversation = f"{llm_prompt}{answer}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n"
|
90 |
+
|
91 |
+
json_data = {"prompt": user_input, "answer": answer}
|
92 |
+
|
93 |
+
with open(output_file_path, "a") as output_file:
|
94 |
+
output_file.write(json.dumps(json_data) + "\n")
|
95 |
+
```
|
96 |
+
|
97 |
+
# Join My General AI Discord (NeuroLattice):
|
98 |
+
https://discord.gg/Hz6GrwGFKD
|
99 |
+
|
100 |
+
# Limitations & Biases:
|
101 |
+
|
102 |
+
While this model aims for accuracy, it can occasionally produce inaccurate or misleading results.
|
103 |
+
|
104 |
+
Despite diligent efforts in refining the pretraining data, there remains a possibility for the generation of inappropriate, biased, or offensive content.
|
105 |
+
|
106 |
+
Exercise caution and cross-check information when necessary. This is an uncensored model.
|
Tess-2.0-Llama-3-8B-Q3_K_L.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e1b7dd21dfc5d9c7b2552001de1e1c6bbfb99e0e9e29f62683617606843e8266
|
3 |
+
size 4321956288
|
Tess-2.0-Llama-3-8B-Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:205f8a32552d94749c5c8a13290246668b9b97ce1973d1a9d4bfd0bf2505ebad
|
3 |
+
size 4920734144
|
Tess-2.0-Llama-3-8B-Q5_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dac75299ae2e22e5289ccdd3f5db0dd87c65cfc8209ce307e95baab0a9396b54
|
3 |
+
size 5732987328
|
Tess-2.0-Llama-3-8B-Q6_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e03be7cfce6301af35968999a7c83e5f18d9ca37678504c49f553b4e0c4ca13f
|
3 |
+
size 6596006336
|
Tess-2.0-Llama-3-8B-Q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b66fe5e360e9c541deadf8bfbf3e918e1efbc54125385ca8b81c1bed7753f75a
|
3 |
+
size 8540770752
|