sudhanshu-soft
commited on
Commit
•
6cca118
1
Parent(s):
7cb9f26
init
Browse files- .gitattributes +1 -0
- ModelFile_tem.txt +12 -0
- model.gguf +3 -0
- setup.py +32 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* 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
|
|
|
|
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
|
36 |
+
model.gguf filter=lfs diff=lfs merge=lfs -text
|
ModelFile_tem.txt
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM "{path}"
|
2 |
+
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>
|
3 |
+
|
4 |
+
{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
|
5 |
+
|
6 |
+
{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
|
7 |
+
|
8 |
+
{{ .Response }}<|eot_id|>"""
|
9 |
+
PARAMETER stop "<|start_header_id|>"
|
10 |
+
PARAMETER stop "<|end_header_id|>"
|
11 |
+
PARAMETER stop "<|eot_id|>"
|
12 |
+
PARAMETER stop "<|end_of_text|>"
|
model.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7bcad713522b5d446826304b2daecc723ffb38b726a727244b55a159c6ae65c4
|
3 |
+
size 4920738752
|
setup.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
# Get the current working directory
|
4 |
+
path = os.getcwd()
|
5 |
+
|
6 |
+
# Read the template file
|
7 |
+
with open(
|
8 |
+
os.path.join(path, "SFT_Model", "supervisor", "ModelFile_tem.txt"), "r"
|
9 |
+
) as file:
|
10 |
+
data = file.read()
|
11 |
+
|
12 |
+
# Replace the placeholder with the actual path
|
13 |
+
data = data.replace(
|
14 |
+
"{path}",
|
15 |
+
os.path.join(path, "SFT_Model", "supervisor", "model.gguf").replace("\\", "/"),
|
16 |
+
)
|
17 |
+
print(data)
|
18 |
+
|
19 |
+
# Write the modified data to a new file
|
20 |
+
with open(
|
21 |
+
os.path.join(path, "SFT_Model", "supervisor", "ModelFile.txt"), "w"
|
22 |
+
) as file:
|
23 |
+
file.write(data)
|
24 |
+
|
25 |
+
# Running the ollama setup
|
26 |
+
print("Running the ollama setup \n \n")
|
27 |
+
|
28 |
+
# Construct the command
|
29 |
+
path = path.replace("\\", "/") # Replace backslashes with forward slashes
|
30 |
+
script = f'ollama create myllama2 --file "{path}/SFT_Model/supervisor/ModelFile.txt"'
|
31 |
+
print(script)
|
32 |
+
os.system(script)
|