Update README.md
Browse files
README.md
CHANGED
@@ -89,16 +89,19 @@ top_k=0 # not recommended
|
|
89 |
top_p=0.9
|
90 |
repetition_penalty=1.1
|
91 |
|
92 |
-
def
|
93 |
-
|
94 |
-
|
95 |
-
{"
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
)
|
|
|
|
|
|
|
102 |
|
103 |
input_ids = tokenizer.encode(
|
104 |
prompt,
|
@@ -325,10 +328,4 @@ packing=True
|
|
325 |
|
326 |
## Model Card Authors
|
327 |
|
328 |
-
[
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
## Model Card Contact
|
333 |
-
|
334 |
-
[More Information Needed]
|
|
|
89 |
top_p=0.9
|
90 |
repetition_penalty=1.1
|
91 |
|
92 |
+
def prompt_template(system, user):
|
93 |
+
return (
|
94 |
+
"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n"
|
95 |
+
f"{system}<|eot_id|>"
|
96 |
+
|
97 |
+
"<|start_header_id|>user<|end_header_id|>\n\n"
|
98 |
+
f"{user}<|eot_id|>"
|
99 |
+
|
100 |
+
"<|start_header_id|>assistant<|end_header_id|>\n\n"
|
101 |
)
|
102 |
+
|
103 |
+
def generate_response(system ,user):
|
104 |
+
prompt = prompt_template(system, user)
|
105 |
|
106 |
input_ids = tokenizer.encode(
|
107 |
prompt,
|
|
|
328 |
|
329 |
## Model Card Authors
|
330 |
|
331 |
+
[PathFinderKR](https://github.com/PathFinderKR)
|
|
|
|
|
|
|
|
|
|
|
|