Deeokay commited on
Commit
0449737
1 Parent(s): 4d7e8de

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +75 -0
README.md CHANGED
@@ -20,3 +20,78 @@ tags:
20
  This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
21
 
22
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
21
 
22
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
23
+
24
+ # README
25
+
26
+ This is a test model on a the following
27
+ - a private dataset
28
+ - customization on tokenization to llama3 template
29
+ - Works with Ollama create with just "FROM path/to/model" as Modelfile (requires to add llama3 template works no issues)
30
+
31
+ # HOW TO USE
32
+
33
+ The whole point of conversion for me was I wanted to be able to to use it through Ollama or (other local options)
34
+ For Ollama, it required to be a GGUF file. Once you have this it is pretty straight forward (if it is in llama3 which this model is)
35
+
36
+ Quick Start:
37
+ - You must already have Ollama running in your setting
38
+ - Download the unsloth.Q4_K_M.gguf model from Files
39
+ - In the same directory create a file call "Modelfile"
40
+ - Inside the "Modelfile" type
41
+
42
+ ```python
43
+ FROM ./unsloth.Q4_K_M.gguf
44
+
45
+ PARAMETER temperature 0.6
46
+ PARAMETER repeat_penalty 1.3
47
+ PARAMETER top_p 0.6
48
+ PARAMETER top_k 30
49
+
50
+ PARAMETER stop <|start_header_id|>
51
+ PARAMETER stop <|end_header_id|>
52
+ PARAMETER stop <|eot_id|>
53
+
54
+ TEMPLATE "{{ if .System }}<|start_header_id|>system<|end_header_id|>
55
+
56
+ {{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
57
+
58
+ {{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
59
+
60
+ {{ .Response }}<|eot_id|>"
61
+ ```
62
+
63
+ - Save a go back to the folder (folder where model + Modelfile exisit)
64
+ - Now in terminal make sure you are in the same location of the folder and type in the following command
65
+
66
+ ```python
67
+ ollama create mycustomai # "mycustomai" <- you can name it anything u want
68
+ ```
69
+
70
+ This GGUF is based on mistral-7b-v0.3
71
+
72
+
73
+ # NOTE: DISCLAIMER
74
+
75
+ Please note this is not for the purpose of production, but result of Fine Tuning through self learning
76
+
77
+ The llama3 Special Tokens where used to convert the tokenizer.
78
+
79
+ I wanted to test if the model would understand additional headers that I created such as what my datasets has
80
+ - Analaysis, Classification, Sentiment
81
+
82
+ Multiple pass through my personalized customized dataset, future updates will be made to this repo.
83
+
84
+ If would like to know how I started creating my dataset, you can check this link
85
+ [Crafting GPT2 for Personalized AI-Preparing Data the Long Way (Part1)](https://medium.com/@deeokay/the-soul-in-the-machine-crafting-gpt2-for-personalized-ai-9d38be3f635f)
86
+
87
+ the training data has the following Template:
88
+
89
+ ```
90
+ <|begin_of_text|> <|start_header_id|>user<|end_header_id|>
91
+ {{.Prompt}}<|eot_id|><|start_header_id|>analysis<|end_header_id|>
92
+ {{.Analysis}}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
93
+ {{.Response}}<|eot_id|><|start_header_id|>classification<|end_header_id|>
94
+ {{.Classification}}<|eot_id|><|start_header_id|>sentiment<|end_header_id|>
95
+ {{.Sentiment}}<|eot_id|><|end_of_text|>
96
+
97
+ ```