sahil2801 commited on
Commit
b2d94bc
1 Parent(s): 8e03ffb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -41,6 +41,6 @@ model = AutoModelForCausalLM.from_pretrained(checkpoint).half().to(device)
41
  instruction = "Write a function to scrape hacker news."
42
  prompt = f"Below is an instruction that describes a task.\n Write a response that appropriately completes the request.\n\n ### Instruction:\n{instruction}\n\n### Response:"
43
  inputs = tokenizer(prompt, return_tensors="pt").to(device)
44
- outputs = model.generate(**inputs,temperature=0.3,do_sample=True)
45
- print(tokenizer.decode(outputs[0],skip_special_tokens=True,max_new_tokens=200))
46
  ```
 
41
  instruction = "Write a function to scrape hacker news."
42
  prompt = f"Below is an instruction that describes a task.\n Write a response that appropriately completes the request.\n\n ### Instruction:\n{instruction}\n\n### Response:"
43
  inputs = tokenizer(prompt, return_tensors="pt").to(device)
44
+ outputs = model.generate(**inputs,temperature=0.3,do_sample=True,max_new_tokens=256)
45
+ print(tokenizer.decode(outputs[0],skip_special_tokens=True))
46
  ```