Update README.md
Browse files
README.md
CHANGED
@@ -57,4 +57,10 @@ print(model.config)
|
|
57 |
|
58 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
```
|
|
|
57 |
|
58 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
|
59 |
|
60 |
+
text = "An attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is"
|
61 |
+
inputs = tokenizer(text, return_tensors="pt")
|
62 |
+
outputs = model.generate(**inputs.to(model.device), max_new_tokens=100)
|
63 |
+
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
64 |
+
print(result)
|
65 |
+
|
66 |
```
|