kevin36524 commited on
Commit
7c62b77
·
verified ·
1 Parent(s): 934151d

Upload export_qwen2_wc.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. export_qwen2_wc.py +78 -83
export_qwen2_wc.py CHANGED
@@ -180,12 +180,20 @@ def generate() -> None:
180
  torch_model = StatefulQwen2ForCausalLM(MODEL_ID, max_context_size=max_context_size)
181
  torch_model.eval()
182
 
183
- input_ids: torch.Tensor = torch.tensor([[7985, 264, 32794, 911, 60249]], dtype=torch.int32)
 
 
 
 
 
 
184
  causal_mask: torch.Tensor = torch.ones((1, 1, 1, input_ids.shape[-1] + 1), dtype=torch.float32)
185
 
186
  # Set the output length
187
  output_length = 20
188
 
 
 
189
  # Initialize the output tensor
190
  output_tokens = input_ids
191
 
@@ -195,9 +203,12 @@ def generate() -> None:
195
  #torch_model.kv_cache.past_seen_tokens = causal_mask.shape[-1] - output_tokens.shape[-1]
196
 
197
  # Get the model output
198
- model_inp = output_tokens[:, -20:]
 
 
 
199
  print(f"KEVINDEBUG model_inp: {model_inp} causal_mask: {causal_mask}")
200
- output = torch_model(output_tokens[:, -20:], causal_mask) # Start with a sub-squence that long so need multiple previous when size only very lwo larger later same past arg a so try keeping right padded!
201
 
202
  # Get the most likely token IDs
203
  output_ids = torch.argmax(output, dim=-1)
@@ -209,9 +220,6 @@ def generate() -> None:
209
  # Update the causal mask
210
  causal_mask = torch.ones((1, 1, 1, output_tokens.shape[-1] + 1), dtype=torch.float32)
211
 
212
- # Decode output tokens using the tokenizer
213
- from transformers import AutoTokenizer
214
- tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
215
  decoded_output = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
216
  print(f"input : {tokenizer.decode(input_ids[0])} output: {decoded_output}")
217
 
@@ -277,88 +285,75 @@ if __name__ == "__main__":
277
  generate()
278
 
279
  ###
280
- #(venv) kevin36524@instance-20240808-212842:~$ python export_qwen2_wc.py
281
- #Failed to load _MLModelProxy: No module named 'coremltools.libcoremlpython'
282
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249]], dtype=torch.int32) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1.]]]])
283
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11]])
284
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1.]]]])
285
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689]])
286
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1.]]]])
287
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11]])
288
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
289
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080]])
290
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
291
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389]])
292
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
293
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
294
- # 1181]])
295
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
296
- # 1181]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
297
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
298
- # 1181, 17646]])
299
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
300
- # 1181, 17646]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
301
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
302
- # 1181, 17646, 11]])
303
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
304
- # 1181, 17646, 11]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
305
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
306
- # 1181, 17646, 11, 7674]])
307
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
308
- # 1181, 17646, 11, 7674]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
309
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
310
- # 1181, 17646, 11, 7674, 11]])
311
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
312
- # 1181, 17646, 11, 7674, 11]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
313
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
314
- # 1181, 17646, 11, 7674, 11, 323]])
315
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
316
- # 1181, 17646, 11, 7674, 11, 323]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
317
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
318
- # 1181, 17646, 11, 7674, 11, 323, 35005]])
319
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
320
- # 1181, 17646, 11, 7674, 11, 323, 35005]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
321
  # 1.]]]])
322
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
323
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13]])
324
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
325
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
326
  # 1., 1.]]]])
327
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
328
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443]])
329
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
330
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
331
  # 1., 1., 1.]]]])
332
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
333
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020]])
334
- #KEVINDEBUG model_inp: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
335
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
336
  # 1., 1., 1., 1.]]]])
337
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
338
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020,
339
- # 40445]])
340
- #KEVINDEBUG model_inp: tensor([[ 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389, 1181,
341
- # 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020, 40445]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
342
  # 1., 1., 1., 1., 1.]]]])
343
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
344
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020,
345
- # 40445, 323]])
346
- #KEVINDEBUG model_inp: tensor([[32794, 911, 60249, 11, 17689, 11, 21080, 389, 1181, 17646,
347
- # 11, 7674, 11, 323, 35005, 13, 5443, 42020, 40445, 323]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
348
  # 1., 1., 1., 1., 1., 1.]]]])
349
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
350
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020,
351
- # 40445, 323, 32976]])
352
- #KEVINDEBUG model_inp: tensor([[ 911, 60249, 11, 17689, 11, 21080, 389, 1181, 17646, 11,
353
- # 7674, 11, 323, 35005, 13, 5443, 42020, 40445, 323, 32976]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
354
  # 1., 1., 1., 1., 1., 1., 1.]]]])
355
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
356
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020,
357
- # 40445, 323, 32976, 7987]])
358
- #KEVINDEBUG model_inp: tensor([[60249, 11, 17689, 11, 21080, 389, 1181, 17646, 11, 7674,
359
- # 11, 323, 35005, 13, 5443, 42020, 40445, 323, 32976, 7987]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
360
  # 1., 1., 1., 1., 1., 1., 1., 1.]]]])
361
- #KEVINDEBUG output_tokens: tensor([[ 7985, 264, 32794, 911, 60249, 11, 17689, 11, 21080, 389,
362
- # 1181, 17646, 11, 7674, 11, 323, 35005, 13, 5443, 42020,
363
- # 40445, 323, 32976, 7987, 11]])
364
- #input : Write a poem about Valencia output: Write a poem about Valencia, Spain, focusing on its architecture, culture, and cuisine. Use vivid imagery and vibrant colors,
 
 
 
 
 
 
180
  torch_model = StatefulQwen2ForCausalLM(MODEL_ID, max_context_size=max_context_size)
181
  torch_model.eval()
182
 
183
+ # Decode output tokens using the tokenizer
184
+ from transformers import AutoTokenizer
185
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
186
+ #initial_prompt = "Write a christmas Carol"
187
+ initial_prompt = "Here is a poem about Valencia"
188
+
189
+ input_ids = tokenizer(initial_prompt, return_tensors='pt').input_ids
190
  causal_mask: torch.Tensor = torch.ones((1, 1, 1, input_ids.shape[-1] + 1), dtype=torch.float32)
191
 
192
  # Set the output length
193
  output_length = 20
194
 
195
+ is_first_run = True
196
+
197
  # Initialize the output tensor
198
  output_tokens = input_ids
199
 
 
203
  #torch_model.kv_cache.past_seen_tokens = causal_mask.shape[-1] - output_tokens.shape[-1]
204
 
205
  # Get the model output
206
+ model_inp = output_tokens[:, -1:]
207
+ if is_first_run:
208
+ model_inp = input_ids
209
+ is_first_run = False
210
  print(f"KEVINDEBUG model_inp: {model_inp} causal_mask: {causal_mask}")
211
+ output = torch_model(model_inp, causal_mask) # Start with a sub-squence that long so need multiple previous when size only very lwo larger later same past arg a so try keeping right padded!
212
 
213
  # Get the most likely token IDs
214
  output_ids = torch.argmax(output, dim=-1)
 
220
  # Update the causal mask
221
  causal_mask = torch.ones((1, 1, 1, output_tokens.shape[-1] + 1), dtype=torch.float32)
222
 
 
 
 
223
  decoded_output = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
224
  print(f"input : {tokenizer.decode(input_ids[0])} output: {decoded_output}")
225
 
 
285
  generate()
286
 
287
  ###
288
+ #KEVINDEBUG model_inp: tensor([[ 8420, 374, 264, 32794, 911, 60249]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1.]]]])
289
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11]])
290
+ #KEVINDEBUG model_inp: tensor([[11]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1.]]]])
291
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689]])
292
+ #KEVINDEBUG model_inp: tensor([[17689]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
293
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13]])
294
+ #KEVINDEBUG model_inp: tensor([[13]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
295
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084]])
296
+ #KEVINDEBUG model_inp: tensor([[1084]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
297
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
298
+ # 374]])
299
+ #KEVINDEBUG model_inp: tensor([[374]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
300
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
301
+ # 374, 264]])
302
+ #KEVINDEBUG model_inp: tensor([[264]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
303
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
304
+ # 374, 264, 32794]])
305
+ #KEVINDEBUG model_inp: tensor([[32794]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
306
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
307
+ # 374, 264, 32794, 911]])
308
+ #KEVINDEBUG model_inp: tensor([[911]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
309
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
310
+ # 374, 264, 32794, 911, 279]])
311
+ #KEVINDEBUG model_inp: tensor([[279]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
312
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
313
+ # 374, 264, 32794, 911, 279, 3283]])
314
+ #KEVINDEBUG model_inp: tensor([[3283]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
315
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
316
+ # 374, 264, 32794, 911, 279, 3283, 315]])
317
+ #KEVINDEBUG model_inp: tensor([[315]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
 
 
 
 
 
 
 
 
 
 
318
  # 1.]]]])
319
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
320
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249]])
321
+ #KEVINDEBUG model_inp: tensor([[60249]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
322
  # 1., 1.]]]])
323
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
324
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11]])
325
+ #KEVINDEBUG model_inp: tensor([[11]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
326
  # 1., 1., 1.]]]])
327
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
328
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11, 17689]])
329
+ #KEVINDEBUG model_inp: tensor([[17689]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
330
  # 1., 1., 1., 1.]]]])
331
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
332
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11, 17689,
333
+ # 13]])
334
+ #KEVINDEBUG model_inp: tensor([[13]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
335
  # 1., 1., 1., 1., 1.]]]])
336
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
337
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11, 17689,
338
+ # 13, 576]])
339
+ #KEVINDEBUG model_inp: tensor([[576]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
340
  # 1., 1., 1., 1., 1., 1.]]]])
341
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
342
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11, 17689,
343
+ # 13, 576, 32794]])
344
+ #KEVINDEBUG model_inp: tensor([[32794]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
345
  # 1., 1., 1., 1., 1., 1., 1.]]]])
346
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
347
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11, 17689,
348
+ # 13, 576, 32794, 374]])
349
+ #KEVINDEBUG model_inp: tensor([[374]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
 
350
  # 1., 1., 1., 1., 1., 1., 1., 1.]]]])
351
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
352
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11, 17689,
353
+ # 13, 576, 32794, 374, 5326]])
354
+ #KEVINDEBUG model_inp: tensor([[5326]]) causal_mask: tensor([[[[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
355
+ # 1., 1., 1., 1., 1., 1., 1., 1., 1.]]]])
356
+ #KEVINDEBUG output_tokens: tensor([[ 8420, 374, 264, 32794, 911, 60249, 11, 17689, 13, 1084,
357
+ # 374, 264, 32794, 911, 279, 3283, 315, 60249, 11, 17689,
358
+ # 13, 576, 32794, 374, 5326, 304]])
359
+ #input : Here is a poem about Valencia output: Here is a poem about Valencia, Spain. It is a poem about the city of Valencia, Spain. The poem is written in