Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
tags:
|
5 |
+
- pytorch
|
6 |
+
- causal-lm
|
7 |
+
license: apache-2.0
|
8 |
+
datasets:
|
9 |
+
- The Pile
|
10 |
+
---
|
11 |
+
|
12 |
+
# GPT-J 6B
|
13 |
+
|
14 |
+
## Model Description
|
15 |
+
|
16 |
+
GPT-J 6B is a transformer model trained using Ben Wang's [Mesh Transformer JAX](https://github.com/kingoflolz/mesh-transformer-jax/). "GPT-J" refers to the class of model, while "6B" represents the number of trainable parameters.
|
17 |
+
|
18 |
+
## Original implementation
|
19 |
+
|
20 |
+
Follow [this link](https://huggingface.co/EleutherAI/gpt-j-6B) to see the original implementation.
|
21 |
+
|
22 |
+
# How to use
|
23 |
+
|
24 |
+
Download the model by cloning the repository via `git clone https://huggingface.co/OWG/bert-base-uncased`.
|
25 |
+
|
26 |
+
Then you can use the model with the following code:
|
27 |
+
|
28 |
+
```python
|
29 |
+
from onnxruntime import InferenceSession, SessionOptions, GraphOptimizationLevel
|
30 |
+
from transformers import AutoTokenizer
|
31 |
+
|
32 |
+
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6B")
|
34 |
+
|
35 |
+
options = SessionOptions()
|
36 |
+
options.graph_optimization_level = GraphOptimizationLevel.ORT_ENABLE_ALL
|
37 |
+
|
38 |
+
session = InferenceSession("path/to/model.onnx", sess_options=options)
|
39 |
+
session.disable_fallback()
|
40 |
+
|
41 |
+
TODO
|
42 |
+
```
|