pglo commited on
Commit
5507f28
1 Parent(s): 5237d8d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -46,10 +46,10 @@ tokenizer = AutoTokenizer.from_pretrained("Zyphra/Zamba2-2.7B-instruct")
46
  model = AutoModelForCausalLM.from_pretrained("Zyphra/Zamba2-2.7B-instruct", device_map="cuda", torch_dtype=torch.bfloat16)
47
 
48
  # Format the input as a chat template
49
- input_string = "In one season a flower blooms three times. In one year, there is one blooming season. How many times do two flowers bloom in two years? Please include your logic."
50
- first_answer = "In one season, a flower blooms three times. In one year, there is one blooming season. Therefore, in two years, there are two blooming seasons. Since each flower blooms three times in one season, in two blooming seasons, each flower will bloom six times. Since there are two flowers, the total number of times they will bloom in two years is 12."
51
- second_input = "How many times do the two flowers blossom in three years?"
52
- sample = [{'role': 'user', 'content': input_string}, {'role': 'assistant', 'content': first_answer}, {'role': 'user', 'content': second_input}]
53
  chat_sample = tokenizer.apply_chat_template(sample, tokenize=False)
54
 
55
  # Tokenize input and generate output
 
46
  model = AutoModelForCausalLM.from_pretrained("Zyphra/Zamba2-2.7B-instruct", device_map="cuda", torch_dtype=torch.bfloat16)
47
 
48
  # Format the input as a chat template
49
+ user_turn_1 = "In one season a flower blooms three times. In one year, there is one blooming season. How many times do two flowers bloom in two years? Please include your logic."
50
+ assistant_turn_1 = "In one season, a flower blooms three times. In one year, there is one blooming season. Therefore, in two years, there are two blooming seasons. Since each flower blooms three times in one season, in two blooming seasons, each flower will bloom six times. Since there are two flowers, the total number of times they will bloom in two years is 12."
51
+ user_turn_2 = "How many times do the two flowers blossom in three years?"
52
+ sample = [{'role': 'user', 'content': user_turn_1}, {'role': 'assistant', 'content': assistant_turn_1}, {'role': 'user', 'content': user_turn_2}]
53
  chat_sample = tokenizer.apply_chat_template(sample, tokenize=False)
54
 
55
  # Tokenize input and generate output