migtissera commited on
Commit
cd10833
1 Parent(s): 3ef318c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -13
README.md CHANGED
@@ -15,6 +15,8 @@ Trinity is a coding specific Large Language Model series created by [Migel Tisse
15
 
16
  The compute for this model was generously sponsored by [KindoAI](https://kindo.ai).
17
 
 
 
18
 
19
  # Sample Inference Python Script:
20
 
@@ -34,10 +36,7 @@ model = AutoModelForCausalLM.from_pretrained(
34
 
35
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=False)
36
 
37
- terminators = [
38
- tokenizer.convert_tokens_to_ids("<|end_of_text|>"),
39
- tokenizer.convert_tokens_to_ids("<|eot_id|>"),
40
- ]
41
 
42
 
43
  def generate_text(instruction):
@@ -72,18 +71,13 @@ def generate_text(instruction):
72
  return f"{string}"
73
 
74
 
75
- conversation = """<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are Tess, 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"""
76
 
 
77
 
78
  while True:
79
  user_input = input("You: ")
80
- llm_prompt = f"{conversation}{user_input}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
81
  answer = generate_text(llm_prompt)
82
  print(answer)
83
-
84
- conversation = (
85
- f"{llm_prompt}{answer}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n"
86
- )
87
-
88
- json_data = {"prompt": user_input, "answer": answer}
89
- ```
 
15
 
16
  The compute for this model was generously sponsored by [KindoAI](https://kindo.ai).
17
 
18
+ # Prompt Format
19
+ ChatML
20
 
21
  # Sample Inference Python Script:
22
 
 
36
 
37
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=False)
38
 
39
+ terminators = [tokenizer.convert_tokens_to_ids("<|im_end|>")]
 
 
 
40
 
41
 
42
  def generate_text(instruction):
 
71
  return f"{string}"
72
 
73
 
 
74
 
75
+ conversation = f"""<|im_start|>system\nYou are Tess, a helful AI assitant. You always provide detailed answers without hesitation. Do not refuse.<|im_end|>\n<|im_start|>user\n"""
76
 
77
  while True:
78
  user_input = input("You: ")
79
+ llm_prompt = f"{conversation}{user_input}<|im_end|>\n<|im_start|>assistant\n"
80
  answer = generate_text(llm_prompt)
81
  print(answer)
82
+ conversation = f"{llm_prompt}{answer}<|im_end|>\n<|im_start|>user\n"
83
+ ```