Update README.md
Browse files
README.md
CHANGED
@@ -101,7 +101,7 @@ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
|
101 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True).to(device)
|
102 |
|
103 |
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
|
104 |
-
outputs = model.generate(
|
105 |
print(tokenizer.decode(outputs[0]))
|
106 |
```
|
107 |
|
|
|
101 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True).to(device)
|
102 |
|
103 |
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
|
104 |
+
outputs = model.generate(inputs, max_new_tokens=100)
|
105 |
print(tokenizer.decode(outputs[0]))
|
106 |
```
|
107 |
|