PathFinderKR commited on
Commit
436b720
·
verified ·
1 Parent(s): 1550fc2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -16
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 generate_response(system ,user):
93
- messages = [
94
- {"role": "system", "content": system},
95
- {"role": "user", "content": user}
96
- ]
97
- prompt = tokenizer.apply_chat_template(
98
- messages,
99
- tokenize=False,
100
- add_generation_prompt=False
101
  )
 
 
 
102
 
103
  input_ids = tokenizer.encode(
104
  prompt,
@@ -325,10 +328,4 @@ packing=True
325
 
326
  ## Model Card Authors
327
 
328
- [More Information Needed]
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)