Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -20,6 +20,7 @@ A custom GPT model trained on FineWeb 10B dataset.
|
|
| 20 |
|
| 21 |
## Usage
|
| 22 |
|
|
|
|
| 23 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 24 |
import torch
|
| 25 |
|
|
@@ -34,6 +35,9 @@ tokenizer = AutoTokenizer.from_pretrained("gpt2")
|
|
| 34 |
input_ids = tokenizer("Hello, world", return_tensors="pt").input_ids
|
| 35 |
with torch.no_grad():
|
| 36 |
outputs = model.generate(input_ids, max_new_tokens=50)
|
| 37 |
-
print(tokenizer.decode(outputs[0]))
|
|
|
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## Usage
|
| 22 |
|
| 23 |
+
~~~python
|
| 24 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 25 |
import torch
|
| 26 |
|
|
|
|
| 35 |
input_ids = tokenizer("Hello, world", return_tensors="pt").input_ids
|
| 36 |
with torch.no_grad():
|
| 37 |
outputs = model.generate(input_ids, max_new_tokens=50)
|
| 38 |
+
print(tokenizer.decode(outputs[0]))
|
| 39 |
+
~~~
|
| 40 |
|
| 41 |
+
## Citation
|
| 42 |
+
|
| 43 |
+
If you use this model, please cite...
|