GPT-J 6B is a transformer model trained using Ben Wang's
Mesh Transformer JAX. "GPT-J" refers to the class of model, while "6B" represents the number of trainable parameters.
Follow
this link to see the original implementation.
1from onnxruntime import InferenceSession, SessionOptions, GraphOptimizationLevel
2from transformers import AutoTokenizer
3
4
5tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6B")
6
7options = SessionOptions()
8options.graph_optimization_level = GraphOptimizationLevel.ORT_ENABLE_ALL
9
10session = InferenceSession("path/to/model.onnx", sess_options=options)
11session.disable_fallback()
12
13TODO