meetrais commited on
Commit
cf6ba60
1 Parent(s): fc33041

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -0
README.md CHANGED
@@ -62,10 +62,13 @@ tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
62
 
63
  if tokenizer.pad_token is None:
64
  tokenizer.add_special_tokens({'pad_token': '[PAD]'})
 
65
  text = "Capital of USA is"
 
66
  device = "cuda:0"
67
 
68
  inputs = tokenizer(text, return_tensors="pt").to(device)
69
 
70
  outputs = model.generate(**inputs, pad_token_id= tokenizer.eos_token_id, max_new_tokens=20)
 
71
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
 
62
 
63
  if tokenizer.pad_token is None:
64
  tokenizer.add_special_tokens({'pad_token': '[PAD]'})
65
+
66
  text = "Capital of USA is"
67
+
68
  device = "cuda:0"
69
 
70
  inputs = tokenizer(text, return_tensors="pt").to(device)
71
 
72
  outputs = model.generate(**inputs, pad_token_id= tokenizer.eos_token_id, max_new_tokens=20)
73
+
74
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))